BIT103 ยท 2080 ยท 10 marks
Define BCD code. Design BCD to Excess-3 Code converter with truth table and logic diagram.
Define BCD code. Design BCD to Excess-3 Code converter with truth table and logic diagram.[10]
Quick answer
BCD (Binary Coded Decimal) is a binary encoding of decimal digits where each decimal digit (0-9) is represented by its 4-bit binary equivalent. Only 10 out of 16 possible 4-bit combinations (0000 to 1001) are valid; the remaining six (1010 to 1111) are invalid/don't-care states.
BCD to Excess-3 Code Converter
Definition of BCD Code
| Decimal | BCD (8-4-2-1) |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| ... | ... |
| 9 | 1001 |
Definition of Excess-3 Code
Excess-3 (XS-3) is a non-weighted, self-complementing code obtained by adding 3 (0011) to each BCD digit.
Truth Table: BCD to Excess-3
Let BCD inputs be A, B, C, D (A = MSB, D = LSB) Let Excess-3 outputs be W, X, Y, Z (W = MSB, Z = LSB)
| Decimal | A | B | C | D | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
| 2 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 3 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| 4 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
| 6 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| 7 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| 8 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
| 9 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
| 10-15 | - | - | - | - | X | X | X | X |
(X = don't care)
K-Map Simplification
Output W (minterms: 5,6,7,8,9 + don't cares 10-15)
CD
AB 00 01 11 10
00 | 0 | 0 | 0 | 0 |
01 | 0 | 1 | 1 | 1 |
11 | X | X | X | X |
10 | 1 | 1 | X | X |
W = A + BC + BD
Output X (minterms: 1,2,3,4,9 + don't cares 10-15)
CD
AB 00 01 11 10
00 | 0 | 1 | 1 | 1 |
01 | 1 | 0 | 0 | 0 |
11 | X | X | X | X |
10 | 0 | 1 | X | X |
X = B'C + B'D + BC'D'
(Simplified: X = BC'D' + B'C + B'D)
Output Y (minterms: 0,3,4,7,8 + don't cares 10-15)
CD
AB 00 01 11 10
00 | 1 | 0 | 1 | 0 |
01 | 1 | 0 | 1 | 0 |
11 | X | X | X | X |
10 | 1 | 0 | X | X |
Y = 1 at minterms 0, 3, 4, 7 and 8. On the map those cells fill the columns CD = 00 and CD = 11 for every value of AB, so the two groups are C'D' and CD, and the don't-care row AB = 11 is absorbed into them.
Y = CD + C'D'
(Y = C XNOR D = CD + C'D')
Output Z (minterms: 0,2,4,6,8 + don't cares 10-15)
CD
AB 00 01 11 10
00 | 1 | 0 | 0 | 1 |
01 | 1 | 0 | 0 | 1 |
11 | X | X | X | X |
10 | 1 | 0 | X | X |
Z = D'
Simplified Boolean Expressions
| Output | Expression |
|---|---|
| W | A + BC + BD |
| X | B'C + B'D + BC'D' |
| Y | CD + C'D' |
| Z | D' |
Logic Diagram
Inputs: A, B, C, D, with inverters supplying B', C' and D'
W = A + BC + BD
B ---+--[AND]--- BC ---+
C ---+ |
B ---+--[AND]--- BD ---+--[OR]--- W
D ---+ |
A ---------------------+
X = B'C + B'D + BC'D'
B' --+--[AND]--- B'C ---+
C ---+ |
B' --+--[AND]--- B'D ---+--[OR]--- X
D ---+ |
B ---+ |
C' --+--[AND]-- BC'D' --+
D' --+
Y = CD + C'D'
C ---+--[AND]--- CD ----+
D ---+ +--[OR]--- Y
C' --+--[AND]--- C'D' --+
D' --+
Z = D'
D -------[NOT]--------- Z
Only two-level AND-OR logic is needed for each output, and the inverters that produce B', C' and D' are shared across all four output networks. Y is the XNOR of C and D, so a single XNOR gate can replace its two AND gates and the OR gate.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.