Top Banner
Chapter 11 Chapter 11 CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS
29

Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Aug 08, 2015

Download

Education

Atush Jain
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Chapter 11Chapter 11

CODES, CONVERTERS, COMPARATORS, AND LOGIC

OPERATION PROCESSING CIRCUITS

Page 2: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Lesson 1

Decimal Number Codes

Page 3: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Outline• BCD (8421) code• Excess 3-Code BCD Code• 7536 code• 2421 code• 5421 code

Page 4: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

yypmax pmax ––1 1 ×××××××× ww00pmax pmax ––1 1 + y+ ypmax pmax ––22 ××××××××

ww00pmax pmax ––2 2 ×××××××× yypmax pmax ––33 x wx w00

pmax pmax ––3 3

++………………. + . + yy22 ×××××××× ww002 2 + y+ y11 ×××××××× ww00

1 1

++ yy00 ×××××××× ww0000 , , …………………………. (1). (1)

General Formula N = sum of the yp (Base)p

Page 5: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Place value and base (weight)Place value and base (weight)

�� p = place of the digit = 0, 1, 2, p = place of the digit = 0, 1, 2, ……., (pmax ., (pmax –– 3), (pmax 3), (pmax –– 2) or (pmax 2) or (pmax –– 1), from right 1), from right to leftto left

�� pmax = maximum the number of places pmax = maximum the number of places used in the representation andused in the representation and

�� w0 = base (basic weight)w0 = base (basic weight)

�� y = 0 or 1 in binary formy = 0 or 1 in binary form

Page 6: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

8421 code Place value and base 8421 code Place value and base (weight)(weight)

�� At place = 3, weight is 8At place = 3, weight is 8

�� At place = 2, weight is 4At place = 2, weight is 4

�� At place = 1, weight is 2At place = 1, weight is 2

�� At place = 0, weight is 4At place = 0, weight is 4

�� At each place weight = wAt each place weight = w0pp

�� w0 = base (basic weight) = 2w0 = base (basic weight) = 2

Page 7: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

8421 code Place value and base 8421 code Place value and base (weight)(weight)

�� At place = 4, weight is 10At place = 4, weight is 10

�� At place = 5, weight is 20At place = 5, weight is 20

�� At place = 6, weight is 40At place = 6, weight is 40

�� At place = 7, weight is 80At place = 7, weight is 80

�� w0 = base (basic weight) = 2w0 = base (basic weight) = 2

Page 8: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Outline• BCD Code• Excess 3-Code BCD Code• 7536 code• 2421 code• 5421 code

Page 9: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Excess 3-Code (XS-3) BCD Code

• Start not from 0 but from 0011• Formula is N = 3 + yypmax pmax ––1 1 ×××××××× ww00

pmax pmax ––1 1 + + yypmax pmax ––22 ×××××××× ww00

pmax pmax ––2 2 ×××××××× yypmax pmax ––33 x wx w00pmax pmax

––3 3 ++………………. + . + yy22 ×××××××× ww002 2 + y+ y11 ×××××××× ww00

1 1 ++yy00 ×××××××× ww00

00 , , …………………………. (2). (2)•• y = 0 or 1 in binary formy = 0 or 1 in binary form

Page 10: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

XSXS--3 code Place value and base 3 code Place value and base (weight)(weight)

�� At place = 3, weight is 8At place = 3, weight is 8

�� At place = 2, weight is 4At place = 2, weight is 4

�� At place = 1, weight is 2At place = 1, weight is 2

�� At place = 0, weight is 4At place = 0, weight is 4

�� At each place weight = wAt each place weight = w0pp

�� w0 = base (basic weight) = 2w0 = base (basic weight) = 2

Page 11: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

XSXS--3 code Place value and base 3 code Place value and base (weight)(weight)

�� At place = 4, weight is 10At place = 4, weight is 10

�� At place = 5, weight is 20At place = 5, weight is 20

�� At place = 6, weight is 40At place = 6, weight is 40

�� At place = 7, weight is 80At place = 7, weight is 80

�� At each place weight = wAt each place weight = w0pp

�� w0 = base (basic weight) = 2w0 = base (basic weight) = 2

Page 12: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Start from 0011• XS-3 codes are 0011bxs3, 0100bxs3, 0101bxs3,

0110bxs3, 0111bxs3, 1000bxs3, 1001bxs3, 1010bxs3, 1011bxs3 and 1100b for 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 for ten decimal numbers, respectively.

• A feature of this code is that for each decimal number is self-complementing. Complement of 0 is 9. Similarly XS-3 code for 0 is 0011 and for 9 it is 1100. Complement of 1 is 8. Similarly XS-3 code for 0 is 0100 and for 8 it is 1011

Page 13: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Excess 3 code conversion by 4-bit Adder for A3A2A1A0 BCD number

F.A F.AF.AF.A

S3 S2 S1 S0

Cy3 Cy2 Cy1 Cy0 Cy-1

0

A3 0 A2 0 A1 1 A0 1

Page 14: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Outline• BCD Code• Excess 3-Code BCD Code• 7536 code• 2421 code• 5421 code

Page 15: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

7536 Code

• Formula is N = yy7 7 ×××××××× ww77 + y+ y66 ×××××××× ww66+ yy55 ××××××××ww55 + + yy44 ×××××××× ww4 4 + y+ y3 3 ×××××××× ww33 + y+ y22 ×××××××× ww22

+ + yy11×××××××× ww11 + + yy00 ×××××××× ww0 0

00 , , ……………… (3)(3)

Page 16: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

7536 Code

�� At place = 3, weight is 7At place = 3, weight is 7

�� At place = 2, weight is 5At place = 2, weight is 5

�� At place = 1, weight is 3At place = 1, weight is 3

�� At place = 0, weight is At place = 0, weight is ––66

�� y = 0 or 1y = 0 or 1

Page 17: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

7536 Code

�� At place = 4, weight is 10 At place = 4, weight is 10 ×××××××× ww0

�� At place = 5, weight is 10 At place = 5, weight is 10 ×××××××× ww1

�� At place = 6, weight is 10 At place = 6, weight is 10 ×××××××× ww2

�� At place = 7, weight is 10 At place = 7, weight is 10 ×××××××× ww3

Page 18: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Outline• BCD Code• Excess 3-Code BCD Code• 7536 code• 2421 code• 5421 code

Page 19: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

2421 Code

• Formula is N = yy7 7 ×××××××× ww77 + y+ y66 ×××××××× ww66+ yy55 ××××××××ww55 + + yy44 ×××××××× ww4 4 + y+ y3 3 ×××××××× ww33 + y+ y22 ×××××××× ww22

+ + yy11×××××××× ww11 + + yy00 ×××××××× ww0 0

00 , , ……………… (3)(3)

Page 20: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

2421 Code

�� At place = 3, weight is 2At place = 3, weight is 2

�� At place = 2, weight is 4At place = 2, weight is 4

�� At place = 1, weight is 2At place = 1, weight is 2

�� At place = 0, weight is 1At place = 0, weight is 1

�� y = 0 or 1y = 0 or 1

Page 21: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

2421 Code

�� At place = 4, weight is 10 At place = 4, weight is 10 ×××××××× ww0

�� At place = 5, weight is 10 At place = 5, weight is 10 ×××××××× ww1

�� At place = 6, weight is 10 At place = 6, weight is 10 ×××××××× ww2

�� At place = 7, weight is 10 At place = 7, weight is 10 ×××××××× ww3

Page 22: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Outline• BCD Code• Excess 3-Code BCD Code• 7536 code• 2421 code• 5421 code

Page 23: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

5421 Code

• Formula is N = yy7 7 ×××××××× ww77 + y+ y66 ×××××××× ww66+ yy55 ××××××××ww55 + + yy44 ×××××××× ww4 4 + y+ y3 3 ×××××××× ww33 + y+ y22 ×××××××× ww22

+ + yy11×××××××× ww11 + + yy00 ×××××××× ww0 0

00 , , ……………… (3)(3)

Page 24: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

5421 Code

�� At place = 3, weight is 2At place = 3, weight is 2

�� At place = 2, weight is 4At place = 2, weight is 4

�� At place = 1, weight is 2At place = 1, weight is 2

�� At place = 0, weight is 1At place = 0, weight is 1

�� y = 0 or 1y = 0 or 1

Page 25: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

5421 Code

�� At place = 4, weight is 10 At place = 4, weight is 10 ×××××××× ww0

�� At place = 5, weight is 10 At place = 5, weight is 10 ×××××××× ww1

�� At place = 6, weight is 10 At place = 6, weight is 10 ×××××××× ww2

�� At place = 7, weight is 10 At place = 7, weight is 10 ×××××××× ww3

Page 26: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Summary

Page 27: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

Decimal Number representation codes

� 8241 code� XS-3 code� 7536, 2421 and 5421 codes

Page 28: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

End of Lesson 1

Decimal Number Codes

Page 29: Digital Design: CODES, CONVERTERS, COMPARATORS, AND LOGIC OPERATION PROCESSING CIRCUITS

Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006

THANK YOU