A number base (or radix) is how many digits a system uses before it rolls over. Binary uses two (0–1), octal eight, decimal ten, and hexadecimal sixteen (0–9 then A–F). The same quantity can be written in any base — decimal 255 is binary 11111111 and hex FF. This converter reads your value in its base and re-expresses it in all four, the everyday currency of computing.
Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: positional notation and radix conversion, recomputed in code.
How base conversion works
Every number is a string of digits weighted by powers of its base. To go to decimal you sum each digit times the base raised to its place. To leave decimal you repeatedly divide by the target base and collect the remainders. Because 16 = 2⁴ and 8 = 2³, hex and octal line up neatly with binary — four bits per hex digit, three per octal digit — which is exactly why programmers reach for them.
Worked example — decimal 255
Scenario: express 255 in every base.
Decimal 255 is the largest value a single byte holds, so it maps to all 1s in binary (11111111) and the tidy FF in hex — two hex digits for one byte. Going the other way, binary 1010 sums to 8 + 2 = 10 in decimal, which is A in hex. The converter handles any of these directions and validates that your digits fit the base you chose.
Frequently Asked Questions
Sum each digit × 2^position (right to left from 0). 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10.
Divide by 16 repeatedly, read remainders bottom-up with A–F. 255 → F, F → FF. So 255 = FF = 11111111.
Binary 0–1, octal 0–7, decimal 0–9, hex 0–9 then A–F (A=10…F=15). Invalid digits are rejected.
One hex digit = four bits, so hex is compact shorthand for binary. A byte is two hex digits (FF = 255); used for colours (#FF8800) and addresses.
Mainly Unix/Linux file permissions (chmod 755). Decimal 255 = octal 377; binary 111111111 = octal 777.