MATHEMATICS • NUMBER SYSTEMS

Number Base Conversion Exercise Generator

Conversion between binary, octal, decimal and hexadecimal bases

⚙️ Settings

📝 Exercises

0 checked

Non-negative whole numbers • Answers without prefixes (0b, 0x)

What is the number base conversion exercise generator?

The Nalgoritmo base conversion generator creates exercises to convert whole numbers between the binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) number systems. Choose the source and target bases, the number of exercises and the difficulty, type your answers and check them, or study the step-by-step solution of each conversion.

It was made for students and teachers of computer science, digital electronics, computer architecture and mathematics who want quick, unlimited practice with number systems.

Features

  • Four number systems: binary, octal, decimal and hexadecimal, with a fixed or random source and target base.
  • Three difficulty levels: easy (1 to 63), medium (16 to 1,023) and hard (256 to 65,535).
  • Practice or study: in practice mode you check each answer; in study mode every solution is shown.
  • Step-by-step solution: repeated division by the target base, reading the remainders from bottom to top, or the sum of each digit times a power of the base when converting to decimal.
  • Check all and print: check every answer at once, show all the answers, clear them or print the exercises.

How to use

  1. Choose the source base, the target base, the number of exercises, the difficulty and the mode.
  2. Click “Generate exercises”.
  3. Convert each number and type the answer without prefixes such as 0b or 0x.
  4. Click “Check” to check an exercise, “Solution” to see the steps, or “Check all”.

Frequently asked questions

How do I convert a decimal number to binary?

Divide the number by 2 repeatedly and write down each remainder until the quotient is 0. The binary number is the remainders read from bottom to top. For example: 13 ÷ 2 = 6, remainder 1; 6 ÷ 2 = 3, remainder 0; 3 ÷ 2 = 1, remainder 1; 1 ÷ 2 = 0, remainder 1; so 13 in decimal is 1101 in binary. The same method works for octal (dividing by 8) and hexadecimal (dividing by 16).

How do I convert a binary, octal or hexadecimal number to decimal?

Multiply each digit by the base raised to the position of the digit, counting from 0 on the right, and add the results. For example, 2F in hexadecimal is 2 × 16¹ + 15 × 16⁰ = 47 in decimal.

What are the hexadecimal digits?

Hexadecimal uses sixteen digits: 0 to 9 and the letters A to F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Answers can be typed in upper or lower case.

How are the answers checked?

Type the answer in the target base, without prefixes such as 0b or 0x. Spaces and leading zeros are ignored, and upper and lower case letters are accepted. If a digit does not exist in the target base, the generator tells you instead of marking the answer as wrong.

Can I print the exercises?

Yes. Click “Print” to print the list of exercises without the settings and the buttons; in study mode, the solutions are printed too.