review

18
KU College of Engineering Elec 204: Digital Systems Design 1 Review D: n bit binary number D = (d n-1 ∙ ∙ ∙ d 1 d 0 ) 2 If D is an unsigned binary number D = (2 n-1 d n-1 +∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 If D is a sign-magnitude binary number D = + (2 n-2 d n-2 +∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 if d n-1 =0 = – (2 n-2 d n-2 +∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 if d n-1 =1 (–D) = (d n-1 d n-2 ∙ ∙ ∙ d 1 d 0 ) 2 If D is in two`s complement system D = (-2 n-1 d n-1 + 2 n-2 d n-2 + ∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 (–D) = 2 n – D = (2 n -1) – D + 1 = (d n-1 d n-2 ∙ ∙ ∙ d 1 d 0 ) 2 + 1

Upload: bryant

Post on 25-Jan-2016

27 views

Category:

Documents


1 download

DESCRIPTION

Review. D: n bit binary number D = (d n-1 ∙ ∙ ∙ d 1 d 0 ) 2 If D is an unsigned binary number D = ( 2 n-1 d n-1 + ∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 If D is a sign-magnitude binary number D = + ( 2 n-2 d n-2 + ∙ ∙ ∙ 2 1 d 1 + 2 0 d 0 ) 10 if d n-1 =0 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Review

KU College of EngineeringElec 204: Digital Systems Design 1

Review

• D: n bit binary number

D = (dn-1 ∙ ∙ ∙ d1 d0)2

• If D is an unsigned binary number

D = (2n-1 dn-1+∙ ∙ ∙ 21 d1 + 20 d0)10

• If D is a sign-magnitude binary number

D = + (2n-2 dn-2+∙ ∙ ∙ 21 d1 + 20 d0 )10 if dn-1=0

= – (2n-2 dn-2+∙ ∙ ∙ 21 d1 + 20 d0 )10 if dn-1=1

(–D) = (d’n-1 dn-2 ∙ ∙ ∙ d1 d0)2

• If D is in two`s complement system

D = (-2n-1 dn-1+ 2n-2 dn-2 + ∙ ∙ ∙ 21 d1 + 20 d0)10

(–D) = 2n – D = (2n-1) – D + 1 = (d’n-1 d’

n-2 ∙ ∙ ∙ d’1 d’

0)2 + 1

Page 2: Review

KU College of EngineeringElec 204: Digital Systems Design 2

• Two’s complement multiplication– Shift and two’s complement addition except for the last

step. Remember MSB represent (-2n-1)-5 1011

x –3 1101 0000 initial partial product, which is zero. 1011 11011 partial product 0000 111011 partial product 1011 11100111 0101 shifted-and-negated1 00001111

Review

Page 3: Review

KU College of EngineeringElec 204: Digital Systems Design 3

BCD: Binary-Coded Decimal

• 0-9 encoded with their 4-bit unsigned binary representation (0000 – 1001). The codewords (1010 – 1111) are not used.

• 8-bit byte represent values from 0 to 99.

• BCD Addition:

Carry 1 1

448 0100 0100 1000

+ 489 0100 1000 1001

937 Sum 1001 1101 10001

Add 6 + 0110 + 0110

BCD sum 1 0011 1 0111

BCD result 1001 0011 0111

Review

Page 4: Review

KU College of EngineeringElec 204: Digital Systems Design 4

2. Combinational Logic Circuits

• Boolean Algebra– switching algebra

– deals with Boolean values --- 0, 1

• Positive-logic convention– analog voltages LOW, HIGH 0, 1

• Negative logic --- seldom used• Signal values denoted by variables

(X, Y, FRED, etc.)

Page 5: Review

KU College of EngineeringElec 204: Digital Systems Design 5

Boolean operators

• Complement: X (opposite of X)• AND: X Y• OR: X + Y

Page 6: Review

KU College of EngineeringElec 204: Digital Systems Design 6

• Literal: a variable or its complement– X, X, FRED, CS_L

• Expression: literals combined by AND, OR, parentheses, complementation– X+Y

– P Q R

– A + B C

– ((FRED Z) + CS_L A B C + Q5) RESET

• Equation: Variable = expression– P = ((FRED Z) + CS_L A B C + Q5)

RESET

Page 7: Review

KU College of EngineeringElec 204: Digital Systems Design 7

Basic Logic Gates

Page 8: Review

KU College of EngineeringElec 204: Digital Systems Design 8

Theorems

Page 9: Review

KU College of EngineeringElec 204: Digital Systems Design 9

More Theorems

Page 10: Review

KU College of EngineeringElec 204: Digital Systems Design 10

Duality

• Swap 0 & 1, AND & OR– Result: Theorems still true

• Why?– Each axiom (T1-T5) has a dual (T1-T5

• Counterexample:X + X Y = X (T9)X X + Y = X (dual)

X + (X Y) = X (T9)X (X + Y) = X (dual)(X X) + (X Y) = X (T8)

Page 11: Review

KU College of EngineeringElec 204: Digital Systems Design 11

N-variable Theorems

Page 12: Review

KU College of EngineeringElec 204: Digital Systems Design 12

DeMorgan Symbol Equivalence

Page 13: Review

KU College of EngineeringElec 204: Digital Systems Design 13

Similar for OR

Page 14: Review

KU College of EngineeringElec 204: Digital Systems Design 14

Complement of a function

• F1 = XYZ’ + X’Y’Z

• F1’ = (XYZ’ + X’Y’Z)’ = (XYZ’)’ (X’Y’Z)’

= (X’+Y’+Z) (X+Y+Z’)

• Complement = take dual +complement each literal

• Dual of F1 = (X+Y+Z’) (X’+Y’+Z)

• F1’ = (X’+Y’+Z) (X+Y+Z’)

Page 15: Review

KU College of EngineeringElec 204: Digital Systems Design 15

• Standard Forms:– Product and sum terms

• Minterm: A product term in which all variables appear exactly once, either complemented or not (2n minterms)– For a two variable function, minterms are

• X’Y’, X’Y, XY’, XY

• m0 , m1 , m2 , m3

• Maxterms: A sum term that contains all variables in complemented or uncomplemented form

• X+Y, X+Y’, X’+Y, X’+Y’

• M0 , M1 , M2 , M3

Page 16: Review

KU College of EngineeringElec 204: Digital Systems Design 16

Page 17: Review

KU College of EngineeringElec 204: Digital Systems Design 17

• Alternative representations– F(X,Y,Z) = X’Y’Z’ + X’YZ’ +XY’Z + XYZ

= m0 + m2 + m5 + m7

=

– F’(X,Y,Z) = X’Y’Z + X’YZ + XY’Z’ + XYZ’

= m1 + m3 + m4 + m6

=

– F(X,Y,Z) = (m1 + m3 + m4 + m6)’ = m1’ m3’ m4’ m6’

= M1 M3 M4 M6

=

)7,5,2,0(m

)6,4,3,1(m

)6,4,3,1(M

Page 18: Review

KU College of EngineeringElec 204: Digital Systems Design 18

• Maxterms are seldom used, we’ll use minterms rather.

• Properties of minterms:– There are 2n minterms. 1-1 with binary numbers 0-(2n-1)

– Every Boolean function can be expressed as sum of minterms.

– Absent minterms belong to complement function

– A function that include all minterms is equal to logic 1.