Super Calculator logoSuper Calculator

Binary Calculator

Convert between binary, decimal, hex, and octal number systems

Results are estimates for informational purposes only — not professional financial, medical, or legal advice. See how we build and verify our calculators.

Frequently Asked Questions

How do I convert decimal to binary?

Divide by 2 repeatedly, writing down the remainders from bottom to top. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1. Reading remainders bottom-up: 1101. Verify: 8+4+0+1 = 13. Each bit represents a power of 2: 2^3+2^2+2^0 = 8+4+1 = 13.

What is hexadecimal and why is it used?

Hexadecimal (base 16) uses digits 0-9 and A-F. One hex digit represents exactly 4 binary bits (a nibble), and two hex digits = 1 byte (8 bits). So FF hex = 11111111 binary = 255 decimal. Hex is compact: the 24-bit color #FF6B35 is much shorter than its 24-digit binary equivalent.

How do I count in binary?

Binary uses only 0 and 1. Counting: 0, 1, 10, 11, 100, 101, 110, 111, 1000... Each position is a power of 2. To read binary 1010: 1x8 + 0x4 + 1x2 + 0x1 = 10. With n bits you can represent 0 to 2^n - 1: 8 bits = 0-255, 16 bits = 0-65535, 32 bits = 0-4,294,967,295.

What are AND, OR, XOR operations?

These are bitwise operations on binary numbers. AND (both must be 1): 1010 AND 1100 = 1000. OR (either can be 1): 1010 OR 1100 = 1110. XOR (exactly one must be 1): 1010 XOR 1100 = 0110. NOT (flip all bits): NOT 1010 = 0101. Used in programming for bit manipulation, flags, and masks.

What is two complement representation?

Two complement is how computers store negative integers. To negate: flip all bits and add 1. Example: 5 = 00000101, -5 = 11111010 + 1 = 11111011. Benefits: addition works the same way for positive and negative. 8-bit two complement: range is -128 to +127.

Binary Place Values

Bit positionPower of 2Value
Bit 0 (2^0)2^01
Bit 1 (2^1)2^12
Bit 2 (2^2)2^24
Bit 3 (2^3)2^38
Bit 4 (2^4)2^416
Bit 5 (2^5)2^532
Bit 6 (2^6)2^664
Bit 7 (2^7)2^7128

Real-World Uses

IP addresses — 32-bit binary (IPv4), 128-bit (IPv6)
Colors — #RRGGBB hex = 3 bytes = 24 bits
ASCII codes — each character is 7 bits (0-127)
File permissions — rwxrwxrwx = 9 bits
Bitmasks — toggle features with AND/OR/XOR
Unicode — up to 21 bits per character (UTF-8)