One's Complement Calculator
Add the number and click on the “Calculate” button to find its one’s (1’s) complement.
One's Complement Calculator
This 1’s complement calculator helps to find the complement of 1’s for the decimal, binary, or hex numbers system. Convert the numbers from these systems to their equivalent one complement by flipping all the bits i.e., 0’s to 1’s and 1’s to 0’s.
One’s Complement (Definition):
It’s a value that is calculated by inverting bits in the signed binary representation of the given number.
One's Complement Symbol:
One complement of a number is represented as ‘~’ which is also known as the bitwise operator.
How to Find One’s Complement?
You can calculate 1’s complement of a binary numeral by two methods:
2.1 Manual Calculations
- Convert the given number (decimal or hex) to its equivalent binary form
- Invert all the bits in the calculated binary number to find the one’s complement
2.2 Calculate Online
Access our “One’s Complement Calculator” and start calculation for 1’s complement frequently by only adding numbers.
Solved Examples (Ones Complement):
Example 01:
Find the binary to one’s complement representation for the given number:
\(\left(1010001010111\right)_{2}\)
Solution (step by step):
Step 01: Write the given number
\(\left(1010001010111\right)_{2}\)
Step 02: Find 1’s Complement
Invert all the bits in the number i.e., 0’s to 1’s and 1’s to 0’s
\(\left(1010001010111\right)_{2} = \left(0101110101000\right)_{2}\)
Example 02:
Calculate the 16-bit 1’s complement of the given number:
- Decimal: 123
Solution:
Step 01:
Convert the given decimal number to the binary form
\(\dfrac{123}{2}\)
- Sub-steps:
- 123 ÷ 2 = 61, remainder 1
- 61 ÷ 2 = 30, remainder 1
- 30 ÷ 2 = 15, remainder 0
- 15 ÷ 2 = 7, remainder 1
- 7 ÷ 2 = 3, remainder 1
- 3 ÷ 2 = 1, remainder 1
- 1 ÷ 2 = 0, remainder 1
Step 02: Write all remainder starting from the bottom and ending at the top in the format “Left to Right”
\(\left(1111011\right)_{2}\)
Step 03: Find one’s complement
Flip all the bits in the above number
\(\left(1111011\right)_{2} = \left(0000100\right)_{2}\)
Step 04: Write the calculated complement value as a 16-bit representation
\(\left(0000 0000 0000 0100\right)_{2}\)
Example 03:
Convert the hexadecimal number ‘FA’ to 1’s complement notation:
Solution:
Step 01: Write the Binary Equivalent of the Given Numbers
\(F = \left(15\right)_{2} = \left(1111\right)_{2}\)
\(A = \left(10\right)_{2} = \left(1010\right)_{2}\)
Step 02: Invert All Bits to Find One’s Complement
\(\left(1010\right)_{2} = \left(0101\right)_{2}\)
One’s Complement Table:
| Decimal | Binary | 1's Complement | Hexadecimal |
|---|---|---|---|
| 1 | 0001 | 1110 | 1 |
| 2 | 0010 | 1101 | 2 |
| 3 | 0011 | 1100 | 3 |
| 4 | 0100 | 1011 | 4 |
| 5 | 0101 | 1010 | 5 |
| 6 | 0110 | 1001 | 6 |
| 7 | 0111 | 1000 | 7 |
| 8 | 1000 | 0111 | 8 |
| 9 | 1001 | 0110 | 9 |
| 10 | 1010 | 0101 | A |
| 11 | 1011 | 0100 | B |
| 12 | 1100 | 0011 | C |
| 13 | 1101 | 0010 | D |
| 14 | 1110 | 0001 | E |
| 15 | 1111 | 0000 | F |
| 16 | 10000 | 01111 | 10 |
| 17 | 10001 | 01110 | 11 |
| 18 | 10010 | 01101 | 12 |
| 19 | 10011 | 01100 | 13 |
| 20 | 10100 | 01011 | 14 |
| 21 | 10101 | 01010 | 15 |
| 22 | 10110 | 01001 | 16 |
| 23 | 10111 | 01000 | 17 |
| 24 | 11000 | 00111 | 18 |
| 25 | 11001 | 00110 | 19 |
| 26 | 11010 | 00101 | 1A |
| 27 | 11011 | 00100 | 1B |
| 28 | 11100 | 00011 | 1C |
| 29 | 11101 | 00010 | 1D |
| 30 | 11110 | 00001 | 1E |
| 31 | 11111 | 00000 | 1F |
| 32 | 100000 | 011111 | 20 |
| 33 | 100001 | 011110 | 21 |
| 34 | 100010 | 011101 | 22 |
| 35 | 100011 | 011100 | 23 |
| 36 | 100100 | 011011 | 24 |
| 37 | 100101 | 011010 | 25 |
| 38 | 100110 | 011001 | 26 |
| 39 | 100111 | 011000 | 27 |
| 40 | 101000 | 010111 | 28 |
| 41 | 101001 | 010110 | 29 |
| 42 | 101010 | 010101 | 2A |
| 43 | 101011 | 010100 | 2B |
| 44 | 101100 | 010011 | 2C |
| 45 | 101101 | 010010 | 2D |
| 46 | 101110 | 010001 | 2E |
FAQs:
Why is it called 1’s complement?
When you add the 1’s complement to the original number, you get all 1’s. This is why it is called ones complement.
How to convert -52 (base 10) to binary 8-bit one's complement?
Step 01: Convert the given decimal number to binary: In binary system, 52 is written as
\(\left(110100\right)_{2}\), ignoring the negative sign.
Step 02: Find 1’s complement: Inverting all the bits,
\(\left(110100\right)_{2} = \left(001011\right)_{2}\)
In 8-bit representation, the above complement is given as:
\(\left(0000 1011\right)_{2}\)
What is the range of the ones complement?
One complement of a binary numeral can only be represented within the range
\(-\left(2^{\left(N-1\right)}\right)\) to \(\left(2^{\left(N-1\right)}\right)\).
What is the 1's complement of hexadecimal number B?
- The hexadecimal number is equal to 11 when converted to decimal system
- The binary equivalent of 11 is \(\left(1011\right)_{2}\)
- One complement of \(\left(1011\right)_{2}\) is \(\left(0100\right)_{2}\)
Reference:
Wikipedia: Number representation, end-around borrow, Negative zero, Avoiding negative zero.
Geek For Geek: 1’s complement of a binary number, Addition of two negative numbers.
Tutorial Points: 1’s Complement of a Binary Number, Uses of 1’s Complement Binary Numbers, Range of Numbers, Additions by 1’s Complement.
Related Tools