Professional Documents
Culture Documents
Mct-212: Digital Logic Design
Mct-212: Digital Logic Design
CODE CONVERTERS
0000 = 0011 [o_0]?
CODE CONVERTERS
In the digital domain, data or information is represented by a combination of 0s and 1s. A code is basically the pattern of these 0s and 1s used to represent the data.
Code converters are a class of combinational digital circuits that are used to convert one type of code in to another.
CODE CONVERTERS
Some of the most prominently used codes in digital systems are Natural Binary Sequence, Binary Coded Decimal, Excess-3 Code, Gray Code, ASCII Code etc. Like any combinational digital circuit, a code converter can be implemented by using a circuitry of AND, OR and NOT gates.
BINARY-to-EXCESS-3 CONVERSION
In excess-3 code, a small value of bias (3) is added to the binary numbers. The representation shifts each number by a value of three. when the sum of two XS-3 digits is greater than 9, the carry bit of a four bit adder will be set high.
BINARY-to-EXCESS-3 CONVERSION
The truth table shows the conversion parameters. A,B,C,D represent a binary/BCD number, while the output w,x,y,z represent the excess-3 code.
A
0 0 0 0
B
0 0 0 0
C
0 0 1 1
D
0 1 0 1
w
0 0 0 0
x
0 1 1 1
y
1 0 0 1
z
1 0 1 0
0
0 0 0 1 1
1
1 1 1 0 0
0
0 1 1 0 0
0
1 0 1 0 1
0
1 1 1 1 1
1
0 0 0 0 1
1
0 0 1 1 0
1
0 1 0 1 0
BINARY-to-EXCESS-3 CONVERSION
AB
CD
00
01
11
10
A
0 0 0 0
B
0 0 0 0
C
0 0 1 1
D
0 1 0 1
w
0 0 0 0
00 01
11 10
0 0
0 1 X
0 1 X X
0 1 X
0
0 0 0
1
1 1 1
0
0 1 1
0
1 0 1
0
1 1 1
X
1
1
1
0
0
0
0
0
1
1
1
= + +
BINARY-to-EXCESS-3 CONVERSION
AB
CD
00
01
11
10
A
0 0 0 0
B
0 0 0 0
C
0 0 1 1
D
0 1 0 1
x
0 1 1 1
00 01
11 10
0 1
1 0 X
1 0 X X
1 0 X
0
0 0 0
1
1 1 1
0
0 1 1
0
1 0 1
1
0 0 0
X
0
1
1
0
0
0
0
0
1
0
1
= + +
BINARY-to-EXCESS-3 CONVERSION
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
0 1 1 0 0 1 1 0 0 1
0
0 0 0 0 0 0 0 1 1 1
0
0 0 0 1 1 1 1 1 1 1
0
0 1 1 1 1 0 0 0 0 1
0
1 1 0 0 1 1 0 0 1 1
1
1 1 1 1
0
1 1 1 1
1
0 0 1 1
1
0 1 0
1
1 1 1 1
1
0 0 0 0
1
1 1 0 0
0
0 1 1 0
ANY QUESTIONS?
Anyone willing to present? Time allowed : 5 mins Topic : Any Bonus Points : +3
REFERENCES
Chapter no 4: Combinational Logic
Digital Logic Design by Morris Mano