Binary to gray
Gray code (also called reflected binary code) is a binary numeral system where two successive numbers differ in only one bit.
This minimizes errors in digital systems, especially in mechanical encoders and error correction
MSB Rule: The most significant bit (MSB) of the Gray code is the same as the MSB of the binary number.
Gn=Bn
where Bn= MSB of Binary, Gn = MSB of Gray
Other Bits Rule: Each next Gray code bit is obtained by XOR of the current binary bit with the previous binary bit.
Gi=Bi+1⊕Bi
Truth Table
K-Map
Boolean expression
Logic Circuit