Two's complement calculator

In 8-bit two's complement, numbers run from −128 to 127, and −20 is 1110 1100.

Convert
Bits

Two's complement

Type a number

Your result

A-level Computer Science Pro

Get an A or your money back

£119 once

Price rises to £199 on 1 January. Save £80 by joining before then.

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

No VAT is charged. Conditions

Questions people ask

What range does 8-bit two's complement hold?

−128 to 127.

How do I tell if a two's complement number is negative?

Its leftmost bit is 1.

How we work this out

What it does

Convert between denary and two's complement binary, with the steps.

Signed integers in 4, 8, 12 or 16-bit two's complement.

Method

  1. The leftmost bit is worth −2ⁿ⁻¹; the others are ordinary place values.
  2. A negative number is its positive binary with every bit flipped, plus 1.

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms