SOLVETUTORMATH SOLVER

Instrument MI-01-392 · Mathematics

One's Complement Calculator

Flipping every bit is the same as subtracting from 15. Enter a 4-bit number, and this sheet returns its one's complement.

Instrument MI-01-392
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01392

One's complement

10

result = 15 − n

The working Every figure verified twice
  1. result = 15 − 5 = 10
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The one's complement of a binary number flips every one of its bits — every 1 becomes a 0, and every 0 becomes a 1. For a 4-bit number, that flip has a clean arithmetic shortcut: it's exactly the same as subtracting the number from the largest possible 4-bit value, 15 (1111), since flipping a bit and subtracting it from 1 amount to the identical thing at each individual place.

One's complement was an early scheme computers used to represent negative numbers, before two's complement (covered on this site's own separate page) became the standard instead — one's complement has the quirk of representing zero two different ways (0000 and 1111), a wrinkle two's complement was specifically designed to avoid.

Complementing a number twice always returns the original value exactly — flipping every bit and then flipping them all back is a fully reversible operation, with nothing lost along the way.

n=15n\overline{n} = 15 - n
n — the 4-bit number (0 to 15) being complemented; result — its one's complement, every bit flipped.
  • Enter a 4-bit number (0 to 15) into the 4-bit number field.
  • Read One's complement: every bit flipped, found directly as 15 minus the number.
  • Apply the calculation a second time to the result and confirm it returns the original number.

Worked example — complementing 5

5 in binary is 0101; flipping every bit gives 1010, which is 10 in decimal. Checked arithmetically: 15−5=10, matching the bit-flip exactly.

0 (0000), with every bit off, flips to 15 (1111), every bit on — the two extremes of the 4-bit range. 15 (1111), with every bit on, flips back to 0 (0000), confirming that complementing twice always restores the original value.

Questions

What is a one's complement?

A binary number with every one of its bits flipped — 1s become 0s and 0s become 1s. For a 4-bit number, this is arithmetically the same as subtracting the number from 15, the largest value 4 bits can hold.

Why was one's complement used to represent negative numbers?

It offered an early way to represent negative values in binary, before two's complement became the standard instead — one's complement has the drawback of representing zero two different ways, which two's complement was specifically designed to eliminate.

What happens if you complement a number twice?

It returns to its original value exactly — flipping every bit and then flipping them all back again is a fully reversible operation, with nothing lost in either direction.

How is this different from the Two's Complement page on this site?

One's complement simply flips every bit (equivalent to 15 minus the number for 4 bits); two's complement adds 1 to that result afterward, a small but important difference that avoids one's complement's double representation of zero.

What is the one's complement of 0?

15 — every bit switched on, the opposite extreme of the 4-bit range from 0 itself, where every bit is off.

References