JESUS CHRIST IS THE ONLY TRUE GOD
Math calculator

One Complement Calculator

Calculate the one’s-complement bit pattern of an unsigned integer within an explicit bit width.

Your calculationPrivate in your browser
Report a result

Start with a worked example

Open the worked example for One’s complement. The example starts with Unsigned integer = 13, Bit width = 8.

One Complement Calculator formula

One’s complement flips each bit within the selected width.

Inputs and units

Inputs and example values for One Complement Calculator
InputFormat / rangeExample
Unsigned integerWhole number, min 013
Bit widthWhole number, min 1, max 648

Worked example

The values listed in Inputs and units give 242 for One’s complement.

One’s complement
242
Binary
11110010

Results and assumptions

Change Unsigned integer from 13 to 15 and keep the other example inputs fixed. The updated answer is 240 (One’s complement).

Fix an input or unexpected result

Unsigned integer is required. Enter unsigned integer using the format and bounds in the input table. Zero and an empty field are different: use zero only if it is allowed and represents your data.

See how to check a result or report an issue.