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

COA Experiment 2

The document outlines an experimental procedure for converting binary code to Gray code and vice versa using basic logic gates. It explains the significance of Gray code in reducing errors during transitions between binary numbers and provides the necessary equipment for the virtual lab. Additionally, it includes truth tables and logical expressions for both conversions, along with questions to assess understanding of the concepts presented.

Uploaded by

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

COA Experiment 2

The document outlines an experimental procedure for converting binary code to Gray code and vice versa using basic logic gates. It explains the significance of Gray code in reducing errors during transitions between binary numbers and provides the necessary equipment for the virtual lab. Additionally, it includes truth tables and logical expressions for both conversions, along with questions to assess understanding of the concepts presented.

Uploaded by

lietoffical111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
ws LLOYD INSTITUTE OF ENGINEERING & TECHNOLOGY | Empowering Through Skills, EXPERMENTAL NO.-2 AIM: Implementation of Binary to Gray and Gray to Binary code conversions, LEARNING OBJECTIVE: To realize the Binary to Gray and Gray to Binary code conversions circuits using basic gates and verify their truth table, EQUIPMENT REQUIRED: For virtual lab 1. PC installed with Internet connection. 2. Printer. RY: Binary Numbers is default way to store numbers, but in many applications binary numbers are difficult to use and a variation of binary numbers is needed. Gray code is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). Gray codes are very useful in the normal sequence of binary numbers generated by the hardware that may cause an error or ambiguity during the transition from one number to the next. So, the Gray code can eliminate this problem easily since only one bit changes its value during any transition between two numbers. Gray codes has property that two successive numbers differ in only one bit because of this property gray code docs the cycling through various states with ‘minimal effort and used in K-maps, error correction, communication et. In computer science many a times we need to convert binary code to gray code and vice versa. This conversion can be done by applying following rules: 1) Binary to Gray conversion: The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given binary code. Other bits of the output gray code can be obtained by Ex-ORing binary code bit at that index and previous index. There are four inputs and four outputs. The input variable are defined as B3, B2, BI, BO and the output variables are defined as G3, G2, G1, GO. From the truth table, combinational circuit is designed, The logical expressions are defined a 53 52 581 BO B2 @ B3 = G2, BI@ B2=G1 YY BO @® B1=G0 cs G2 1 co Binary to Gray Code Converter Circuit ws LLOYD INSTITUTE OF ENGINEERING & TECHNOLOGY | Empowering Through Skills, Truth Table of Binary to Gray conversion Natural-binary code Gray code or 2 cr Bo a a a@ g 2) Gray to binary conversion ‘The Most Significant Bit (MSB) of the binary code is always equal to the MSB of the given binary number. Other bits of the output binary code can be obtained by checking gray code bit at that index. If current gray code bit is 0, then copy previous binary code bit, else copy invert of previous binary code bit, There are four inputs and four outputs. The input variable are defined as G3, G2, G1, GO and the output variables are defined as B3, B2, B1, BO. From the truth table, combinational circuit is designed. The logical expressions are defined as: Go ) >—e Bo G0 ® G1 © G2 © G3= Bo 1 G1@ G2 @ G3=B1 Bt 3 @2 G2@ G3=B2 aa G3 B3 Gray to Binary Code Converter LLOYD INSTITUTE OF ENGINEERING & TECHNOLOGY | Empowering Through Skills, Truth Table of Binary to Gray conversion Gray code Natural-binary code a oe GL 6 BB 2 BL s QUESTIONS: 1) Convert binary number into gray code 100101. 2) Define Reflected binary code. 3) Why do we use binary to gray code converter 4) Why is the Gray code more practical to use when coding the position of a rotating shaft 5).what is significant of MSB and LSB.

You might also like