Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Base Conversion Visualizer


Related Pages

Base Converter
Base Convertion Table

This visual converter helps you understand base conversion through cube representations. For larger numbers or pure calculation needs, use ourFull Base Converterwhich handles unlimited number sizes without visual constraints.








Key Terms

Base (or radix) — the number of distinct digits a number system uses, and the factor by which each place is worth more than the one to its right. Decimal is base 1010, binary base 22, octal base 88, hexadecimal base 1616.

Digit — one symbol of the system. Base bb uses the digits 00 to b1b - 1; above 99 the letters AA to ZZ stand in, so base 1616 runs 00 to FF and base 3636 uses all ten digits and all twenty-six letters.

Place value — the weight of a position: b0,b1,b2,b^0, b^1, b^2, \ldots reading from the right. The digit in a place contributes digit times weight.

Positional notation — writing a number as a string of digits whose meaning depends on position, dkd1d0=idibid_k \cdots d_1 d_0 = \sum_i d_i\, b^i.

Repeated division — the standard way to convert from decimal to base bb: divide by bb, record the remainder, repeat with the quotient until it reaches 00, then read the remainders from last to first.

Expansion — the reverse direction: multiply each digit by its place value and add, which converts any base back to decimal.

Getting Started with the Visualizer

Type a number, choose a base, and the tool shows how the number is rebuilt digit by digit in that base.

Number takes a whole number from 00 to 144144, entered as an ordinary decimal
Base takes any base from 22 to 3636; binary, octal and hexadecimal are the usual choices, but any value in the range works, and the letters AA to ZZ appear as digits above 99
• The visualization lays out the conversion step by step, so each digit of the result can be traced back to the operation that produced it
Reset clears both fields and the display

The limit of 144144 is deliberate: it is 12212^2, large enough for every base in the range to show at least two digits and small enough for every step to fit on screen. Try the same number in bases 22, 88 and 1616 in a row; the binary and hexadecimal results line up in groups of four bits, which the grouping section explains.

What a Base Is

Every positional number system works the same way. A base bb has bb digits, 00 through b1b - 1, and each place is worth bb times the place to its right. The string dkdk1d1d0d_k d_{k-1} \cdots d_1 d_0 stands for

dkbk+dk1bk1++d1b+d0d_k\, b^k + d_{k-1}\, b^{k-1} + \cdots + d_1\, b + d_0


In decimal, b=10b = 10, and 472472 means 4100+710+24 \cdot 100 + 7 \cdot 10 + 2. In binary, b=2b = 2, and 101101 means 14+02+1=51 \cdot 4 + 0 \cdot 2 + 1 = 5. The digits are different, the rule is not.

Decimal is a convention, not a property of numbers. The quantity five is the same whether it is written 55, 1012101_2, 12312_3 or 5165_{16}; only the notation changes. That is the whole idea the visualizer is built to show: a base conversion changes how a number is written, never what it is.

Two facts follow. A number needs about logbN\log_b N digits in base bb, so small bases give long strings and large bases short ones. And the largest kk-digit number in base bb is bk1b^k - 1, all digits at their maximum, just as 999=1031999 = 10^3 - 1.

Converting from Decimal: Repeated Division

To write a decimal number NN in base bb, divide by bb and keep the remainder, then divide the quotient by bb and keep that remainder, and continue until the quotient is 00. The remainders, read from the last one obtained to the first, are the digits.

For N=45N = 45 in base 22:

45÷2=2245 \div 2 = 22 remainder 11
22÷2=1122 \div 2 = 11 remainder 00
11÷2=511 \div 2 = 5 remainder 11
5÷2=25 \div 2 = 2 remainder 11
2÷2=12 \div 2 = 1 remainder 00
1÷2=01 \div 2 = 0 remainder 11

Reading upward, 45=101101245 = 101101_2.

The method works because each division strips off the lowest place. The first remainder is the units digit, since N=bq+rN = b \cdot q + r leaves rr in the b0b^0 place and pushes everything else one place up. The visualizer shows exactly this sequence, which is why the digits appear in reverse order of the steps.

The same steps in base 1616 finish sooner: 45÷16=245 \div 16 = 2 remainder 1313, then 2÷16=02 \div 16 = 0 remainder 22, so 45=2D1645 = 2D_{16}, with DD standing for thirteen.

Converting to Decimal: Expansion

The reverse direction needs no division. Multiply each digit by its place value and add.

1011012=132+016+18+14+02+11=45101101_2 = 1 \cdot 32 + 0 \cdot 16 + 1 \cdot 8 + 1 \cdot 4 + 0 \cdot 2 + 1 \cdot 1 = 45


2D16=216+131=452D_{16} = 2 \cdot 16 + 13 \cdot 1 = 45


A faster hand method, Horner's scheme, works left to right: start with the leading digit, and for each further digit multiply the running total by the base and add the digit. For 1011012101101_2: 11, then 21+0=22 \cdot 1 + 0 = 2, then 22+1=52 \cdot 2 + 1 = 5, then 1111, then 2222, then 4545. It uses one multiplication per digit and never needs the powers of the base written out.

Conversion between two non-decimal bases is done in two hops through decimal: expand the source, then divide into the target. The one shortcut is between bases that are powers of the same number, treated in the grouping section.

Binary, Octal and Hexadecimal

Three bases dominate computing, and they are related by grouping.

Binary, base 22, is the native language of digital hardware: each digit is one bit, on or off. It is also the longest notation; 144144 takes eight bits, 10010000210010000_2.

Octal, base 88, and hexadecimal, base 1616, are shorthand for binary. Because 8=238 = 2^3 and 16=2416 = 2^4, one octal digit is exactly three bits and one hexadecimal digit is exactly four, so conversion between them and binary needs no arithmetic, only grouping. Split 10010000210010000_2 into fours from the right, 1001 00001001\ 0000, and read each group: 99 and 00, so 901690_{16}. Split into threes, 10 010 00010\ 010\ 000, and read 22, 22, 00: 2208220_8.

Hexadecimal won because a byte is eight bits and therefore exactly two hex digits, from 0000 to FFFF. Memory addresses, colour codes and hash values are written in hex for that reason.

Set the visualizer to base 22, then base 1616, for the same number and check the grouping by eye. The tool computes both by repeated division, but the results line up as the grouping rule predicts.

Bases Beyond Sixteen

Nothing in the rule stops at 1616. Base bb needs bb digit symbols, and the convention is to continue past 99 with the letters of the alphabet: A=10A = 10, B=11B = 11, up to Z=35Z = 35. Base 3636 therefore uses every digit and every letter, which is the largest base with a standard set of symbols and the upper limit of the visualizer.

Large bases give short strings. In base 3636, 144144 is 403640_{36}, since 436+0=1444 \cdot 36 + 0 = 144. Short strings of letters and digits are useful wherever a number has to be typed or read by a person: shortened links, licence keys, and identifiers are often base-3636 or base-6262 encodings of large integers.

Small bases have their uses too. Base 33 appears in balanced ternary and in some logic circuits; base 1212 has a long history in measurement because 1212 divides evenly by 22, 33, 44 and 66; base 6060, inherited from Babylon, still runs our minutes and seconds.

The point of allowing any base from 22 to 3636 is that the visualizer never suggests decimal is special. The same steps produce the same number in every base.

Worked Example

Convert 100100 to four bases by repeated division.

Base 2. 10050100 \to 50 r 00, 502550 \to 25 r 00, 251225 \to 12 r 11, 12612 \to 6 r 00, 636 \to 3 r 00, 313 \to 1 r 11, 101 \to 0 r 11. Reading the remainders upward: 100=11001002100 = 1100100_2.

Base 8. 10012100 \to 12 r 44, 12112 \to 1 r 44, 101 \to 0 r 11. So 100=1448100 = 144_8.

Base 16. 1006100 \to 6 r 44, 606 \to 0 r 66. So 100=6416100 = 64_{16}.

Base 36. 1002100 \to 2 r 2828, 202 \to 0 r 22. The digit for 2828 is SS, so 100=2S36100 = 2S_{36}.

Check by expansion: 164+132+0+0+14+0+0=1001 \cdot 64 + 1 \cdot 32 + 0 + 0 + 1 \cdot 4 + 0 + 0 = 100; 164+48+4=1001 \cdot 64 + 4 \cdot 8 + 4 = 100; 616+4=1006 \cdot 16 + 4 = 100; 236+28=1002 \cdot 36 + 28 = 100.

Notice the grouping between binary and the two power-of-two bases: 1 100 1001\ 100\ 100 in threes reads 11, 44, 44, and 110 0100110\ 0100 in fours reads 66, 44. Enter 100100 in the visualizer with each base to watch the same remainders appear.

Common Mistakes

Base conversion is mechanical, and the errors are mechanical too.

Reading the remainders in the order they were produced — the first remainder is the units digit, so the digits must be read from the last remainder to the first
Stopping before the quotient reaches zero — the last division, with quotient 00, produces the leading digit; skipping it drops the most significant digit
Using a digit that is too large for the base — base bb has digits 00 to b1b - 1 only; there is no digit 22 in binary and no digit 88 in octal
Forgetting that letters are digits — in hexadecimal AA to FF are the numbers ten to fifteen, not text, and 1A161A_{16} is 2626
Grouping bits from the left — grouping into threes or fours must start from the right, the units end, padding with zeros on the left if needed
Treating the conversion as changing the number4545, 1011012101101_2 and 2D162D_{16} are one quantity written three ways; arithmetic on any of them gives the same answers

Where Base Conversion Appears

Computing — every number in a processor is binary, and programmers read it as hexadecimal; converting between the two is daily work in debugging, networking and graphics, where colours are three hex bytes.

Data encoding — identifiers, short links and keys are large integers written in base 3636 or base 6464 so that they are short enough to type.

Digital electronics — octal and binary describe the states of switches and the addresses of memory cells.

Number theory — divisibility rules are facts about base 1010; the rule for 99, that a number is divisible by 99 when its digit sum is, works because 101(mod9)10 \equiv 1 \pmod 9, and a different base has different rules.

Measurement and time — base 6060 for angles and time, base 1212 for dozens and inches, base 2020 in the French word for eighty; the history of counting is a history of bases.

Teaching place value — conversion is the cleanest way to see what the decimal system actually does, since the mechanism is easier to notice in an unfamiliar base than in the one everyone has used since childhood.