MiniCourse CMPE12: Assembly Language - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

MiniCourse CMPE12: Assembly Language

Description:

Lecture Material by Prof. Andrea Di Blas and Alexandra Carey, Slides by Janelle Yong ... Lecture Material by Prof. A. Di Blas and A. Carey, Slides by J. Yong ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 28
Provided by: janell8
Category:

less

Transcript and Presenter's Notes

Title: MiniCourse CMPE12: Assembly Language


1
Mini-CourseCMPE12 Assembly Language
  • Presented by Tina Nguyen

Lecture Material by Prof. Andrea Di Blas and
Alexandra Carey, Slides by Janelle Yong
2
An Introduction to Computer Systems and Assembly
Language
  • Explains how computers compute in hardware and
    software
  • Basic Topics include
  • Number Systems
  • Digital Logic

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
3
Number Systems
  • Unary each marking represents one digit
  • IIIIIIII 8 and IIIIIIIIIII 11
  • Alphabet I
  • Arabic
  • Alphabet 0 1 2 3 4 5 6 7 8 9
  • 7 5 (1 10) (2 1) 12
  • Also called Decimal or Base 10

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
4
Number Systems
  • Binary
  • Alphabet 0, 1
  • Called binary digits, or bits
  • 1 presence of voltage
  • 0 absence of voltage
  • Bit is the unit of information

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
5
Number Representation
  • Each pattern of bits make up a code
  • Each code corresponds to a particular value
  • Examples
  • 11 3
  • 1100 12
  • 11001 25

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
6
Number Conversion
  • Decimal to Binary
  • Use successive divisions
  • Remember the remainders
  • Divide again with the quotient
  • ex. Convert 25 to Binary
  • 25 2 12 r 1
  • 12 2 6 r 0
  • 6 2 3 r 0
  • 3 2 1 r 1
  • 1 2 0 r 1
  • Binary 11001

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
7
Number Conversion
  • Binary to Decimal
  • If you have a binary number with 3 digits
  • __ 22 __ 21 __ 20
  • __ insert 1 or 0 depending on
  • what your binary number is

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
8
Number Conversion
  • __ 22 __ 21 __ 20
  • 2x exponent indicates which bit you are
    looking at
  • 0th bit is the right-most bit
  • Increases as you go left

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
9
Number Conversion
  • Example 1
  • 101 1 22 0 21 1 20
  • 4 0 1
  • 5

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
10
Number Conversion
  • Example 2
  • 11001 124 123 022 021 120
  • 16 8 0 0 1
  • 25

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
11
Practice Problems
  • Convert the following decimal numbers to binary
  • a. 13 b. 30 c. 42
  • Convert the following binary numbers to decimal
  • a. 0111 b. 1111
  • c. 10110 d. 01011

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
12
Knowing the Powers of Two
Know them in your sleep!
A few tid-bits Byte - 8 bits Nybble - 4 bits
Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
13
Digital Logic
  • Electronic representations of Boolean logic
    functions
  • Can be represented in a Truth Table
  • Lists the outputs for all the possible inputs

Inputs Outputs

2 inputs
Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
14
Basic Logic Gates
Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
15
Inverter Gate
  • Also called a NOT Gate
  • Can be written as A or A

A
A
Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
16
AND Gate
  • If all the inputs are 1, then the output is 1
  • Can be written
  • A B
  • AB

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
17
OR Gate
  • If any of the inputs are 1, then the output is 1
  • Written
  • A B

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
18
The Little Circle
  • Inverts the output
  • Acts exactly like the Inverter Gate
  • Visually looks like


Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
19
NAND and NOR Gates
A B
A B
AB
A B
Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
20
The Little Circle
  • What if the inverter circle is before the logic
    gate?
  • Invert the input instead!

21
More than two inputs?
  • Truth table still includes all combinations of
    inputs
  • Works only for AND and OR
  • NAND and NOR does not work
  • not associative recall CMPE16 Mini-Course

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
22
More than two inputs?
  • Example Three inputs

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
23
Practice Problems
  • Create a truth table for the following logic
    function and diagram
  • a. Y (AB)(C(AB))
  • b.

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
24
Assignment
  • Convert the following decimal numbers to binary
  • a. 34 b. 28 c. 17 d. 51 e. 90
  • Convert the following binary numbers to decimal
  • a. 101101 b. 010011 c. 011110
  • d. 110111 e. 111111 f. 1010101

Lecture Material by Prof. A. Di Blas and A.
Carey, Slides by J. Yong
25
Assignment Continued
  • Create a truth table for the following logic
    functions
  • a. F(A, B, C) (A C)(A B)(B C)
  • b. F(X, Y, Z) XZ (ZY)((XYZ))

26
Assignment Continued
  • Create a truth table for the following logic
    network shown below
  • a.

A
Z
B
C
27
Assignment Continued
  • b.

A B
Y
C D
Write a Comment
User Comments (0)
About PowerShow.com