Math
Number Base Converter: Binary, Octal, Hex
Convert between binary, octal, decimal, and hexadecimal.
Computers use different number systems.
Common Bases
- Binary (2): 0,1 — computer language
- Octal (8): 0-7 — Unix permissions
- Decimal (10): 0-9 — human
- Hex (16): 0-9,A-F — colors, memory
Converting
To decimal: digit × base^position, sum up.
From decimal: Repeatedly divide, collect remainders.
Frequently Asked Questions
Binary to decimal?
Each bit × 2^position. 1010 = 8+2 = 10.
Why hex?
Compact binary. Each hex digit = 4 bits.
Decimal to binary?
Divide by 2, collect remainders bottom to top.
