Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views3 pages

CO Lab Exp 4

The document outlines Experiment No. 4 from the Department of Computer Science and Engineering at UIT, Allahabad, focusing on designing and implementing binary to Gray code and Gray to binary converters. It includes the required apparatus, theory behind Gray code, truth tables, logical equations, simplifications, and a logic diagram for the converters. Precautions for circuit assembly and a result verification statement are also provided.

Uploaded by

Anubhav Asthana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

CO Lab Exp 4

The document outlines Experiment No. 4 from the Department of Computer Science and Engineering at UIT, Allahabad, focusing on designing and implementing binary to Gray code and Gray to binary converters. It includes the required apparatus, theory behind Gray code, truth tables, logical equations, simplifications, and a logic diagram for the converters. Precautions for circuit assembly and a result verification statement are also provided.

Uploaded by

Anubhav Asthana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

UIT, ALLAHABAD DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

EXPERIMENT No. 4

Objective: To design and implement a binary to gray and gray to binary converter.

APPARATUS REQUIRED:
S.No. Name of Apparatus Range/Rating Quantity

1 DIGITAL TRAINER KIT ……… 1

2 CONNECTING LEAD ……….. AS PER REQUIREMENT

3 IC’s EXOR 7486 1

4 WIRE CUTTER, 01
POWER SUPPLY FROM TRAINER KIT
Theory:
The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive
values differ in only one bit. The reflected binary code was originally designed to prevent spurious output from
electromechanical switches. Today Gray codes are widely used to facilitate error correction in digital communications such
as digital terrestrial television and some cable TV systems.

Truth Table for Binary to Gray code converter


Decimal Binary Input Gray Output

Decimal B2 B1 B0 G2 G1 G0

0 0 0 0 0 0 0

1 0 0 1 0 0 1

2 0 1 0 0 1 1

3 0 1 1 0 1 0

4 1 0 0 1 1 0

5 1 0 1 1 1 1

6 1 1 0 1 0 1

7 1 1 1 1 0 0
Logical Equations:
G2 = B2B1'B0' + B2B1'B1 + B2B1B0' + B2B1B0
G1 = B2'B1B0' + B2'B1B0 + B2B1'B0' + B2B1'B0
G0 = B2'B1'B0 + B2'B1B0' + B2B1'B0 + B2B1B0'

Simplification:
G2 = B2B1'(B0' + B0) + B2B1(B0' + B0)
= B2B1' + B2B1
= B2(B1' +B1)
= B2
G1 = B2'B1B0' + B2'B1B0 + B2B1'B0' + B2B1'B0

EXP No (4) (RCS - 353)


UIT, ALLAHABAD DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

= B2'B1(B0' + B0) + B2B1'(B0' + B0)


= B2'B1 + B2B1'
= B2 XOR B1
G0 = B2'B1'B0 + B2'B1B0' + B2B1'B0 + B2B1B0'
= B2'(B1'B0 + B1B0') + B2(B1'B0 + B1B0')
= (B1'B0 + B1B0') (B2' + B2)
= (B1'B0 + B1B0')
= B1 XOR B0

Logic Design:

Gray to Binary Code Converter


Truth Table for Binary to Gray code converter
Decimal Gray Input Binary Output
Decimal G2 G1 G0 B2 B1 B0
0 0 0 0 0 0 0
1 0 0 1 0 0 1
2 0 1 0 0 1 1
3 0 1 1 0 1 0
4 1 0 0 1 1 1
5 1 0 1 1 1 0
6 1 1 0 1 0 0
7 1 1 1 1 0 1
Logic Equations:
B2 = G2G1G0' + G2G1G0 + G2G1'G0 + G2G1'G0'
B1 = G2'G1G0 + G2'G1G0' + G2G1'G0 + G2G1'G0'
B0 = G2'G1'G0 + G2'G1G0' + G2G1G0 + G2G1'G0'
Simplification:
B2 = G2G1G0' + G2G1G0 + G2G1'G0 + G2G1'G0'
= G2G1(G0' + G0) + G2G1'(G0 + G0')
= G2G1 + G2G1'
= G2(G1+G1')
= G2
B1 = G2'G1(G0 + G0') + G2G1'(G0 + G0')
= G2'G1 + G2G1'

EXP No (4) (RCS - 353)


UIT, ALLAHABAD DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

= G2 XOR G1
B0 = G2'G1'G0 + G2'G1G0' + G2G1G0 + G2G1'G0'
= G2'(G1'G0 + G1G0') + G2(G1G0 + G1'G0')
= G2'(G1 XOR G0) + G2(G1 XNOR G0) this is of the form A’B+AB’
= G2 XOR G1 XOR G0

Logic Diagram:

Preparation:

 Keep a IC pin diagram with you for proper usage of the IC 7486
 Insert IC 7486 in the Bread board slots
 Make connection as per logic diagram

Result: The circuit is tested and verified with the truth table.

Precaution:

 Use Proper power supply both rating and polarity


 Make correct connection on IC for the input and output
 Use diode with proper polarity, anode to + and cathod to ground
 Ensure power supply is switched off while making connection

EXP No (4) (RCS - 353)

You might also like