Calculatormatics.com

Binary to Decimal Converter — Number System Converter

Type in any field and all others update instantly. Converts between decimal (base 10), binary (base 2), hexadecimal (base 16), and octal (base 8). Shows step-by-step conversion work.

Type in any field — all other fields update automatically. Supports integers 0 to 4,294,967,295 (32-bit).
255 (decimal) = 11111111 (binary) = FF (hex) = 377 (octal)
Decimal to Binary — step-by-step:
Converting 255 to binary by repeated division by 2:

  255 ÷ 2 = 127 remainder 1
  127 ÷ 2 = 63 remainder 1
  63 ÷ 2 = 31 remainder 1
  31 ÷ 2 = 15 remainder 1
  15 ÷ 2 = 7 remainder 1
  7 ÷ 2 = 3 remainder 1
  3 ÷ 2 = 1 remainder 1
  1 ÷ 2 = 0 remainder 1

Reading remainders bottom-to-top: 11111111
255 (decimal) = 11111111 (binary)
Decimal to Hexadecimal — step-by-step:
Converting 255 to hexadecimal (base 16):

  255 ÷ 16 = 15 remainder 15 (F)
  15 ÷ 16 = 0 remainder 15 (F)

Reading remainders bottom-to-top: FF
255 (decimal) = FF (hex)
Quick Reference: 0–15
DecimalBinaryHexOctal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17

Number Systems Explained

A number system is a method for representing quantities. The number we write as "twelve" can be expressed in many different ways depending on the base (radix) used. The base tells you how many unique digits the system uses before "rolling over" to the next positional column.

All number systems share the same underlying positional principle: the value of a digit depends on both the digit itself and its position. The position represents a power of the base.

Decimal (Base 10)

Decimal is the number system humans use in everyday life. It uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Each position represents a power of 10: ones (10&sup0;), tens (10¹), hundreds (10²), thousands (10³), and so on.

Example: the number 2,394 = (2 × 10³) + (3 × 10²) + (9 × 10¹) + (4 × 10&sup0;) = 2,000 + 300 + 90 + 4.

Decimal likely became the dominant number system because humans have ten fingers. Many ancient civilizations independently converged on base-10 counting for this reason.

Binary (Base 2)

Binary uses only two digits: 0 and 1. Each position represents a power of 2. Binary was formalized by Gottfried Leibniz in 1703 (influenced by Chinese I Ching hexagrams) and became the foundation of all digital computing.

Example: binary 1101 = (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2&sup0;) = 8 + 4 + 0 + 1 = 13 (decimal).

Common binary patterns in computing:

Hexadecimal (Base 16)

Hexadecimal uses sixteen symbols: 0–9 for the first ten values, then A–F for 10–15. A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

The key advantage: one hex digit represents exactly 4 binary bits (a nibble). This makes hex a compact shorthand for binary. A byte (8 bits) is exactly 2 hex digits. A 32-bit value is exactly 8 hex digits.

Example: hex FF = (15 × 16¹) + (15 × 16&sup0;) = 240 + 15 = 255 (decimal) = 11111111 (binary).

Where you see hex every day:

Octal (Base 8)

Octal uses eight digits: 0–7. Each octal digit represents exactly 3 binary bits. Octal was prevalent in early computing (the PDP-8, IBM System/360) because it maps neatly to groupings of 3 binary digits, making it easier to read binary by hand.

Example: octal 377 = (3 × 8²) + (7 × 8¹) + (7 × 8&sup0;) = 192 + 56 + 7 = 255 (decimal) = 11111111 (binary).

Octal is still widely used in Unix/Linux file permissions. The chmod command uses three-digit octal numbers:

Each permission group (owner, group, others) has 3 bits: read (4), write (2), execute (1). A digit of 7 = 4+2+1 = all three permissions. A digit of 5 = 4+0+1 = read and execute only.

Conversion Cheat Sheet

Decimal Binary Hex Octal
0000000
81000810
101010A12
151111F17
16100001020
64100000040100
1281000000080200
25511111111FF377
256100000000100400
1024100000000004002000
655351111111111111111FFFF177777

Frequently Asked Questions

How do I convert decimal to binary?

To convert decimal to binary, repeatedly divide the number by 2 and record the remainders. Then read the remainders from bottom to top. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1. Reading remainders bottom-to-top: 1101. So 13 in decimal = 1101 in binary.

How do I convert binary to decimal?

To convert binary to decimal, multiply each binary digit (bit) by its positional value (powers of 2) starting from the right, then sum the results. Example: 1101 = (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰) = 8 + 4 + 0 + 1 = 13.

Why do computers use binary?

Computers use binary (base-2) because electronic circuits have two easily distinguishable states: high voltage (1) and low voltage (0). These two states map directly to binary digits. Representing three or more states reliably at high speeds would require much more complex and error-prone hardware. All digital data — text, images, video, programs — is ultimately stored and processed as binary.

What is hexadecimal used for?

Hexadecimal (base-16) is used extensively in computing because it provides a compact way to represent binary data. Each hex digit represents exactly 4 binary bits, so a byte (8 bits) can be written as 2 hex digits instead of 8 binary digits. Common uses: color codes in HTML/CSS (e.g., #FF5733), memory addresses, MAC addresses, error codes, and assembly language programming.

What is octal and where is it used?

Octal (base-8) uses digits 0–7. Each octal digit represents exactly 3 binary bits. Octal was commonly used in older computer systems and Unix file permissions. In Unix/Linux, file permissions are often expressed as three-digit octal numbers (e.g., chmod 755 sets permissions to rwxr-xr-x). While less common in modern programming than hexadecimal, octal appears in many legacy systems and low-level programming contexts.

Related Calculators