Talk:Gray code: Difference between revisions

(→‎D encoding: Interesting task)
Line 5:
::Wow. Reading is hard. I'm definitely changing the Java version. --[[User:Mwn3d|Mwn3d]] 13:04, 18 March 2011 (UTC)
:::The only tricky bit in decoding is that you need the previously decoded bit to decode the next one. That makes everything just that ''little'' bit messier (as evidenced by the many strategies shown for decoding!) though it does mean that everything admits a rather nice decode loop if you're cunning enough. (Decoding tables? O RLY? SRSLY?) –[[User:Dkf|Donal Fellows]] 14:47, 18 March 2011 (UTC)
::::When I use a previously decoded bit in the exclusive or, I get the wrong answer. When I use the undecoded bits, I get the right answer. Unless I am doing something horribly wrong: The leftmost bit is unchanged. After that, every bit is the binary difference (exclusive or) of two adjacent undecoded bits. --[[User:Rdm|Rdm]] 14:53, 18 March 2011 (UTC)
 
== Decoding a bitstream ==
6,962

edits