Type a whole number from 0 to 144 in Number; the grid on the left fills that many cells, each carrying its count. Learn more about the Number box
Type a base from 2 to 36 in Base; the cubes regroup into one row per digit and the result line prints the number in that base. Learn more about the Base box
Each row on the right is labelled with its place value, such as 25(32), and ends with a count such as ×1: the number of groups in the row is the digit for that place. Learn more about reading the rows
The result line under the picture reads, for example, 100 in base 8 is: 144; digits above 9 print as lower-case letters, so 45 in base 16 shows 2d. Learn more about the result line
The note at the bottom follows the base: 2, 8, 10 and 16 each have their own, every other base shares one, and each note links to the section on its base. Learn more about the note
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.
Type a whole number up to 144 and a base from 2 to 36. The grid on the left holds the number as cubes; the right side regroups the same cubes by powers of the base, one row per digit. What a base is · Repeated division
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 10, binary base 2, octal base 8, hexadecimal base 16.
Digit — one symbol of the system. Base b uses the digits 0 to b−1; above 9 the letters A to Z stand in, so base 16 runs 0 to F and base 36 uses all ten digits and all twenty-six letters.
Place value — the weight of a position: b0,b1,b2,… 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, dk⋯d1d0=∑idibi.
Repeated division — the standard way to convert from decimal to base b: divide by b, record the remainder, repeat with the quotient until it reaches 0, 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
DemoNumber, Base and Reset
Step 0 of 5
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 0 to 144, entered as an ordinary decimal • Base takes any base from 2 to 36; binary, octal and hexadecimal are the usual choices, but any value in the range works, and the letters A to Z appear as digits above 9 • 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 144 is deliberate: it is 122, 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 2, 8 and 16 in a row; the binary and hexadecimal results line up in groups of four bits, which the grouping section explains.
Reading the Grid and the Rows
DemoReading the rows: 100 in four bases
Step 0 of 4
The tool draws the same number twice, once as a count and once as digits.
The grid on the left has 144 cells, twelve by twelve. Typing a number fills that many cells, each carrying its count from 1 up, so the grid is the number before any base is chosen.
The rows on the right regroup the same cubes by powers of the base, largest first. Each row is labelled with the base, the power and the group size, so 81(8) is the row of groups of eight, and ends with a count such as ×4. That count is the digit for the place. For 100 in base 8 the rows read 82(64)×1, 81(8)×4 and 80(1)×4, so 100=1448. A row with ×0 is drawn empty and still counts: it holds its place open.
The result line under the picture prints the string, for example 100 in base 8 is: 144. Digits above 9 print as lower-case letters: 45 in base 16 shows 2d, which is 2D16.
The red message takes the place of the result line when the number is above 144 or the base is outside 2 to 36.
The note at the bottom follows the base. Bases 2, 8, 10 and 16 each have their own note, every other base shares one, and each note links to the section on this page that treats its base. The arithmetic behind the counts is in Repeated Division.
What a Base Is
Every positional number system works the same way. A base b has b digits, 0 through b−1, and each place is worth b times the place to its right. The string dkdk−1⋯d1d0 stands for
dkbk+dk−1bk−1+⋯+d1b+d0
In decimal, b=10, and 472 means 4⋅100+7⋅10+2. In binary, b=2, and 101 means 1⋅4+0⋅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 5, 1012, 123 or 516; 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 digits in base b, so small bases give long strings and large bases short ones. And the largest k-digit number in base b is bk−1, all digits at their maximum, just as 999=103−1. The familiar case, decimal, is treated first below with the tool frozen on 100.
Decimal: Base 10
Base 10 is the identity conversion: the digits the tool prints are the digits you typed. The visualizer still regroups the cubes, and that is the point. 100 becomes one group of 102=100 cubes, zero groups of 10, and zero single cubes, which is exactly what the string 100 says.
100 in base 10, frozen
All one hundred cubes sit in a single 10² group and the 10¹ and 10⁰ rows are empty: the digits 1, 0, 0 read straight off the picture.
Reading the rows. The result structure lists the powers of 10 from the largest that fits downward: 102 with ×1, 101 with ×0, 100 with ×0. Each digit is a count of groups, and the zeros are as informative as the one: they hold the places open.
Decimal feels like the way numbers are only because it is the base everyone learns first. Enter 100 with base 10, then change the base to 2 or 16 and watch the same one hundred cubes regroup; nothing about the quantity changes, only the group sizes. The general rule is in What a Base Is, and the reverse direction, digits back to a count, in Expansion.
Because base 10 uses ten digit symbols, 0 to 9, a single decimal digit can hold at most nine groups of any size; the tenth group is what forces a carry into the next place. The binary picture makes the same rule visible with only two symbols.
Converting from Decimal: Repeated Division
To write a decimal number N in base b, divide by b and keep the remainder, then divide the quotient by b and keep that remainder, and continue until the quotient is 0. The remainders, read from the last one obtained to the first, are the digits.
The method works because each division strips off the lowest place. The first remainder is the units digit, since N=b⋅q+r leaves r in the b0 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 16 finish sooner: 45÷16=2 remainder 13, then 2÷16=0 remainder 2, so 45=2D16, with D standing for thirteen.
Converting to Decimal: Expansion
The reverse direction needs no division. Multiply each digit by its place value and add.
1011012=1⋅32+0⋅16+1⋅8+1⋅4+0⋅2+1⋅1=45
2D16=2⋅16+13⋅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 1011012: 1, then 2⋅1+0=2, then 2⋅2+1=5, then 11, then 22, then 45. 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
Demo144 in binary, octal and hexadecimal
Step 0 of 4
Three bases dominate computing, and they are related by grouping.
Binary, base 2, is the native language of digital hardware: each digit is one bit, on or off. It is also the longest notation; 144 takes eight bits, 100100002.
Octal, base 8, and hexadecimal, base 16, are shorthand for binary. Because 8=23 and 16=24, 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 100100002 into fours from the right, 10010000, and read each group: 9 and 0, so 9016. Split into threes, 10010000, and read 2, 2, 0: 2208.
Hexadecimal won because a byte is eight bits and therefore exactly two hex digits, from 00 to FF. Memory addresses, colour codes and hash values are written in hex for that reason.
Set the visualizer to base 2, then base 16, 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. Each of the three has a dedicated section with the tool frozen on 100: binary, octal and hexadecimal.
Binary: Base 2
In base 2 each digit is a bit, 0 or 1, so every row of the result structure holds either one group or none. 100 needs seven bits: 100=64+32+4, and the visualizer shows exactly those three groups, at 26, 25 and 22, with empty rows at 24, 23, 21 and 20.
100 in base 2, frozen
Seven rows, one per power of two from 64 down to 1: the 64, 32 and 4 rows hold one group each, the others none, giving 1100100.
Why so many rows. A base b needs about logbN digits, and log2100≈6.6, so seven. Binary is the longest notation the tool offers; the same 100 takes three digits in octal and two in hexadecimal.
By repeated division.100→50 r 0, 50→25 r 0, 25→12 r 1, 12→6 r 0, 6→3 r 0, 3→1 r 1, 1→0 r 1; read upward, 11001002. The method is explained in Repeated Division. Each remainder is the bit for one row of the picture.
Binary is the native notation of digital hardware, where a bit is a switch that is on or off. The grouping that turns it into the two shorthand bases is described in Binary, Octal and Hexadecimal.
Octal: Base 8
In base 8 the digits run 0 to 7 and the place values are 1,8,64,512,…. 100=1⋅64+4⋅8+4, so the visualizer shows one 82 group, four 81 groups and four single cubes: 1448.
100 in base 8, frozen
Three rows: one group of 64, four groups of 8 and four single cubes, so the digits are 1, 4, 4.
Three bits per digit. Because 8=23, each octal digit is exactly three binary digits. Split the binary string 11001002 into threes from the right, 1100100, and read 1, 4, 4; no arithmetic needed. The four groups of 8 in the picture are the 100 in the middle of the bit string.
By repeated division.100→12 r 4, 12→1 r 4, 1→0 r 1: the remainders 4,4,1 read upward give 1448, as in the worked example.
Octal was the programmer's shorthand before bytes settled at eight bits; it survives in file permissions and a few older systems. Hexadecimal, four bits per digit, took over because it divides a byte evenly.
Hexadecimal: Base 16
Base 16 uses sixteen digit symbols, 0 to 9 and then A to F for ten to fifteen. 100=6⋅16+4, so the visualizer shows six 161 groups and four single cubes: 6416. Both digits happen to be below ten; try 45 to see a letter, 2D16.
100 in base 16, frozen
Two rows: six groups of 16 and four single cubes, so 100 is 64 in hexadecimal, with no letter digit needed this time.
Four bits per digit.16=24, so one hexadecimal digit is four bits. Grouping 11001002 into fours from the right, 1100100, reads 6 and 4 directly. A byte is eight bits and therefore exactly two hex digits, from 00 to FF, which is why memory addresses, colour codes and hashes are written in hex.
By repeated division.100→6 r 4, 6→0 r 6: two steps, the shortest of the four conversions in the worked example.
Compare the picture with octal: the same hundred cubes, but the larger base makes bigger groups and fewer rows. The largest base the tool accepts, base 36, pushes this to the limit.
Bases Beyond Sixteen
Nothing in the rule stops at 16. Base b needs b digit symbols, and the convention is to continue past 9 with the letters of the alphabet: A=10, B=11, up to Z=35. Base 36 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 36, 144 is 4036, since 4⋅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-36 or base-62 encodings of large integers.
Small bases have their uses too. Base 3 appears in balanced ternary and in some logic circuits; base 12 has a long history in measurement because 12 divides evenly by 2, 3, 4 and 6; base 60, inherited from Babylon, still runs our minutes and seconds.
The point of allowing any base from 2 to 36 is that the visualizer never suggests decimal is special. The same steps produce the same number in every base. The largest case has its own section, Base 36, with the tool frozen on 100=2S36.
Base 36: Every Digit and Every Letter
Base 36 is the largest base the visualizer accepts, because it is the largest with a standard set of symbols: the ten digits and the twenty-six letters, A=10 up to Z=35. 100=2⋅36+28, and 28 is written S, so the result is 2S36.
100 in base 36, frozen
Two rows: two groups of 36 and twenty-eight single cubes; the count 28 has no numeral of its own, so the tool writes the letter S.
Reading the picture. The 361 row holds two groups of 36 cubes and the 360 row holds twenty-eight single cubes. A row can hold up to thirty-five groups before it must carry, which is why the second digit needs a letter: there are not enough numerals for a base this large.
By repeated division.100→2 r 28, 2→0 r 2; the remainders 28 and 2 become the digits S and 2. Large bases give short strings, which is why identifiers and short links are often base-36 encodings of large integers; see Bases Beyond Sixteen.
Any base between 17 and 36 behaves the same way, with letters appearing as soon as a digit exceeds 9. Type 100 with base 20 or 25 to see 5020 and 4025, both letter-free, then base 30 for 3A30.
Worked Example
Convert 100 to four bases by repeated division.
Base 2.100→50 r 0, 50→25 r 0, 25→12 r 1, 12→6 r 0, 6→3 r 0, 3→1 r 1, 1→0 r 1. Reading the remainders upward: 100=11001002.
Base 8.100→12 r 4, 12→1 r 4, 1→0 r 1. So 100=1448.
Base 16.100→6 r 4, 6→0 r 6. So 100=6416.
Base 36.100→2 r 28, 2→0 r 2. The digit for 28 is S, so 100=2S36.
Check by expansion: 1⋅64+1⋅32+0+0+1⋅4+0+0=100; 1⋅64+4⋅8+4=100; 6⋅16+4=100; 2⋅36+28=100.
Notice the grouping between binary and the two power-of-two bases: 1100100 in threes reads 1, 4, 4, and 1100100 in fours reads 6, 4. Enter 100 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 0, produces the leading digit; skipping it drops the most significant digit • Using a digit that is too large for the base — base b has digits 0 to b−1 only; there is no digit 2 in binary and no digit 8 in octal • Forgetting that letters are digits — in hexadecimal A to F are the numbers ten to fifteen, not text, and 1A16 is 26 • 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 number — 45, 1011012 and 2D16 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 36 or base 64 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 10; the rule for 9, that a number is divisible by 9 when its digit sum is, works because 10≡1(mod9), and a different base has different rules.
Measurement and time — base 60 for angles and time, base 12 for dozens and inches, base 20 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.
Related Concepts
Place value — the principle every base shares: a digit's contribution is its value times the power of the base at its position.