To convert a gray code to a binary code, lets consider the formula below:
G7 is the most significant bit and G0 is the least significant bit for the gray code.
B7 is the most significant bit and B0 is the least significant bit for the binary code.
Step 1:
B7 becomes G7
Step 2:
B6 becomes the addition of B7 and G6 (B7 + G6)
Step 3:
B5 becomes the addition of B6 and G5 (B6 + G5)
Step 4:
B4 becomes the addition of B5 and G4 (B5 + G4)
...and the process continues till the last bit.
B7 is the most significant bit and B0 is the least significant bit for the binary code.
Step 1:
B7 becomes G7
Step 2:
B6 becomes the addition of B7 and G6 (B7 + G6)
Step 3:
B5 becomes the addition of B6 and G5 (B6 + G5)
Step 4:
B4 becomes the addition of B5 and G4 (B5 + G4)
...and the process continues till the last bit.
Examples of conversion from Gray Code to Binary Code
No comments:
Post a Comment