Lab6 Code Conversion Binary To Gray and Gray To Binary
Lab6 Code Conversion Binary To Gray and Gray To Binary
Group No.:
In first part you are required to design and implement a binary to gray and gray to binary code
converter. You will be cascading these two converters thus implementing a binary to gray coder
and decoder (gray to binary).
The next part is the Verilog Modeling and Simulation of the Circuit you implemented in you first
lab.
Objectives:
Lab Instructions
This lab activity comprises three parts, namely Pre-lab, Lab tasks, and Post-Lab Viva session.
The lab report will be uploaded on LMS three days before scheduled lab date. The students will get
hard copy of lab report, complete the Pre-lab task before coming to the lab and deposit it with
teacher/lab engineer for necessary evaluation. Alternately each group to upload completed lab
report on LMS for grading.
The students will start lab task and demonstrate design steps separately for step-wise
evaluation( course instructor/lab engineer will sign each step after ascertaining functional
verification)
Remember that a neat logic diagram with pins numbered coupled with nicely patched circuit will
simplify trouble-shooting process.
After the lab, students are expected to unwire the circuit and deposit back components before
leaving.
The students will complete lab task and submit complete report to Lab Engineer before leaving
lab.
There are related questions at the end of this activity. Give complete answers.
2. In the lab you would be implementing a gray to binary and binary to gray code converter. Make a truth
table for both the codes by filling in the following tables and Simplify the expressions for W,X,Y,Z in
terms of A,B,C,D and vice versa. Also give some applications in which gray code could be used.
W=
X=
Y=
Z=
A=
B=
C=
D=
A
W A
B
X B
C
Y C
D
Z D
Only the following gates are available to you for lab tasks.
Implement the Binary to Gray Code Converter using logic gates. Simulate in Proteus. Show the results to your
Teacher/Lab Engr. What and how many gates did you use? Do not dispatch your hardware. You will need
it in lab task 3.
Realize the Gray to Binary Code Converter using exclusive-OR gates. Simulate in Proteus. Show the results to
your Teacher/ Lab Engr. What and how many gates did you use? Do not dispatch your hardware. You will
need it in lab task 3.
Now cascade the two circuits in series by connecting the outputs of binary-to-gray converter to the inputs of the
gray-to-binary converter. You should be able to get the binary input at output as well. Show the results to your
Teacher/Lab Engr. Use LEDs to show input-output relationship.
Design and simulate the gate-level model of the circuit you patched in task 3. Give the code in the space
provided below.