Digital compass (cont’d)
Detecting a change in compass direction
- 4 bits change from 0001 to 0011 to 0010 to 0110 to 0100 …
- always alternating between one bit on and two bits on
Parity tree can detect difference between one and two bits being asserted
- XOR tree of four bits (one TTL SSI package)
- output must change at least once for every change in orientation
1100 -> 0100 -> 01100 -> 1 -> 0