Binary, Octal, Decimal, Hex: How Number Bases Actually Work

By the Super Simple Digital Tools Team · Updated June 2026 · Text & Developer

Every number you have ever written is a positional number, meaning each digit's worth depends on where it sits. In decimal, the rightmost column counts ones, the next counts tens, then hundreds, each column being ten times the one to its right. Change that multiplier and you change the base. Binary multiplies by two per column, octal by eight, and hexadecimal by sixteen. Nothing magical separates these systems; they are simply four ways of grouping the same underlying quantity, and a base converter just rewrites that quantity in a different grouping.

Reading any base into a value follows one rule: multiply each digit by the base raised to its column position and add the results. Hex 2F means 2x16 plus 15x1, which is 47 in decimal (remember F stands for 15). The same rule decodes binary 101101 as 32 plus 8 plus 4 plus 1, or 45. Once you internalize this expansion, no base feels foreign, because the procedure is identical, only the base number you raise to a power changes.

Going the other direction, from a decimal value into another base, uses repeated division. Divide by the target base, keep the remainder, then divide the quotient again, and continue until the quotient hits zero. The remainders, read from last to first, spell out the answer. Converting 156 to hex, for instance, gives 156 divided by 16 as 9 remainder 12, and 12 is C, so the answer is 9C. It is the same loop whether your target is binary, octal, or hex.

The real shortcut lives between binary, octal, and hex, because their bases are all powers of two. One octal digit is exactly three bits and one hex digit is exactly four bits, so you can convert by regrouping rather than calculating. Take binary 11011010, slice it into nibbles 1101 and 1010, and you get D and A, so DA. This is precisely why programmers lean on hex: it is binary wearing a shorter, more readable costume, with each byte always landing as a tidy pair of hex digits.

Those relationships explain where each base earns its keep. Binary is the machine's native language of on and off. Hex shrinks long bit patterns into something a human can scan, which is why color codes, memory addresses, and hashes use it. Octal survives mainly in Unix permissions, where three-bit groups fall naturally into single digits. Decimal stays the language of people. A base converter is the bridge that lets you move a single value across all four worlds without losing a thing.

Quick tips

  • When converting binary to hex, group the bits into fours from the right and pad the leftmost group with leading zeros if it comes up short.
  • Sanity-check a hex-to-decimal result by remembering that two hex digits never exceed 255, the maximum value of one byte.
  • For octal file permissions, translate each digit to three bits: 7 is 111 (rwx), 5 is 101 (r-x), 0 is 000 (---).
  • If a field rejects your input, check the digit set: binary allows only 0 and 1, octal stops at 7, and hex tops out at F.

The Number Base Converter is free to use as often as you like — no signup required.