Assignment 14
Assignment 14
A binary number is a number expressed in the base-2 numeral system or binary numeral
system, a method of mathematical expression which uses only two symbols: typically, "0"
(zero) and "1" (one). Gray code after Frank Gray, is an ordering of the binary numeral
system such that two successive values differ in only one bit.
Boolean expression for conversion of binary to gray code for n-bit:
Gn = Bn
Gn-1 = Bn XOR Bn-1
G0 = B1 XOR B0
Design 6-bit Binary to Gray code converter
Procedure
1. Take 6 input pin and keep it setting unchanged.
2. Take 6 output pin and keep it setting unchanged.
3. Take 5 XOR gate from Gates section and change their numbers of input to ‘2’.
4. Connect all the line as shown in the picture.
Discussion
1. B5 is MSB and B0 is LSB in binary side and G5 is MSB and G0 is LSB in gray code side.
2. When both B0 and B1 is 0 or 1 then G0 will give 1 as output.
3. When any one of B0 and B1 is 1 and other one is 0 then G0 will give 0 as output.
4. Similarly, B1 and B2, B2 and B3, etc. will work except the MSB.
5. MSB of binary will be same and will be copy to MSB of gray code