How to Convert Binary Numbers

Binary (base-2) is the native language of every computer, router, and digital device on the planet. Every file you open, every pixel on your screen, and every character you type is ultimately stored as a sequence of 0s and 1s called bits. Understanding how to convert binary is the first step to understanding how computers think — and it takes less effort than you might expect. This guide walks through three conversion paths (binary → decimal, binary → octal, binary → hexadecimal) with multiple worked examples and step-by-step verification for each.

How Binary Positional Notation Works

Every number system is built on the same principle: each digit position represents a power of the base. In base-10 (decimal), the positions represent 1, 10, 100, 1000 — powers of 10. In base-2 (binary), the positions represent 1, 2, 4, 8, 16, 32, 64, 128 — powers of 2. The rightmost bit is always position 0, and each step to the left doubles the value. A bit that is 1 contributes its full positional value; a bit that is 0 contributes nothing.

Bit position76543210
Power of 22⁷2⁶2⁵2⁴2⁰
Decimal value1286432168421

Binary → Decimal: The Method

  1. Write the binary number and label each bit's position from 0 (rightmost) increasing to the left.
  2. Look up or calculate the positional value: 2^position (1, 2, 4, 8, 16, …).
  3. For every bit that is 1, note its positional value. Bits that are 0 contribute nothing.
  4. Add all the noted positional values together — that sum is the decimal equivalent.

Worked Example 1 — Convert (1011)₂ to Decimal

Label each bit with its position (right = 0) and its positional value:

Bit1011
Position3210
Positional value8421
Contributes8021
(1011)₂ = 11₁₀. Reverse-verify: 11 ÷ 2 = 5 R 1, 5 ÷ 2 = 2 R 1, 2 ÷ 2 = 1 R 0, 1 ÷ 2 = 0 R 1 → read remainders bottom to top: 1011 ✓

Worked Example 2 — Convert (11101001)₂ to Decimal

An 8-bit number. Identify the 1-bits at positions 7, 6, 5, 3, and 0 and sum their values:

Bit11101001
Position76543210
Positional value1286432168421
Contributes128643208001
(11101001)₂ = 233₁₀. This is also expressed as E9₁₆ and 351₈ — both verified in the examples below.

Binary → Octal: The 3-Bit Grouping Shortcut

The mathematical relationship 2³ = 8 makes binary and octal perfect partners. Every group of exactly 3 binary bits produces one octal digit (0–7). Because there are only 8 possible 3-bit patterns — from 000 to 111 — the mapping is simply a lookup table. No arithmetic is needed; just split and substitute.

3-bit binaryOctal3-bit binaryOctal
00001004
00111015
01021106
01131117
  1. Start from the rightmost bit and group into chunks of 3 moving left.
  2. If the leftmost group has fewer than 3 bits, pad it with leading zeros on the left.
  3. Replace each 3-bit group with its octal digit from the table above.

Worked Example — Convert (101101)₂ to Octal

Six bits divide evenly into two groups of 3 — no padding needed.

3-bit group101101
Octal digit55
(101101)₂ = (55)₈. Verify: 5×8 + 5 = 40 + 5 = 45₁₀. Binary check: 32+8+4+1 = 45₁₀ ✓

Worked Example — Convert (11101001)₂ to Octal

Eight bits: group from right in sets of 3. 8 is not a multiple of 3, so pad the leftmost group: 011 | 101 | 001.

3-bit group011101001
Octal digit351
(11101001)₂ = (351)₈. Verify: 3×64 + 5×8 + 1 = 192 + 40 + 1 = 233₁₀ ✓ (matches Example 2)

Binary → Hexadecimal: The 4-Bit Grouping Shortcut

Similarly, 2⁴ = 16, so every group of 4 binary bits maps to exactly one hex digit (0–9, A–F). Hexadecimal is more compact than octal — one byte (8 bits) is always exactly 2 hex digits, which is why hex dominates in computing: memory addresses, color codes (#RRGGBB), and cryptographic hashes all use hex.

4-bit binaryHexDecimal4-bit binaryHexDecimal
000000100088
000111100199
0010221010A10
0011331011B11
0100441100C12
0101551101D13
0110661110E14
0111771111F15
  1. Start from the rightmost bit and group into chunks of 4 moving left.
  2. Pad the leftmost group with leading zeros if it has fewer than 4 bits.
  3. Replace each 4-bit group with its hex digit from the table above.

Worked Example — Convert (11101111)₂ to Hexadecimal

Eight bits split into two groups of 4 from right to left.

4-bit group11101111
Decimal value1415
Hex digitEF
(11101111)₂ = (EF)₁₆. Verify: 14×16 + 15 = 224 + 15 = 239₁₀. Binary check: 128+64+32+8+4+2+1 = 239₁₀ ✓

Worked Example — Convert (11101001)₂ to Hexadecimal

Continuing from Example 2 (233₁₀): group the 8 bits into two 4-bit chunks.

4-bit group11101001
Decimal value149
Hex digitE9
(11101001)₂ = (E9)₁₆. Verify: 14×16 + 9 = 224 + 9 = 233₁₀ ✓ (matches all earlier results: 11101001₂ = 233₁₀ = 351₈ = E9₁₆)

When to Use Each Method

ConversionMethodSpeedNotes
Binary → DecimalPositional notation (sum powers of 2)ModerateAlways works; unavoidable for decimal output
Binary → Octal3-bit groupingVery fastNo arithmetic — pure lookup; best shortcut
Binary → Hex4-bit groupingVery fastNo arithmetic — pure lookup; industry standard
💡Memorize the 4-bit hex table (0000=0 through 1111=F). With that in memory, you can convert any binary number to hex in seconds — no calculator needed.

Frequently Asked Questions

Why does every binary number end in 0 if it is even, or 1 if it is odd?

The rightmost bit represents 2⁰ = 1. If that bit is 1, the number is odd (the other bits all contribute even values — powers of 2 greater than 0). If that bit is 0, the total is a sum of even numbers and therefore even. This is the binary equivalent of checking whether a decimal number ends in an odd or even digit.

What is the difference between binary and two's complement?

Standard (unsigned) binary represents only non-negative integers. Two's complement is an encoding for signed integers: the most significant bit is given a negative weight (−2^(n−1)), allowing representation of negative numbers without any special cases for addition and subtraction. Most modern processors use two's complement internally for all integer arithmetic.

Can binary represent fractions?

Yes — binary fractions use negative powers of 2 after a binary point. For example, 0.1₂ = 2⁻¹ = 0.5₁₀, and 0.011₂ = 2⁻² + 2⁻³ = 0.25 + 0.125 = 0.375₁₀. However, many decimal fractions (like 0.1) cannot be represented exactly in binary — this is the root cause of floating-point rounding errors in computers.

How do I quickly estimate the decimal value of a binary number?

Find the leftmost 1-bit and note its positional value — that tells you the order of magnitude. For example, if the leftmost bit is at position 6 (value 64), the number is between 64 and 127. Then add the remaining 1-bits to narrow it down. For a rough estimate, just use the leftmost bit's value.