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
| Input | Format / range | Example |
|---|---|---|
| Unsigned integer | Whole number, min 0 | 13 |
| Bit width | Whole number, min 1, max 64 | 8 |
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.
