Date post: | 05-Apr-2018 |
Category: |
Documents |
Upload: | naveed-beigh |
View: | 220 times |
Download: | 0 times |
of 29
8/2/2019 DigDesignCh11L1
1/29
Chapter 11Chapter 11
CODES, CONVERTERS,
COMPARATORS, AND LOGIC
OPERATION PROCESSINGCIRCUITS
8/2/2019 DigDesignCh11L1
2/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Lesson 1
Decimal Number Codes
8/2/2019 DigDesignCh11L1
3/29
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
8/2/2019 DigDesignCh11L1
4/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
yypmaxpmax 11
ww00
pmaxpmax 11 + y+ ypmaxpmax 22
ww00pmaxpmax 22
yypmaxpmax 33 x wx w00pmaxpmax 33
++. +. + yy22
ww0022
+ y+ y11
ww0011
++ yy00 ww0000 ,, . (1). (1)
General Formula N = sum of the yp (Base)p
8/2/2019 DigDesignCh11L1
5/29
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), (pmax3), (pmax 2) or (pmax2) or (pmax 1), from right1), from rightto leftto left
pmax = maximum the number of placespmax = maximum the number of placesused 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
8/2/2019 DigDesignCh11L1
6/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
8421 code Place value and base8421 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
8/2/2019 DigDesignCh11L1
7/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
8421 code Place value and base8421 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
8/2/2019 DigDesignCh11L1
8/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Outline BCD Code
Excess 3-Code BCD Code 7536 code
2421 code
5421 code
8/2/2019 DigDesignCh11L1
9/29
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 + yypmaxpmax 11 ww00pmaxpmax 11 ++
yypmaxpmax 22
ww00pmaxpmax 22
yypmaxpmax 33 x wx w00pmaxpmax
33 ++. +. + yy22 ww0022 + y+ y11 ww00
11 ++
yy00 ww0000 ,, . (2). (2)
y = 0 or 1 in binary formy = 0 or 1 in binary form
8/2/2019 DigDesignCh11L1
10/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
XSXS--3 code Place value and base3 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
8/2/2019 DigDesignCh11L1
11/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
XSXS--3 code Place value and base3 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
8/2/2019 DigDesignCh11L1
12/29
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 decimalnumber 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-3code for 0 is 0100 and for 8 it is 1011
8/2/2019 DigDesignCh11L1
13/29
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
8/2/2019 DigDesignCh11L1
14/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Outline BCD Code
Excess 3-Code BCD Code 7536 code
2421 code
5421 code
8/2/2019 DigDesignCh11L1
15/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
7536 Code
Formula is N = yy77 ww77 + y+ y66 ww66+ yy55 ww55 ++ yy44 ww44 + y+ y33 ww33 + y+ y22 ww22
++ yy11
ww
11 ++
yy
00
ww
00
00
,,
(3)(3)
8/2/2019 DigDesignCh11L1
16/29
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 isAt place = 0, weight is 66
y = 0 or 1y = 0 or 1
8/2/2019 DigDesignCh11L1
17/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
7536 Code
At place = 4, weight is 10At place = 4, weight is 10 ww0
At place = 5, weight is 10At place = 5, weight is 10 ww1
At place = 6, weight is 10At place = 6, weight is 10 ww2
At place = 7, weight is 10At place = 7, weight is 10 ww3
8/2/2019 DigDesignCh11L1
18/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Outline
BCD Code
Excess 3-Code BCD Code 7536 code
2421 code 5421 code
8/2/2019 DigDesignCh11L1
19/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
2421 Code
Formula is N = yy77 ww77 + y+ y66 ww66+ yy55 ww55 ++ yy44 ww44 + y+ y33 ww33 + y+ y22 ww22
++ yy11 ww
11++ yy
00 ww
00
00 ,, (3)(3)
8/2/2019 DigDesignCh11L1
20/29
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
8/2/2019 DigDesignCh11L1
21/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
2421 Code
At place = 4, weight is 10At place = 4, weight is 10 ww0
At place = 5, weight is 10At place = 5, weight is 10 ww1
At place = 6, weight is 10At place = 6, weight is 10 ww2
At place = 7, weight is 10At place = 7, weight is 10 ww3
8/2/2019 DigDesignCh11L1
22/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Outline
BCD Code
Excess 3-Code BCD Code 7536 code
2421 code 5421 code
8/2/2019 DigDesignCh11L1
23/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
5421 Code
Formula is N = yy77 ww77 + y+ y66 ww66+ yy55 ww55 ++ yy44 ww44 + y+ y33 ww33 + y+ y22 ww22
++ yy11 ww
11++ yy
00 ww
00
00 ,, (3)(3)
8/2/2019 DigDesignCh11L1
24/29
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
8/2/2019 DigDesignCh11L1
25/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
5421 Code
At place = 4, weight is 10At place = 4, weight is 10 ww0
At place = 5, weight is 10At place = 5, weight is 10 ww1
At place = 6, weight is 10At place = 6, weight is 10 ww2
At place = 7, weight is 10At place = 7, weight is 10 ww3
8/2/2019 DigDesignCh11L1
26/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Summary
8/2/2019 DigDesignCh11L1
27/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
Decimal Number representationcodes
8241 code XS-3 code
7536, 2421 and 5421 codes
8/2/2019 DigDesignCh11L1
28/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
End of Lesson 1
Decimal Number Codes
8/2/2019 DigDesignCh11L1
29/29
Ch11L1-"Digital Principles and Design", Raj Kamal, Pearson Education, 2006
THANK YOU