Mathematics

Base Conversions: 2–36

Base conversions change a number from one positional numeral system to another without changing its underlying numerical value.

For example:

101101₂ = 45₁₀

The digit string looks different because binary uses base 2 while decimal uses base 10, but both representations describe the same quantity.

For bases from 2 through 36, the standard digit symbols are:

0–9 for values 0–9

A–Z for values 10–35

So hexadecimal uses A through F, while base 36 can use every numeral 0–9 and letter A–Z.

The two fundamental conversion methods are:

Base b → decimal: multiply each digit by its place-value power of b and add

Decimal → base b: repeatedly divide by b and read the remainders in reverse order

These rules work for every integer base from 2 through 36.

What Is a Number Base?

A number base determines how many digit values are available before a new place is required.

Decimal is base 10 and uses:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Binary is base 2 and uses only:

0, 1

Hexadecimal is base 16 and uses:

0–9 and A–F

Base 36 uses:

0–9 and A–Z

A valid digit in base b must have a value less than b.

Therefore:

2 is not a valid digit in base 2

and:

F is not a valid digit in base 15

because F represents 15, while base 15 allows digit values only from 0 through 14.

Positional Value in Any Base

In decimal, the number:

472₁₀

means:

4 × 10² + 7 × 10¹ + 2 × 10⁰

The same principle works in any base.

For example:

1011₂

means:

1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰

Calculate:

8 + 0 + 2 + 1 = 11

Therefore:

1011₂ = 11₁₀

Understanding positional value is the foundation of all base conversions.

General Base-to-Decimal Formula

Suppose a number in base b has digits:

dₙdₙ₋₁…d₂d₁d₀

Its decimal value is:

N = dₙb^n + dₙ₋₁b^(n-1) + … + d₂b² + d₁b + d₀

with each digit satisfying:

0 ≤ dᵢ < b

For example:

231₄

means:

2 × 4² + 3 × 4¹ + 1 × 4⁰

= 2 × 16 + 3 × 4 + 1

= 32 + 12 + 1

= 45

Therefore:

231₄ = 45₁₀

Converting Binary to Decimal

Consider:

110101₂

Write each place as a power of 2:

1 × 2⁵ + 1 × 2⁴ + 0 × 2³ + 1 × 2² + 0 × 2¹ + 1 × 2⁰

Calculate:

32 + 16 + 0 + 4 + 0 + 1

= 53

Therefore:

110101₂ = 53₁₀

The dedicated binary numbers guide focuses specifically on base-2 notation and arithmetic, while this page uses binary as one case of the broader base-conversion system.

Example: 101101₂ to Decimal

Convert:

101101₂

Expand:

1 × 2⁵ + 0 × 2⁴ + 1 × 2³ + 1 × 2² + 0 × 2¹ + 1 × 2⁰

= 32 + 0 + 8 + 4 + 0 + 1

= 45

So:

101101₂ = 45₁₀

Converting Base 8 to Decimal

Convert:

347₈

Expand:

3 × 8² + 4 × 8¹ + 7 × 8⁰

= 3 × 64 + 4 × 8 + 7

= 192 + 32 + 7

= 231

Therefore:

347₈ = 231₁₀

The digit 8 would not be valid inside an octal number because base 8 uses only digits 0 through 7.

Converting Hexadecimal to Decimal

Hexadecimal is base 16.

Its additional digit values are:

A = 10

B = 11

C = 12

D = 13

E = 14

F = 15

Convert:

2F₁₆

Expand:

2 × 16¹ + 15 × 16⁰

= 32 + 15

= 47

Therefore:

2F₁₆ = 47₁₀

Example: 3A7₁₆ to Decimal

Digit values are:

3 = 3

A = 10

7 = 7

Expand:

3 × 16² + 10 × 16 + 7

= 3 × 256 + 160 + 7

= 768 + 160 + 7

= 935

Therefore:

3A7₁₆ = 935₁₀

Digits for Bases Above 10

For bases up to 36, letters normally represent values greater than 9:

SymbolValueSymbolValue
A10N23
B11O24
C12P25
D13Q26
E14R27
F15S28
G16T29
H17U30
I18V31
J19W32
K20X33
L21Y34
M22Z35

Therefore:

Z₃₆ = 35₁₀

and:

10₃₆ = 36₁₀

The written number 10 always represents the base itself.

Base 36 Example

Convert:

1Z₃₆

Because:

Z = 35

expand:

1 × 36 + 35

= 71

Therefore:

1Z₃₆ = 71₁₀

Now consider:

ZZ₃₆

Its value is:

35 × 36 + 35

= 1260 + 35

= 1295

So:

ZZ₃₆ = 1295₁₀

Decimal to Another Base

To convert a positive decimal integer N to base b:

  1. Divide N by b.
  2. Record the remainder.
  3. Divide the quotient by b again.
  4. Continue until the quotient becomes zero.
  5. Read the remainders from bottom to top.

The remainders become the digits of the new representation.

This works because each division isolates one positional digit.

Decimal to Binary Example

Convert:

45₁₀

to binary.

Divide repeatedly by 2:

45 = 2 × 22 + 1

22 = 2 × 11 + 0

11 = 2 × 5 + 1

5 = 2 × 2 + 1

2 = 2 × 1 + 0

1 = 2 × 0 + 1

The remainders from last to first are:

1 0 1 1 0 1

Therefore:

45₁₀ = 101101₂

This matches the earlier binary-to-decimal example.

Decimal to Base 8 Example

Convert:

231₁₀

to base 8.

Divide:

231 = 8 × 28 + 7

28 = 8 × 3 + 4

3 = 8 × 0 + 3

Read the remainders upward:

3 4 7

Therefore:

231₁₀ = 347₈

Decimal to Hexadecimal Example

Convert:

255₁₀

to base 16.

Divide:

255 = 16 × 15 + 15

The remainder 15 is:

F

Now divide 15:

15 = 16 × 0 + 15

Again:

15 = F

Read upward:

FF

Therefore:

255₁₀ = FF₁₆

Larger Decimal-to-Hexadecimal Example

Convert:

12345₁₀

to hexadecimal.

Divide by 16:

12345 = 16 × 771 + 9

771 = 16 × 48 + 3

48 = 16 × 3 + 0

3 = 16 × 0 + 3

Read the remainders upward:

3 0 3 9

Therefore:

12345₁₀ = 3039₁₆

Check:

3 × 16³ + 0 × 16² + 3 × 16 + 9

= 3 × 4096 + 48 + 9

= 12288 + 57

= 12345

Decimal to Base 36 Example

Convert:

1000₁₀

to base 36.

Divide:

1000 = 36 × 27 + 28

Digit value 28 is:

S

Now:

27 = 36 × 0 + 27

Digit value 27 is:

R

Read upward:

RS

Therefore:

1000₁₀ = RS₃₆

Check:

R × 36 + S

= 27 × 36 + 28

= 972 + 28

= 1000

Converting Between Two Nondecimal Bases

A universal method for converting base a to base b is:

Base a → decimal → base b

For example, convert:

132₅

to base 7.

First convert to decimal:

1 × 5² + 3 × 5 + 2

= 25 + 15 + 2

= 42

Now convert 42 to base 7:

42 = 7 × 6 + 0

6 = 7 × 0 + 6

Read upward:

60₇

Therefore:

132₅ = 60₇

Using decimal as an intermediate base is straightforward and works for every base from 2 through 36.

Direct Binary-to-Hexadecimal Conversion

Binary and hexadecimal have a convenient relationship because:

16 = 2⁴

Every hexadecimal digit corresponds to exactly four binary digits.

For example, convert:

11101101₂

Group from the right in sets of four:

1110 1101

Convert each group:

1110₂ = 14 = E₁₆

1101₂ = 13 = D₁₆

Therefore:

11101101₂ = ED₁₆

No decimal intermediary is necessary.

Hexadecimal to Binary

Convert:

3A₁₆

Convert each hexadecimal digit to four binary digits:

3 = 0011₂

A = 1010₂

Combine:

00111010₂

Leading zeros can be omitted:

111010₂

Therefore:

3A₁₆ = 111010₂

Binary and Octal

Octal has base:

8 = 2³

so every octal digit corresponds to three binary digits.

For example:

725₈

becomes:

7 = 111₂

2 = 010₂

5 = 101₂

Therefore:

725₈ = 111010101₂

Conversely, binary can be grouped into sets of three from the right to convert directly to octal.

Why Grouping Works

Binary-to-hex grouping works because:

2⁴ = 16

Binary-to-octal grouping works because:

2³ = 8

More generally, direct grouping is convenient when one base is an integer power of another.

For unrelated bases such as base 5 and base 7, the decimal-intermediate method is usually simpler.

Converting Zero

Zero has the same numerical value in every base:

0₂ = 0₈ = 0₁₀ = 0₁₆ = 0₃₆

Repeated division needs a special practical case for zero because there is no positive quotient sequence to process.

The representation is simply:

0

Negative Numbers

Convert the magnitude and retain the negative sign.

For example:

-45₁₀

Since:

45₁₀ = 101101₂

we can write:

-45₁₀ = -101101₂

This mathematical signed representation should not be confused with computer-specific signed binary encodings such as two’s complement.

The conversion of the magnitude remains the same.

Fractions in Positional Bases

Positions to the right of the radix point use negative powers.

For decimal:

0.25₁₀ = 2 × 10^-1 + 5 × 10^-2

For binary:

0.101₂ = 1 × 2^-1 + 0 × 2^-2 + 1 × 2^-3

= 1/2 + 0 + 1/8

= 5/8

= 0.625₁₀

So:

0.101₂ = 0.625₁₀

Integer conversion is the simplest case, but positional notation extends naturally to fractional places.

Decimal Fraction to Another Base

For the fractional part, repeated multiplication replaces repeated division.

To convert 0.625₁₀ to binary:

Multiply by 2:

0.625 × 2 = 1.25

Record the integer digit:

1

Use the remaining fraction 0.25:

0.25 × 2 = 0.5

Record:

0

Then:

0.5 × 2 = 1.0

Record:

1

Therefore:

0.625₁₀ = 0.101₂

For fractions, digits are read in the order they are generated rather than reversed.

Some Fractions Do Not Terminate

A fraction that terminates in one base may repeat in another.

For example:

0.1₁₀

does not have a finite binary representation.

Its binary expansion repeats indefinitely.

This is one reason computer floating-point arithmetic can produce tiny representation differences for decimal values that appear simple to humans.

Base conversion therefore affects representation length even when the underlying number is unchanged.

Place Values Form a Geometric Pattern

In base b, successive place values are:

…, b³, b², b¹, b⁰, b^-1, b^-2, …

Each step changes by a factor of b.

This is different from an arithmetic sequence, whose consecutive terms differ by a constant amount.

For example, decimal place values:

1, 10, 100, 1000, …

do not have a constant difference. Their ratios are constant:

10

Recognizing this distinction helps explain why positional notation is multiplicative rather than additive in its place-value growth.

Base Conversion and Algebra

Variables can represent digits or unknown values in base-conversion problems.

Suppose:

2x₅ = 13₁₀

Interpreting the base-5 number gives:

2 × 5 + x = 13

Therefore:

10 + x = 13

x = 3

So:

23₅ = 13₁₀

The equation-solving step uses the same rules introduced in algebra basics.

The digit must also satisfy:

0 ≤ x < 5

which x = 3 does.

Base and Digit Length

Changing a number’s base changes the number of written digits.

For example:

255₁₀ = FF₁₆ = 11111111₂

The same value needs:

3 decimal digits

2 hexadecimal digits

8 binary digits

This happens because a larger base can encode more possibilities in each digit.

The relationship between magnitude and written digit count is developed specifically under big numbers.

Validating a Base Representation

Before converting, check every digit.

For example:

128₈

is invalid because octal permits only:

0 through 7

Similarly:

G₁₆

is invalid because hexadecimal stops at:

F = 15

But:

G₁₇

is valid because:

G = 16

and base 17 permits digit values 0 through 16.

Why Base 36 Stops at Z

Using numerals 0–9 and letters A–Z gives:

10 + 26 = 36

distinct digit symbols.

Therefore those symbols naturally support bases up to 36 with single-character digits.

A base greater than 36 would require an additional symbol convention or multi-character digit notation.

This article therefore keeps its scope to the workbook-assigned range of bases 2–36.

Common Base Conversion Mistakes

Reading Remainders in the Wrong Direction

For decimal-to-integer-base conversion, repeated-division remainders are read:

last remainder to first remainder

Using an Invalid Digit

A base-b digit must satisfy:

digit value < b

Treating Letters as Alphabet Positions

In standard base notation:

A = 10

not 1.

Therefore:

Z = 35

Forgetting Zero Placeholders

In:

10101₂

the zero digits represent place values that contribute zero. They cannot simply be ignored when assigning powers.

Using Decimal Place Values in Another Base

For:

123₅

the place values are:

5², 5¹, 5⁰

not 100, 10, and 1.

Confusing Representation With Value

10₂

does not equal decimal 10.

It equals:

2₁₀

because the digits are interpreted using powers of 2.

Reversing Fraction Digits

Repeated multiplication for fractional conversion records digits in the order generated. It does not use the reverse-remainder rule of integer conversion.

Worked Base Conversion Example

Convert:

2B7₁₆

to base 2.

Because hexadecimal and binary have a power relationship, convert each hex digit into four bits.

First:

2₁₆ = 0010₂

Next:

B₁₆ = 11₁₀ = 1011₂

Finally:

7₁₆ = 0111₂

Combine:

0010 1011 0111₂

Drop unnecessary leading zeros:

1010110111₂

Therefore:

2B7₁₆ = 1010110111₂

Check through decimal.

Hexadecimal:

2 × 16² + 11 × 16 + 7

= 512 + 176 + 7

= 695

Binary:

512 + 128 + 32 + 16 + 4 + 2 + 1

= 695

Both representations have the same value.

Frequently Asked Questions

What is a base conversion?

A base conversion rewrites a number in another numeral system while preserving its numerical value.

How do you convert any base to decimal?

Multiply each digit by the corresponding power of the original base and add the results:

N = Σ digit × base^position

How do you convert decimal to another integer base?

Repeatedly divide by the target base, record each remainder, and read the remainders in reverse order.

What digits are used for bases above 10?

The standard convention is:

A = 10, B = 11, …, Z = 35

What is 10₂ in decimal?

10₂ = 2₁₀

What is FF₁₆ in decimal?

FF₁₆ = 15 × 16 + 15 = 255₁₀

What is Z₃₆ in decimal?

Z₃₆ = 35₁₀

Why can binary convert directly to hexadecimal?

Because:

16 = 2⁴

so each hexadecimal digit corresponds exactly to four binary digits.

Can negative numbers be converted between bases?

Yes. Convert the magnitude and preserve the mathematical negative sign unless a specific computer encoding is required.

Can fractions be converted between bases?

Yes. Digits to the right of the radix point represent negative powers of the base. Decimal fractions can be converted using repeated multiplication.

Does changing the base change the actual number?

No. It changes only its representation.

Why does the same number have different digit lengths in different bases?

Each digit in a larger base can represent more possible values, so fewer digits may be needed to represent the same magnitude.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button