Number Base Converter

This tool shows the same integer in common bases so prefixes, bit patterns, and human-readable decimal values can be compared.

Last updated: October 16, 2026  •  Published by: NOFYI Editorial Team  •  Category: Converter Tools

Workspace

What Is the Binary Converter?

The Binary Converter translates numbers between binary (base 2) and the number systems people use every day: decimal (base 10), octal (base 8), and hexadecimal (base 16). Binary is the language of computers: every value stored or processed by a computer is ultimately represented with just two digits, 0 and 1. Each binary digit is called a bit, and each position in a binary number stands for a power of two, just as each position in a decimal number stands for a power of ten.

That is why programmers and students constantly convert between bases. You might see a color written as hexadecimal FF, a file permission written as octal 755, or a memory address in hexadecimal, and need the binary or decimal equivalent. This converter does the translation without hand calculation.

How to Use the Binary Converter

  1. Enter the number you want to convert in the input field.
  2. Select the base of the number you entered: binary (base 2), octal (base 8), decimal (base 10), or hexadecimal (base 16).
  3. The converter shows the same value in the other bases automatically.
  4. Copy the result you need and paste it into your code, homework, or documentation.
  5. Double-check the base before copying. The digits 1010 mean ten in binary but one thousand ten in decimal, so the selected base changes the answer completely.

Worked Example

Convert decimal 42 to binary. Find the largest powers of two that fit: 32 + 8 + 2 = 42. Write a 1 for each power used and 0 for each power skipped, from 32 down to 1:

32 (1) + 16 (0) + 8 (1) + 4 (0) + 2 (1) + 1 (0) = 101010. So decimal 42 is binary 101010.

Converting back, read the bits from right to left with place values 1, 2, 4, 8, 16, 32: 0×1 + 1×2 + 0×4 + 1×8 + 0×16 + 1×32 = 2 + 8 + 32 = 42. As a cross-check, binary 101010 groups into two 3-bit octal groups, 101 and 010, giving octal 52, and 52 in octal is 5 × 8 + 2 = 42 in decimal. One more: decimal 255 is binary 11111111 and hexadecimal FF.

Limitations

  • Binary input may contain only the digits 0 and 1. Digits such as 2 through 9 are invalid in binary, just as letters beyond F are invalid in hexadecimal.
  • Very large integers can exceed the precision of ordinary floating-point arithmetic, so extremely long inputs may lose precision. For everyday values up to a few billion this is not a problem.
  • The converter works with whole numbers. It does not convert binary fractions, such as 101.11, or negative numbers written in two’s complement form.
  • Leading zeros do not change the value: binary 000101 and 101 are both decimal 5. They are only padding.
  • Converting a number does not explain what the number means. A binary value could be a count, a color channel, a set of flags, or an ASCII code, and the meaning depends on context.

Frequently Asked Questions

Why do computers use binary?

Computer hardware is built from switches that have two stable states, on and off, which map naturally to 1 and 0. Every number, letter, image, and instruction is ultimately stored as combinations of these two states.

How do I convert binary to decimal by hand?

Write the place values 1, 2, 4, 8, 16, 32, and so on from right to left above the bits. Add the place values under every 1 bit. For 101010, that is 32 + 8 + 2 = 42.

What is the relationship between binary, octal, and hexadecimal?

Octal groups binary digits in threes and hexadecimal groups them in fours, because 8 = 23 and 16 = 24. That is why 11111111 is octal 377 and hexadecimal FF: each group converts independently.

Why does binary 10 not mean ten?

The meaning of digits depends on the base. In binary, 10 is 1 × 2 + 0 = 2 in decimal. In decimal, 10 is ten. Always confirm which base a number is written in before converting.