One's Complement Calculator
Calculate the one's complement (bitwise NOT) of a binary number. Invert all bits — 0s become 1s and 1s become 0s.
This free online one's complement calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.
Results
One's Complement (Binary)
1e+7
One's Complement (Decimal)
213
How to Use This Calculator
Enter your input values
Fill in all required input fields for the One's Complement Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.
Review your inputs
Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The One's Complement Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
When to Use This Calculator
- •Use the One's Complement Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
- •Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
- •Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
- •Use it to explore the behavior of mathematical functions across a range of inputs.
Related Calculators
AND Calculator
Perform the bitwise AND operation on two numbers. Each output bit is 1 only when both corresponding input bits are 1.
Binary Subtraction Calculator
Subtract two binary numbers using direct borrowing or two's complement addition. Shows the result in binary and decimal.
Bit Shift Calculator
Perform left shift (<<) and right shift (>>) operations on binary numbers. Shift bits left to multiply by powers of 2, right to divide.
Bitwise Calculator
Perform bitwise AND, OR, XOR, NOT, NAND, NOR, and XNOR operations on binary numbers. Shows truth tables and binary results.
Log Base 2 Calculator
Calculate the base-2 logarithm (binary logarithm) of a number. Essential for computer science, information theory, and binary systems.
NOR Calculator
Perform the bitwise NOR (NOT OR) operation. Each output bit is 1 only when both corresponding input bits are 0.
About One's Complement Calculator
The one's complement of a binary number is obtained by flipping every bit: all 0s become 1s and all 1s become 0s. Mathematically, for a w-bit number n, the one's complement is (2^w − 1) − n. One's complement was historically used as a signed number representation (before two's complement became standard) and is still used in networking (Internet checksum, IP header checksum). The one's complement is also the first step in computing the two's complement (one's complement + 1 = two's complement). This calculator computes the one's complement of any integer at your chosen bit width.
The Math Behind It
Formula Reference
One's Complement
~n = 2^w − 1 − n
Variables: w = bit width, n = input value
Bitwise NOT
Flip every bit: 0 → 1, 1 → 0
Variables: All bits inverted
Worked Examples
Example 1: One's Complement of 42 (8-bit)
Find ~42 in 8 bits.
~42 = 11010101₂ = 213₁₀ (unsigned)
Common Mistakes & Tips
- !Confusing one's complement with two's complement — two's complement adds 1 after flipping.
- !Not specifying bit width — the result depends on how many bits are used.
- !Assuming one's complement gives negative values — it depends on the interpretation (signed vs. unsigned).
Related Concepts
Used in These Calculators
Calculators that build on or apply the concepts from this page:
Frequently Asked Questions
Why is one's complement not used for signed integers anymore?
One's complement has two representations of zero (+0 and −0), which complicates comparison and arithmetic. Two's complement has a unique zero and simpler addition logic.
Embed this calculator on your site
Paste this snippet into your blog, course page, or documentation to drop a live, interactive One's Complement Calculator into your page.
Free to embed — includes a link back to MegaCalc.