Hex Binary Decimal Converter

Convert between hexadecimal, binary, decimal and octal number systems instantly.

About this calculator

Convert numbers between binary, octal, decimal and hexadecimal. Type in any box and the other bases update immediately.

Essential for programming, networking, electronics and computer-science courses.

How to use it

  1. Type a number in the base you have.
  2. Read the other bases.
  3. Clear the fields to start again.

Number bases

A number base is how many digits it uses. Binary (base 2) uses 0 and 1, octal (base 8) uses 0 to 7, decimal (base 10) 0 to 9 and hexadecimal (base 16) 0 to 9 and A to F. To convert to decimal, multiply each digit by the base raised to its position: 1101₂ = 1×8 + 1×4 + 0×2 + 1×1 = 13. To convert from decimal, divide repeatedly by the base and read the remainders upward.

Worked example

Same numbers in four bases

101010 binary, 12 octal, A hex
25511111111 binary, 377 octal, FF hex
1610000 binary, 20 octal, 10 hex
1,02410000000000 binary, 2000 octal, 400 hex

Tips and common mistakes

  • Four binary digits equal one hex digit, so you can convert quickly in groups of four.
  • 255 is the largest value in one byte: 11111111 or FF.
  • Octal is used in Unix permissions.
  • Hex colours are three pairs: RR GG BB.
  • Check your answer by converting back.

Frequently asked questions

How do I convert binary to decimal?

Multiply each bit by a power of 2 and add.

What is 255 in hex?

FF.

What is 1010 in decimal?

10.

Why do programmers use hex?

It shortens long binary numbers.

What digits does octal use?

0 to 7.

Are fractions supported?

These tools handle whole numbers.

Related tools