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 covers −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1, so 8 bits span −128 to +127. Zero has a single representation (00000000), which leaves one extra negative value. Edge values need care—for example, −128 × −1 overflows because +128 cannot be represented. 16 bits cover −32,768 to +32,767 and 32 bits about ±2.1 billion. 0–255 is the same 8 bits interpreted as unsigned.

  • 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.

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. 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?

Comparisons in this topic