b.sc cs-ii-u-1.5 digital logic circuits, digital component

22
Digital Logic Circuits, Digital Component and Data Representation Course: B.Sc-CS-II Subject: Computer Organization And Architecture Unit-1 1

Upload: rai-university

Post on 07-Aug-2015

33 views

Category:

Education


2 download

TRANSCRIPT

Page 1: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Digital Logic Circuits, Digital Component and Data Representation

Course: B.Sc-CS-II Subject: Computer Organization And

Architecture Unit-1

1

Page 2: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Basic Definitions

• Binary Operators– AND

z = x • y = x y z=1 if x=1 AND y=1

– ORz = x + y z=1 if x=1 OR y=1

– NOTz = x = x’ z=1 if x=0

• Boolean Algebra– Binary Variables: only ‘0’ and ‘1’ values– Algebraic Manipulation

Page 3: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Boolean Algebra Postulates

• Commutative Lawx • y = y • x x + y = y + x

• Identity Elementx • 1 = x x + 0 = x

• Complementx • x’ = 0 x + x’ = 1

Page 4: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Boolean Algebra Theorems• Duality– The dual of a Boolean algebraic expression is obtained

by interchanging the AND and the OR operators and replacing the 1’s by 0’s and the 0’s by 1’s.

– x • ( y + z ) = ( x • y ) + ( x • z )– x + ( y • z ) = ( x + y ) • ( x + z )

• Theorem 1– x • x = x x + x = x

• Theorem 2– x • 0 = 0 x + 1 = 1

Applied to a valid equation produces a valid equation

Page 5: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Boolean Algebra Theorems

• Theorem 3: Involution– ( x’ )’ = x ( x ) = x

• Theorem 4: Associative & Distributive– ( x • y ) • z = x • ( y • z ) ( x + y ) + z = x + ( y + z )– x • ( y + z ) = ( x • y ) + ( x • z )

x + ( y • z ) = ( x + y ) • ( x + z )

• Theorem 5: De Morgan– ( x • y )’ = x’ + y’ ( x + y )’ = x’ • y’– ( x • y ) = x + y ( x + y ) = x • y

• Theorem 6: Absorption– x • ( x + y ) = x x + ( x • y ) = x

Page 6: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Boolean Functions[1]

• Boolean ExpressionExample: F = x + y’ z

• Truth TableAll possible combinationsof input variables

• Logic Circuit

x y z F

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1xyz

F

Page 7: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Algebraic Manipulation

• Literal:A single variable within a term that may be complemented or not.

• Use Boolean Algebra to simplify Boolean functions to produce simpler circuits

Example: Simplify to a minimum number of literals

F = x + x’ y ( 3 Literals)

= x + ( x’ y )

= ( x + x’ ) ( x + y )

= ( 1 ) ( x + y ) = x + y ( 2 Literals)

Distributive law (+ over •)

Page 8: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Complement of a Function

• DeMorgan’s Theorm

• Duality & Literal Complement

CBAF CBAF

CBAF

CBAF CBAF

CBAF

Page 9: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Canonical Forms[1]

• Minterm– Product (AND function)– Contains all variables– Evaluates to ‘1’ for a

specific combination

Example

A = 0 A B C

B = 0 (0) • (0) • (0)

C = 01 • 1 • 1 = 1

A B C Minterm

0 0 0 0 m0

1 0 0 1 m1

2 0 1 0 m2

3 0 1 1 m3

4 1 0 0 m4

5 1 0 1 m5

6 1 1 0 m6

7 1 1 1 m7

Page 10: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Canonical Forms[1]

• Maxterm– Sum (OR function)– Contains all variables– Evaluates to ‘0’ for a

specific combination

Example

A = 1 A B C

B = 1 (1) + (1) + (1)

C = 10 + 0 + 0 = 0

A B C Maxterm

0 0 0 0 M0

1 0 0 1 M1

2 0 1 0 M2

3 0 1 1 M3

4 1 0 0 M4

5 1 0 1 M5

6 1 1 0 M6

7 1 1 1 M7

Page 11: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Canonical Forms[1]

• Truth Table to Boolean FunctionCBAF CBA CBA ABCA B C F

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 1

Page 12: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Canonical Forms• Sum of Minterms

• Product of Maxterms

ABCCBACBACBAF 7541 mmmmF

)7,5,4,1(F

CABBCACBACBAF

CABBCACBACBAF

CABBCACBACBAF

))()()(( CBACBACBACBAF 6320 MMMMF

(0,2,3,6)F

Page 13: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Standard Forms• Sum of Products (SOP)

ABCCBACBACBAF BA

BA

CCBA

)1(

)(

AC

BBAC

)(

CB

AACB

)(

)()()( BBACCCBAAACBF

ACBACBF

Page 14: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Standard Forms• Product of Sums (POS)

CABBCACBACBAF

)( CCBA

)( AACB

)( BBCA )()()( AACBCCBABBCAF

CBBACAF

))()(( CBBACAF

Page 15: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Two - Level Implementations• Sum of Products (SOP)

• Product of Sums (POS)

B’C

FB’A

AC

AC

FB’A

B’C

ACBACBF

))()(( CBBACAF

Page 16: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Logic Operators

• AND

• NAND (Not AND)

xy

x • y

xy

x • y

x y AND0 0 00 1 01 0 01 1 1

x y NAND0 0 10 1 11 0 11 1 0

Page 17: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Logic Operators

• OR

• NOR (Not OR)

xy

x + y

xy

x + y

x y OR0 0 00 1 11 0 11 1 1

x y NOR0 0 10 1 01 0 01 1 0

Page 18: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Logic Operators

• XOR (Exclusive-OR)

• XNOR (Exclusive-NOR) (Equivalence)

xy

x Å yx y + x y

xy

x Å yx � y

x y + x y

x y XOR0 0 00 1 11 0 11 1 0

x y XNOR0 0 10 1 01 0 01 1 1

Page 19: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Logic Operators

• NOT (Inverter)

• Buffer

x x

x x

x NOT

0 1

1 0

x Buffer

0 0

1 1

Page 20: B.sc cs-ii-u-1.5 digital logic circuits, digital component

Multiple Input Gates

Page 21: B.sc cs-ii-u-1.5 digital logic circuits, digital component

De Morgan’s Theorem on Gates

• AND Gate– F = x • y F = (x • y) F =

x + y

• OR Gate– F = x + y F = (x + y) F =

x • y

Change the “Shape” and “bubble” all lines

Page 22: B.sc cs-ii-u-1.5 digital logic circuits, digital component

References

1. Computer Organization and Architecture, Designing for performance by William Stallings, Prentice Hall of India.

2. Modern Computer Architecture, by Morris Mano, Prentice Hall of India.

3. Computer Architecture and Organization by John P. Hayes, McGraw Hill Publishing Company.

4. Computer Organization by V. Carl Hamacher, Zvonko G. Vranesic, Safwat G. Zaky, McGraw Hill Publishing Company.