Binary Calculator
Convert between binary, decimal, octal, and hexadecimal. Add, subtract, multiply, or divide binary numbers.
Inputs
Decimal
โ
Binary
โ
Octal
โ
Hexadecimal
โ
Bit width
โ
About Binary Calculator
Why hex is popular in programming
One hex digit = 4 bits = 1 nibble. Two hex digits = 1 byte. Hex 0xFF = 255 decimal = 11111111 binary. Hex is compact and aligns perfectly with byte boundaries.
Two\u2019s complement
Computers represent negative integers using two\u2019s complement: flip all bits and add 1. In 8 bits, -1 is 11111111. This calculator uses unsigned values only.
Why base 8?
Octal was popular when computers used 36-bit words (3 octal digits per word boundary). Now mostly historical, except for Unix file permissions (chmod 755).