I know the basics of the Gray and 84-2-1 code, for example a value like 5 should be 1011 in 84-2-1
8 4 -2 -1
1 0 1 1
8 – 2 – 1 = 5
whereas in Gray Code it should be 101
101 (binary of 5)
add 1 to MSB and sum it all up, ignore carry
111 (Gray Code)
My problem now is what to do if the value to be compute contains decimal fractions.
for another example, a value like 56.23, the entire value in binary is 111000.001 (round up to the nearest thousandths)
if continuing on the logic of Gray Code in which you add 1 to the MSB and ignore the carry flag, the answer should be 100100.001
what about for 84-2-1 code, I did compute the answer of 10111010.01100101, but I’m really uncertain about it.
I hope I was correct but then again you could only go so far with confidence and no way to verify its right or wrong.
VinWind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.