Binary calculator
Type two numbers in binary (0s and 1s) and pick the operation. Option: a fixed width (8, 16, 32 or 64 bits) read as signed or unsigned.
Result
0001 0001Result in binary
- In decimal
- 17
- In hexadecimal
- 11
- Bits read as unsigned
- 17
- Bits read as signed (two’s complement)
- 17
- Convention: 8-bit unsigned. Every value is zero or positive.
Inputs
- First binary number
- 1011
- Operation
- + (add)
- Second binary number
- 0110
- Width
- 8 bits
- Read the bits as
- Unsigned
How it is calculated
Each binary digit is a power of 2: 1011 = 8 + 0 + 2 + 1 = 11.
Result
Result in binary
- In decimal
- 17
- In hexadecimal
- 11
- Bits read as unsigned
- 17
How it is calculated
- Each binary digit is a power of 2: 1011 = 8 + 0 + 2 + 1 = 11.
- We compute on exact whole numbers, then write the result back in base 2.
- Division: whole quotient (rounded toward zero) and remainder.
- With a fixed width, the result is cut to N bits, then read as signed and as unsigned.
Example
1011 + 0110 on 8 unsigned bits: 11 + 6 = 17, that is 0001 0001 (hex 11).
Good to know
- Up to 4,096 binary digits per number with a free width.
- With a fixed width, numbers are typed without a minus sign: type the bit pattern.
Frequently asked questions
What is this tool used for?
Type two numbers in binary (0s and 1s) and pick the operation. Option: a fixed width (8, 16, 32 or 64 bits) read as signed or unsigned.
How is the result calculated?
Each binary digit is a power of 2: 1011 = 8 + 0 + 2 + 1 = 11.
What should I check before using the result?
Up to 4,096 binary digits per number with a free width.