Bases, notation & place value

Number Systems Explained

A positional number system uses a base to determine each digit’s value. Compare binary, octal, decimal and hexadecimal, then follow the steps to see why their written forms differ.

Compare one number in four bases

Exact whole numbers, up to 64 input digits. Optional +/− sign; 0b, 0o and 0x prefixes are accepted with their matching base. No fractions or separators. Leading zeros are normalized.

4210 = 4210. All four forms below represent the same integer.

Binary · base 2101010
Octal · base 852
Decimal · base 1042
Hexadecimal · base 162A

How the input becomes decimal

Read the magnitude from left to right. Multiply the running total by 10 and add the next digit’s value. All arithmetic in these steps is decimal.

  1. 0 × 10 + 4 = 4
  2. 4 × 10 + 2 = 42
Decimal to binary: division steps

Divide the nonnegative magnitude by 2 until the quotient is zero. Read the remainders from bottom to top.

  1. 42 ÷ 2 = 21, remainder 0
  2. 21 ÷ 2 = 10, remainder 1
  3. 10 ÷ 2 = 5, remainder 0
  4. 5 ÷ 2 = 2, remainder 1
  5. 2 ÷ 2 = 1, remainder 0
  6. 1 ÷ 2 = 0, remainder 1

Result: 1010102.

Decimal to octal: division steps

Divide the nonnegative magnitude by 8 until the quotient is zero. Read the remainders from bottom to top.

  1. 42 ÷ 8 = 5, remainder 2
  2. 5 ÷ 8 = 0, remainder 5

Result: 528.

Decimal to hexadecimal: division steps

Divide the nonnegative magnitude by 16 until the quotient is zero. Read the remainders from bottom to top. Remainders 10–15 become A–F.

  1. 42 ÷ 16 = 2, remainder 10 (A)
  2. 2 ÷ 16 = 0, remainder 2

Result: 2A16.

What does “number system” mean?

This guide is about notation: how numbers are written. In other mathematical contexts, “number systems” can mean collections such as the integers, rational numbers, real numbers or complex numbers. Those collections are a separate topic from a numeral’s base.

Three ideas are useful here: base controls place value; a digit script supplies the visible symbols; and grouping or naming conventions organize large values. Arabic-Indic and Devanagari digits can both write base-10 numbers. Indian lakh/crore notation changes grouping and names, not the base. Roman numerals use a different, non-positional structure.

Number system comparison

Common bases and the value forty-two
SystemBaseDigitsDecimal 42Typical use
Binary20–1101010₂Bits and digital logic
Octal80–752₈Unix permissions
Decimal100–942₁₀Everyday quantities
Hexadecimal160–9, A–F2A₁₆Byte values and color codes
Vigesimal2020 digit values22₂₀Base-20 numeral study

22₂₀ uses ordinary digit shapes to label a base-20 value: 2 × 20 + 2 = 42. It does not illustrate Mayan or Kaktovik glyphs; see the dedicated base-20 guide.

View the 0–20 conversion chart
Decimal 0–20 in binary, octal and hexadecimal
DecimalBinaryOctalHexadecimal
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414

Three ways to convert number systems

1. Expand place values

Multiply each digit by a power of its base, starting with power zero at the right.

1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11₁₀

In hexadecimal, A represents ten: 2A₁₆ = 2×16 + 10 = 42₁₀.

2. Divide and keep remainders

To write 42 in base 8, divide by 8: 42 ÷ 8 gives quotient 5 and remainder 2. Then 5 ÷ 8 gives quotient 0 and remainder 5.

Read remainders upward: 52₈. The last remainder is the leftmost digit. The converter shows this process for your own input.

3. Group binary digits

One octal digit represents three bits; one hexadecimal digit represents four. Start at the right and pad the left with zeros when necessary.

101010₂ → 101 010 → 52₈

101010₂ → 0010 1010 → 2A₁₆

These methods describe whole-number magnitudes. A minus sign can be kept separately, as in −25₁₀ = −11001₂. Fractions need an additional method for positions to the right of the radix point. Computer representations with a fixed bit width also require rules for signedness and overflow; the converter above does not infer those settings.

Reading a number without guessing its base

Check the allowed digits

A base-b positional system has digit values from zero through b−1. Binary accepts only 0 and 1; octal stops at 7. Hexadecimal needs six additional values, conventionally written A through F. The character A therefore means ten as a digit, rather than an unknown algebraic variable, when the notation is explicitly hexadecimal.

Look for the base label

The sequence 10 is not enough to determine a quantity. It means two in binary, eight in octal, ten in decimal and sixteen in hexadecimal. A subscript makes the distinction visible. Programming prefixes such as 0b and 0x can also identify a base, but conventions depend on the language or file format. A string containing only zeros and ones is not automatically binary.

Understand the rollover

When every available digit value has been used, the next count starts a new place. Binary goes from 1 to 10; octal goes from 7 to 10; hexadecimal goes from F to 10. Zero keeps a place when that column contributes nothing. The 0–20 chart lets you compare these transitions without memorizing a long list.

Separate notation from formatting

Changing a base changes the weights assigned to the digit positions. Changing a script can leave those weights untouched: १२ and 12 can both represent one ten and two units. Likewise, 10,000,000 and 1,00,00,000 group the same decimal quantity differently. None of these changes alters the underlying number. This is why a base converter, a digit-script converter and a number-to-words tool answer different questions.

Common mistakes to avoid

  • Using 2 in binary or 8 in octal.
  • Reading division remainders from top to bottom.
  • Grouping binary digits from the left without first aligning the rightmost place.
  • Reading a hexadecimal letter as a decimal digit without converting its value.
  • Confusing a leading minus sign with a fixed-width signed binary encoding.

Try three quick questions

1. What is 1011₂ in decimal?
2. Which numeral is invalid in base 8?
3. What follows F in hexadecimal counting?

Answers & explanations
  1. 11. 1011₂ = 8 + 0 + 2 + 1.
  2. 28. The digit 8 is not allowed in base 8.
  3. 10. F is fifteen; the next value starts a new sixteens place.

One number, different writing systems

Twelve can be written as 12 in decimal, 1100₂ in binary, C₁₆ in hexadecimal or XII in Roman notation. Arabic-Indic ١٢ and Devanagari १२ show another distinction: their digit shapes differ, while their place values remain decimal.

Explore and copy numeral symbols →

Explore digit scripts & numeral traditions

Roman Numerals

Symbols, subtractive rules, examples, and a 1 to 100 chart.

Numeral Symbols

Digit sets and additional number symbols from writing systems around the world.

Base-20 Numerals

Vigesimal systems including Mayan and Kaktovik numeral patterns.

Arabic Numerals

Western, Eastern Arabic, and Persian digit forms with Unicode references.

Sources & method

Conversions use exact integer arithmetic on digit strings. No floating-point rounding is applied. Examples and converter behavior reviewed November 1, 2026.

Number systems FAQ

What is a number system?

A number system is an organized way to represent numbers. It may define a base, a set of digits or symbols, place-value rules, and conventions for combining those symbols.

What are the four common positional number systems?

The four systems most often compared in computing are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16).

What is the difference between a number system and a numeral system?

The terms often overlap. In careful use, a number system can also mean a mathematical collection such as the integers or real numbers, while a numeral system is specifically a notation for writing numbers.

Are Arabic and Devanagari digits different number bases?

No. Arabic and Devanagari digit sets can both write ordinary base-10 positional numbers. The visible symbols change, but the place-value structure can remain decimal.

Is the Indian number system a different base?

Modern Indian notation is decimal. Its distinctive feature is grouping and naming large place values, such as lakh and crore, rather than changing the base from 10.

Why does hexadecimal use letters?

Base 16 needs sixteen single-digit values. After 0 through 9, the letters A through F conventionally represent decimal values 10 through 15.

Do all numeral systems use place value and zero?

No. Modern decimal and binary are positional and use zero as a digit. Standard Roman numerals are non-positional and have no standard zero symbol.

What number system do computers use?

Digital computers represent low-level states with binary. Octal and hexadecimal are compact ways for people to read groups of binary digits, while decimal remains common in user-facing values.