You are on page 1of 3

The Islamia University of Bahawalpur

University College of Engineering & Technology


CE-214 Digital Logic Design (3rd term)
LAB EXPERIMENT NO.09

Name: ------------------------------------------------------- Roll No. --------------------------

Lab Instructor Signature: ----------------------------------- Date: ---------------------------

To Design Four bit Gray code converter


PEFORMANCE OBJECTIVES
Upon successful completion of this experiment, the student will be able to know
♦ The basic operation of BCD to Gray Code Converter.
♦ Verify the truth table of BCD to Gray code Converter.

EQUIPMENT REQUIRED
♦ Digital trainer with adapter
♦ X-OR gate (7486 2-input Quad)
♦ OR gate (7432 2-input Quad)
♦ Bread board
♦ LED

DISCUSSION

♦ CODE CONVERSION
Gray belongs to a class of codes known as minimum change code, in which a number
changes by only bit as it proceeds from one number to the next. Hence this code is not
useful for arithmetic operations. This code finds extensive use for shaft encoders, in some
types of analog-to-digital converters, etc
The bit combinations 4-bit binary code and its equivalent bit combinations of gray code
are listed in the table in Figure. The four bits of binary numbers are designated as
A, B, C, and D, and gray code bits are designated as W, X, Y, and Z. For transformation
of binary numbers to gray, A, B, C, and D are considered as inputs and W, X, Y, and Z
are considered as outputs.
.
Four Bit Binary Inputs Four Bit Gray Code
A B C D W X Y Z
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 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0

From Karnaugh map we get Boolean function for the outputs

W =A
X = AB + A B = A ⊕B
Y = BC + BC = B ⊕C
Z = C D +C D = C ⊕D

A B C D

W X Y Z
PRELIMINARY PROCEDURE
♦ Insert XOR gate IC (7432 2-input Quad) in the bread board
♦ Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
♦ Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED
♦ Assemble the circuit on bread board as shown above
♦ Verify the above table.

You might also like