Logic circuits

Which is a characteristic of Gray code?

  1. AEach decimal digit is represented by 4 bits
  2. BIt detects errors with a parity bit
  3. COnly one bit changes between adjacent values
Show answer and explanation

Answer: C. Only one bit changes between adjacent values

Gray code changes exactly one bit between adjacent values and can be computed from binary B as B XOR (B >> 1). Because multiple bits never change at once, it avoids reading spurious intermediate values in rotary-encoder position sensing and when passing FIFO pointers between circuits on different clocks. For FIFO pointers, this requires that the pointer advance by one at a time and wrap around with a power-of-two period. Karnaugh map cells are also ordered in Gray code. Encoding each decimal digit in four bits is BCD.

Related calculators

Books on Logic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

More Logic circuits questions

  1. Which correctly describes the operation of a D latch?
  2. What is the state called when a flip-flop receiving an asynchronous signal violates setup or hold time and its output is temporarily neither 0 nor 1?
  3. Which type of sequential circuit (state machine) has outputs determined only by the current state?
  4. Which represents decimal 59 in BCD (binary-coded decimal)?
  5. When is the output of a three-input majority circuit 1?

Comparisons in this topic