digiwleea Tools
Learn Open the lab →

Binary to decimal converter

Convert between binary, decimal, and hexadecimal instantly: type a value in any one of the three boxes below and the other two update as you go, with the binary place values broken out underneath. For example, 11111111 in binary is 255 in decimal and FF in hexadecimal.

How to use it

Pick the box that matches the number you already have: Binary for a string of 0s and 1s, Decimal for an ordinary base-10 number, or Hexadecimal for a base-16 value using the digits 0 to 9 and the letters A to F. Start typing and the other two boxes fill in automatically.

Each box only accepts the digits that belong to its base, so a stray letter in the binary box shows a small note instead of corrupting the other fields. Hex input accepts upper or lower case (ff and FF are the same), and the hex result is always shown in upper case. Clear a box to empty all three. Values up to 64 binary digits (a full 64-bit number) are supported, and the math runs on whole numbers, so there is no rounding.

Worked example: 11111111 in binary

Binary is base 2, so reading from the right each place is worth double the one before it: 1, 2, 4, 8, 16, 32, 64, 128. The value 11111111 has a 1 in every one of those eight places, so you add them all up:

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

That gives 255 in decimal. To get hexadecimal, split the binary into groups of four bits from the right: 1111 and 1111. Each group of four bits is one hex digit, and 1111 is 15, written F. Two of them side by side give FF. So 11111111 = 255 = FF, which also happens to be the largest value that fits in a single 8-bit byte.

How binary, decimal, and hexadecimal relate

They are three ways of writing the same numbers, differing only in their base (how many digits they use). Decimal is base 10 and uses ten digits, 0 through 9, because it is what we count with by hand. Binary is base 2 and uses just two digits, 0 and 1, which maps perfectly onto a wire that is either off or on, so it is the language computers actually run on.

Hexadecimal is base 16 and uses sixteen digits, 0 through 9 then A through F (for 10 to 15). Its real trick is that 16 is two to the fourth power, so every hex digit stands for exactly four binary digits. That makes hex a compact shorthand for binary: instead of writing eight bits like 11111111 you write two hex digits, FF. One byte is eight bits, which is always two hex digits and a value from 0 to 255, which is why bytes and hex turn up together so often in memory addresses, colors, and machine code.

Frequently asked

How do I convert binary to decimal?

Add up the place value of every 1 bit. Reading right to left the places are 1, 2, 4, 8, 16 and so on, each double the last. For example 1011 is 8 plus 2 plus 1, which is 11 in decimal.

How do I convert binary to hexadecimal?

Group the binary digits into fours from the right, then write each group of four as one hex digit from 0 to F. For example 11111111 splits into 1111 and 1111, which is F and F, so FF.

What is 255 in binary?

255 in binary is 11111111, which is eight 1 bits. In hexadecimal it is FF. It is the largest value that fits in one 8-bit byte.

Build the logic that does this for real: open the lab and wire up an adder, or read the theory on binary numbers and hexadecimal.

Related tools: base converter, two's complement converter, and text to binary.

Open the lab →

Embed this tool

Free to embed in your course page, blog, or notes: just keep the credit link under the widget. Paste this where you want it:

<iframe src="https://digiwleea.wleeaf.dev/embed/tool/?w=binary-converter" width="100%" height="480" style="border:0;border-radius:12px;max-width:720px" title="Binary converter" loading="lazy"></iframe>