Skip to content
Get started

Where does this Gray codeword sit?

The 8-bit reflected binary Gray code lists all 256 words so that consecutive words differ in exactly one bit; index kk maps to the word k ^ (k >> 1). At which index kk (in decimal) does the word 10110110 appear?

Show hints (2)+
  1. Write gi=ki⊕ki+1g_i = k_i \oplus k_{i+1} and solve for kk starting at the top bit.
  2. Each bit of kk is the XOR of all Gray bits at or above it.

Answer

Reveal answer →

219

Create a free account to see the full worked solution and track your progress.

Interview format: Prop Trading

Related questions