The document describes how to construct a Gray code. It explains that a 1-bit Gray code has two code words 0 and 1, and an n-bit Gray code is constructed by writing the first half of the (n-1)-bit Gray code with a 0 appended and the second half with the (n-1)-bit Gray code reversed and a 1 appended. It also provides an example of converting between binary and Gray codes by XORing adjacent bits.
The document describes how to construct a Gray code. It explains that a 1-bit Gray code has two code words 0 and 1, and an n-bit Gray code is constructed by writing the first half of the (n-1)-bit Gray code with a 0 appended and the second half with the (n-1)-bit Gray code reversed and a 1 appended. It also provides an example of converting between binary and Gray codes by XORing adjacent bits.
The document describes how to construct a Gray code. It explains that a 1-bit Gray code has two code words 0 and 1, and an n-bit Gray code is constructed by writing the first half of the (n-1)-bit Gray code with a 0 appended and the second half with the (n-1)-bit Gray code reversed and a 1 appended. It also provides an example of converting between binary and Gray codes by XORing adjacent bits.
representing decimal numbers 0 and 1 resp. An n-bit (n≥2) Gray code will have first 2(n-1) Gray code of (n-1) bits written in order with a leading 0 appended. The last 2(n-1) Gray codes will be equal to the Gray code words of (n-1) bit Gray code written in reverse order( assuming a mirror placed between first 2(n-1) and last 2(n-1) Gray codes) with a leading 1 appended. Construction Gray code
Start with the most significant bit of the binary
number. Copy this bit as the MSB of the gray code number. Xor the MSB of the binary to the next adjacent bit of the binary number. Continue Xor ,each bit of the binary to the next bit to its right to get the gray code for that position as shown in the next slide Conversion From Binary to Gray Cont… Direct Conversion From Gray to Binary