Logic circuits

What range of integers can be represented in 8-bit two's complement?

  1. A−128 to +127
  2. B−127 to +127
  3. C0 to 255
Show answer and explanation

Answer: A. −128 to +127

n-bit two's complement can represent values from −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1, so 8 bits cover −128 to +127. There is one more negative value because zero has only one representation. 0 to 255 is the unsigned 8-bit range.

  • A. Correct. −2⁷ to 2⁷ − 1.
  • B. −127 to +127 is the range of representations such as sign-magnitude, where zero has two forms.
  • C. 0 to 255 is the unsigned 8-bit range.
Practice this topic Back to topic

More Logic circuits questions

  1. Why is a carry-lookahead adder fast?
  2. When adding two's complement numbers, which condition indicates that an overflow has occurred?
  3. How many states does a Johnson (twisted-ring) counter made of n flip-flops go through?
  4. What is a typical use of a linear feedback shift register (LFSR), which feeds the XOR of some outputs of a shift register back to its input?
  5. When several open-drain outputs are connected to one signal line with a pull-up resistor, how does the line behave?