Binary To Gray
Binary To Gray
Code Converter
Binary to Gray Code Converter
Steps to design the converter
1. Design a converter by the following procedures:
a. Write down the truth table of both input and output bits of the
converter.
b. Apply Karnaugh Map to look for the minimized logic expression for the
output bits.
c. Implement the logic gates by using Circuit Maker.
Example:
For Binary to Gray Code Converter, binary bits are input and gray code
bits are output. So first write the truth table for binary bits and gray code.
Then k-map for the all bits of gray code, find the simplified expression for
each bit of gray code. Then design the logical circuit.
Truth Table
K-Map for each bit of Gray code
Gray to Binary Converter
Truth Table
Dec G3 G2 G1 G0 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 1
3 0 0 1 1 0 0 1 0
2 0 0 1 0 0 0 1 1
6 0 1 1 0 0 1 0 0
7 0 1 1 1 0 1 0 1
5 0 1 0 1 0 1 1 0
4 0 1 0 0 0 1 1 1
12 1 1 0 0 1 0 0 0
13 1 1 0 1 1 0 0 1
15 1 1 1 1 1 0 1 0
14 1 1 1 0 1 0 1 1
10 1 0 1 0 1 1 0 0
11 1 0 1 1 1 1 0 1
9 1 0 0 1 1 1 1 0
K MAP For B3
G1’G0’ G1’G0 G1G0 G1G0’
0 0 0 0
G3’G2’
0 0 0 0
G3’G2
1 1 1 1
G3G2
1 1 1 1
G3G2’
B3 = G3
K MAP For B2
G1’G0’ G1’G0 G1G0 G1G0’
0 0 0 0
G3’G2’
1 1 1 1
G3’G2
0 0 0 0
G3G2
1 1 1 1
G3G2’
B1 G3 G 2 G1
K MAP For B1
G1’G0’ G1’G0 G1G0 G1G0’
0 0 1 1
G3’G2’
1 1 0 0
G3’G2
0 0 1 1
G3G2
1 1 0 0
G3G2’
B1 G3 G 2 G1
K MAP For B0
G1’G0’ G1’G0 G1G0 G1G0’
0 1 0 1
G3’G2’
1 0 1 0
G3’G2
0 1 0 1
G3G2
1 0 1 0
G3G2’
B 0 G3 G 2 G1 G 0
B3 G3
B2 G2
B1 G1
G0
B0
Assignment-14
Design the Converter for
1. Binary to BCD
2. BCD to Gray
3. BCD to Binary
4. BCD to Excess