Professional Documents
Culture Documents
Aim:To study and implementation of 4 bit gray to binary and binary to gray
code conversion.
Apparatus:
1) Trainer kit
2) Patch chords
3) Power supply
Theory:
The availability of a large variety of codes for the same discrete
elements of information results in the use of different codes by different
digital system. It is sometimes necessary to use the output of one system as
the input to another. A conversion circuit must be inserted between the two
systems if each uses different codes for the same information. Thus, a code
converter is a circuit that makes the two systems compatible even though
each uses a different binary code.
Code Converter: A logic circuit used to convert information coded in one
form to another form is called code converter. And the logical circuit which
converts binary code to equivalent gray code is known as binary to gray
code converter.
A binary code represents data using a two-symbol system. The two-symbol
system used is often "0" and "1" from the binary number system. n bits are
required to represent in 2n quantities in binary code.
The Gray code is a non weighted code. The successive gray code differs in
one bit position only that means it is a unit distance code. It is also referred
as cyclic code. It is also a reflective code. Gray codes are used in many
applications in design of digital systems. The logic diagram for binary code to
gray code converter. Here we are using IC 74LS86 XOR gate IC’s for
implementing the logic diagram.
Logic diagram:
1) The inputs are B0, B1, B2 and B3 connected to the logic switches.
2) The outputs are G0, G1, G2 and G3 connected to the led indication.
3) Now switch on the trainer kit.
4) By applying the binary inputs through the logic switches observe the
outputs G0, G1, G2 and G3 led indication.
5) Note down the outputs in a truth table.
Experiment No: 6 Page No:25
Ref: GNITS/DSD/6 G.N.I.T.S – ETM DEPARTMENT
Truth table:
Logic diagram:
Experiment No: 6 Page No:26
Ref: GNITS/DSD/6 G.N.I.T.S – ETM DEPARTMENT
1) The inputs are G0, G1, G2 and G3 connected to the logic switches.
2) The outputs are B0, B1, B2 and B3 connected to the led indication.
3) Now switch on the trainer kit.
4) By applying the gray inputs through the logic switches observe the
outputs B0, B1, B2 and B3 led indication.
5) Note down the outputs in a truth table.
Truth table:
Result: Hence the Binary to Gray and Gray to Binary code conversion is
verified.
Reasoning Questions