You are on page 1of 5

CIT-EEE-09EE48-LAB MANUAL EXP NO: 09

EXPERIMENT NO : DATE : AIM:

DESIGN OF COMBINATIONAL CIRCUIT FOR CODE CONVERSION

To design a combinational circuit for the following code conversions i) Gray to binary conversion ii) Binary to Gray conversion iii) BCD to excess 3 code conversion using NAND gates only iv) Excess 3 to BCD code conversion using NAND gates only APPARATUS REQUIRED: . Sl. NAME OF THE No. APPARATUS IC 7400 1. 2. 3. 4. 5. 6. 7. Theory: Gray Code: Gray code is an unweighted ( that is, no specific weights is assigned to each bit position ) and is not an arithmetic code. The important feature of the gray code is that it exhibits only a single bit change from one code word to next in sequence. This property is important in many applications, such as shaft position encoders, where error susceptibility increases with the number of bit changes between adjacent numbers in a sequence. Excess 3 Code: Excess three codes is an example of self complementing codes. Such codes have the property that the 9s complement of decimal number is obtained directly by changing 1s to 0s and 0s to1s in the code. This is also an unweighted code where each code combination is obtained from the corresponding binary value plus 3. Excess 3 is a Self Complementing Code: For example, decimal 395 is represented in excess three code s 0110 1100 1000. The 9s complement 604 is represented as 1001 0011 0111, which is simply obtained by complementing each bit of the code ( as with 1s complement of binary numbers). IC 7410 IC 7486 Resistors LED Bread board Connecting wires

TYPE Two input NAND gate Three input NAND gate Two input Ex-or gate 330 4

QUANTITY 3 1 1 4 1 1 1set

CIT-EEE-09EE48-LAB MANUAL EXP NO: 09

Binary To Gray Code Conversion: The binary code (B3B2B1B0) is to be converted to Gray code (G3G2G1G0) by Looking at the truth table and arriving at the following Boolean algebraic equation G3 = B3 G2 = B2 xor B3 G1= B1 xor B2 G0= B0 xor B1 Gray To Binary Conversion: B3 = G3 B2 = G3 xor B3 B1= G2 xor B2 B0= G1 xor B1 Circuit Diagram: Binary to Gray Code Conversion:

Gray to Binary Code Conversion:

CIT-EEE-09EE48-LAB MANUAL EXP NO: 09

BCD to Excess 3 Code converter:

Excess 3 to binary code converter:

CIT-EEE-09EE48-LAB MANUAL EXP NO: 09

Truth Table: Decimal Binary B3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 B2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 B1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 B0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Gray Code G3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 G2 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 G1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 G0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 Excess 3 code E3 0 0 0 0 0 1 1 1 1 1 E2 0 1 1 1 1 0 0 0 0 1 E1 1 0 0 1 1 0 0 1 1 0 E0 1 0 1 0 1 0 1 0 1 0

CIT-EEE-09EE48-LAB MANUAL EXP NO: 09

Viva Questions: 1. What is truth table? 2. What is the need for code conversion? 3. What is gray code? Mention it application. 4. What is self complementing code? Give example 5. What is excess 3 code? 6. What is the need to realize excess 3 code using NAND gate only? 7. Is 2421 is a self complementing code? Explain. 8. What is ASCII? Mention its significance.

Result: Thus the combinational circuit for the following code conversions i) Gray to binary conversion ii) Binary to Gray conversion iii) BCD to excess 3 code conversion using NAND gates only iv) Excess 3 to BCD code conversion using NAND gates only were designed and their output logics were verified with that of truth table

You might also like