Combinational Logic Combinational Logic: the Outputs Depend on the Present Values of Inputs. in Other Words, They Are Logic Combinations of the Inputs. Sequential Logic: the Outputs Depend Not Only on the Present but

Topics: Hamming code, Parity, Error detection and correction Pages: 13 (1828 words) Published: February 16, 2013
EE 205 Lecture Notes

2012

Combinational Logic
Combinational Logic: The outputs depend on the present values of inputs. In other words, they are logic combinations of the inputs. Sequential Logic: The outputs depend not only on the present but also on the past inputs. Problem Statement

Truth Table

min. number of gates min. number of inputs to gates

Simplification

min. propagation time min. number of interconnections

Implementation

type of gates

Adders
Half-adder performs addition of two bits. Full-adder performs addition of three bits.

Half-adder Inputs x 0 0 1 1 y 0 1 0 1 Outputs C 0 0 0 1 S 0 1 1 0 x y S C

S  xy  xy  x  y C  x y

Feza Kerestecioğlu, K.H.Ü.

1

EE 205 Lecture Notes

2012

Adders
Half-adder x y

x y

S C

S  xy  xy C  x y

S

C

x y

S

x y

S C

C

S  xy  xy   (1, 2)   (0, 3)  ( x  y )( x  y)

S    (0, 3)  xy  xy  xy  C

Adders
Full-adder Inputs x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 Outputs C 0 0 0 1 0 1 1 1 S 0 1 1 0 1 0 0 1 x y z S z x y C x yz 00 x 0 1 1 y 01 11 10 1 1 1 x yz 00 x 0 1 y 01 11 10 1 1 1 1

z S  xyz  xyz  xyz  xyz

z C  xy  yz  xz

Feza Kerestecioğlu, K.H.Ü.

2

EE 205 Lecture Notes

2012

Adders
Full-adder can also be implemented with half-adders: 1. Add x and y by a half-adder 2. Add z to the output of Step 1. 3. OR the carry outputs of Step 1 and 2.

x y

S1

S

HA

C1

HA

C2

C

z

S  ( x  y)  z  ( xy  xy)  z  ( xy  xy) z  ( xy  xy) z  ( xy  xy) z  ( x  y)( x  y) z  xyz  xyz  ( xy  xy) z  xyz  xyz  xyz  xyz

C  xy  ( x  y) z  xy  ( xy  xy) z  xy  xyz  xyz  xy  xyz  xyz  xyz  xyz  xy  ( x  x) yz  ( y  y) xz  xy  yz  xz

Subtractors
Half-subtractor performs subtraction of one bit from another. Full-subtractor performs subtraction of sum of two bits from a third one.

Half-subtractor Inputs x 0 0 1 1 y 0 1 0 1 Outputs B 0 1 0 0 D 0 1 1 0 x y D B

D  xy  xy  x  y B  x  y

Feza Kerestecioğlu, K.H.Ü.

3

EE 205 Lecture Notes

2012

Subtractors
Full-subtractor xyz Inputs Outputs x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 B 0 1 1 1 0 0 0 1 D 0 1 1 0 1 0 0 1 z x y D1 D z D  xyz  xyz  xyz  xyz z B  xy  yz  xz x y yz 00 x 0 1 1 01 11 10 1 1 1 x yz 00 x 0 1 y 01 11 10 1 1 1 1

HS

B1

HS

B2

B

Code Conversion
Example: BCD to Excess-3 conversion CD 00 AB BCD Excess-3 A B C D w x y z 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 X X X X   10 00 01 0 0 CD 00 AB 00 0 01 1

01 11 10 0 1 X 1 0 1 X X 0 1 X X

01 11 10 1 0 X 1 1 0 X X 1 0 X X

11 X 1

11 X 10 0

w  A  BD  BC
CD 00 AB 00 1 01 1 01 11 10 0 0 X 0 1 1 X X 0 0 X X

x  BD  BC  BCD
CD 00 AB 00 1 01 1 01 11 10 0 0 X 0 0 0 X X 1 1 X X

11 X 10 1

11 X 10 1

y  CD  CD

z  D

Feza Kerestecioğlu, K.H.Ü.

4

EE 205 Lecture Notes

2012

Code Conversion
Example: BCD to Excess-3 conversion

w  A  BD  BC  A  B(C  D) x  BD  BC  BCD  B(C  D)  B(C  D)  B  (C  D) y  CD  CD  C  D z  D A w x

B C

y D z

Code Conversion
Example: Gray code to binary conversion Gray 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 Binary y 0 0 1 1 0 0 1 z 0 1 0 1 0 1 0 A B C A 0 0 0 0 1 1 1 1

xA
BC 00 0 1 1 1 01 11 10 1 1 A BC 00 0 1 1 01 11 10 1 1 1

A B C x

y  AB  AB

 A B

y  ABC  ABC  ABC  ABC  ( A  B)C  ( A  B)C  ( A  B)  C
x y z

1 1

Feza Kerestecioğlu, K.H.Ü.

5

EE 205 Lecture Notes

2012

EX-OR, Equivalence and Error Handling
EX-OR function: x  y  xy  xy   (1, 2)

x0  x
x 1  x
x1  x2    xn1  xn   xi
i 1 n

xx 0
x  x  1

x  y  x  y  ( x  y)...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Informal Logic Research Paper
  • Essay about logic
  • Logic Essay
  • LOGIC Research Paper
  • LOGIC Essay
  • Essay about Logic
  • Essay about Application of Logic in Everyday Living
  • Peter Singer Logic Essay

Become a StudyMode Member

Sign Up - It's Free