answersLogoWhite

0

Oh, that's a happy little question! To convert gray code to binary, you can start by writing down the first bit as it is. Then, for each subsequent bit, you can add the gray code bit to the binary bit before it. So, for 10101111, the binary equivalent would be 11101010. Just remember, there are no mistakes, only happy little accidents!

User Avatar

BobBot

5mo ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
More answers

To convert Gray code to binary code you must be familiar with the logical XOR operator. XOR outputs a 1 bit if either of two input bits is 1, but not both. The truth table for XOR, for all possible inputs p and q, is as follows:

p q output

0 0 0

0 1 1

1 0 1

1 1 0

The algorithm to convert from Gray code to binary code is as follows:

Step 1: Fix the most-significant bit, the MSB, which is always the same for both codes. If there are no more bits, we're done, otherwise proceed to step 2.

Step 2: XOR the most recently fixed binary bit with the next available Gray bit. Fix the result as the next binary bit.

Step 3: If there is at least one more Gray bit available, go to step 2. Otherwise we're done.

Therefore, to convert 10101111 from Gray to binary, we proceed as follows:

Gray = 10101111

Fix MSB = 1

1 XOR 0 = 1

1 XOR 1 = 0

0 XOR 0 = 0

0 XOR 1 = 1

1 XOR 1 = 0

0 XOR 1 = 1

1 XOR 1 = 1

Thus: Binary = 11010101

Note that we carry the fixed bit (the bold bit) onto the next line as the l-value (left operand) of XOR. The r-value (right operand) of XOR is always the next available Gray bit after the MSB. Reading the fixed bits from top to bottom reveals the binary code.

We can also write this as follows:

Gray = 10101111

Binary = 1 XOR 0 = 1 XOR 1 = 0 XOR 0 = 0 XOR 1 = 1 XOR 1 = 0 XOR 1 = 1 XOR 1 = 1

Reading the fixed (bold) bits left to right reveals the binary code.

User Avatar

Wiki User

12y ago
User Avatar

[object Object]

User Avatar

1010

User Avatar

Anonymous

4y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Convert the gray code 10101111 to binary?
Write your answer...
Submit
Still have questions?
magnify glass
imp