Code Converter
Code Converter
The Code converter is used to convert one type of binary code to another. There are
different types of binary codes like BCD code(Binary-Coded Decimal), gray code,
excess-3 code, etc. Different codes are used for different types of digital applications.
The following truth table shows the conversion between the binary code input and the
BCD code output. As you see from the table, the 4-bit binary number is converted into
5-bit BCD code. Decimal code is added in the table to understand the equivalence of
Binary and BCD code.
The converter has 5 outputs D0, D1, D2, D3 and D4. From the truth table,
the minterms can be obtained for each output.
D4 = ∑m(10, 11, 12, 13, 14, 15)
D3 = ∑m(8, 9)
D2 = ∑m(4, 5, 6, 7, 14, 15)
D1 = ∑m(2, 3, 6, 7, 12, 13)
D0 = ∑m(1, 3, 5, 7, 9, 11, 13, 15)
The minterms are plotted in the karnaugh map and the simplified boolean expressions are
obtained. Learn, How to minimize a boolean function using K-map
Figure 2.6.1 Truth Table – Kmap –Binary to BCD Code Converter
[Source: https://www.electrically4u.com/code-converter-types-truth-table-and-logic-circuits/]
The digital logic circuit for Binary to BCD code converter is designed from the
simplified output expressions obtained from karnaugh map.
G3 G2 G1 G0 B3 B2 B1 B0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
1 0 0 0 1 1 1 1
1 0 0 1 1 1 1 0
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1 0 1 0
LOGIC DIAGRAM: GRAY CODE TO BINARY CONVERTOR
B3 = G3