0% found this document useful (0 votes)
10 views9 pages

Code Converter

The document discusses various code converters used to transform binary codes, including Binary to BCD, BCD to Excess-3, and BCD to Gray code converters. Each section outlines the conversion process, truth tables, and the logic circuits designed based on simplified boolean expressions derived from Karnaugh maps. Additionally, it provides a problem statement for designing a combinational circuit to convert 8421 code to its Excess-3 equivalent, along with a truth table and simplified expressions for output variables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views9 pages

Code Converter

The document discusses various code converters used to transform binary codes, including Binary to BCD, BCD to Excess-3, and BCD to Gray code converters. Each section outlines the conversion process, truth tables, and the logic circuits designed based on simplified boolean expressions derived from Karnaugh maps. Additionally, it provides a problem statement for designing a combinational circuit to convert 8421 code to its Excess-3 equivalent, along with a truth table and simplified expressions for output variables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

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, gray code, excess-3 code, etc. Different
codes are used for different types of digital applications.

2.6.1 Binary to BCD code converter


For BCD code, 0 to 9 numbers represent the equivalent binary numbers. For the
numbers above 10, LSB of a decimal number is represented by its equivalent binary
number and MSB of a decimal number is also represented by their equivalent binary
numbers.
For example, the BCD code of 12 is represented as

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
The digital logic circuit for Binary to BCD code converter is designed from the simplified
output expressions obtained from karnaugh map.

Figure 2.6.2 Binary to BCD Code Converter


[Source: https://www.electrically4u.com/code-converter-types-truth-table-and-logic-circuits/]

2.6.2 BCD to Excess-3 code converter


For this conversion process, 4-bit BCD code is considered as input, which is converted
into 4-bit Excess-3 code. Since 4-bit is considered for BCD code, the output is
produced only for the inputs from 0 to 9.
The truth table shown below has only the valid 4-bit BCD codes. For the remaining
input combinations, the output cannot be predicted. So they are don’t care outputs.
From the truth table, the minterms are obtained for each outputs(E3, E2, E1, E0).
E3 = ∑m(5, 6, 7, 8, 9), E2 = ∑m(1, 2, 3, 4, 9), E1 = ∑m(0, 3, 4, 7, 8), E0 = ∑m(0, 2, 4, 6,
8,) the minterms of each output in plotted in k-map and simplified
expression is obtained.
Figure 2.6.3 Truth Table BCD to Excess-3 code
converter
The combinational logic circuit for BCD code to Excess-3 code conversion
is drawn from the obtained boolean expressions.

Figure 2.6.4 BCD to Excess-3 code converter


[Source: https://www.electrically4u.com/code-converter-types-truth-table-and-logic-circuits/]

2.6.3 BCD TO GRAY CODE CONVERTER


The truth table having the conversion from BCD code to gray code is shown below. Since
the BCD code has only 4 bits, a total of 9 BCD digits have been considered. The output
is unpredictable for other input combinations.
From the minterms of each output G3, G2, G1 and G0, the karnaugh map is implemented
to simplify the function.
The code converter circuit for BCD to gray code is drawn as below from the obtained
expression.
Figure 2.6.5 Truth Table BCD To Gray Code Converter
Figure 2.6.6 BCD To Gray Code Converter
CODE CONVERTERS: Code converter is a combinational circuit that accepts a
particular code at the input and generates an equivalent desired code at its output.

Problem: Design a combinational circuit that converts an 8421 code to its Excess-3
equivalent.
Solution: The block diagram of the 8421 to Xs-3 code is as shown below. The circuit has
four input variables A, B, C and D and 4 output variables w, x, y and z.

A w
B x
Input Variables Code Converter
C y Output variables
Circuit
D z

The truth table is as shown below.

Input variables Output variables


A B C D w x y z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0    
1 0 1 1    
1 1 0 0    
1 1 0 1    
1 1 1 0    
1 1 1 1    

The reader is advised to develop K map for each output variable and simplify it and
verify that the following are the simplified expression for the output variables.

w = A +B.D +B.C
x = B.D +B.C + BC. D
y = CD +C .D
z= D
The logic circuit for the above set of expression is as shown below.
A B C D

Z
Design a combinational circuit that converts
1. An 8421 code to 842 1 code.
2. Excess–3 code to 842 1 code.
3. 8421 to excess –3 code.
4. Binary to BCD (which were discussed in the theory class)
5. Excess 3 to binary. (which were discussed in the theory class).

You might also like