Converters

Number Systems Explained: Binary, Octal, Decimal and Hex

Learn how binary, octal, decimal, and hexadecimal number systems relate, and why hexadecimal is so useful for programmers.

Brekzy Team Published September 8, 2026

On this page
  1. The Four Common Number Systems
  2. Why Hexadecimal Is Convenient for Programmers
  3. Worked Example
  4. Common Mistakes
  5. Use the Number Base Converter

The number you write as “202” in everyday decimal is exactly the same value as 11001010 in binary, 312 in octal, or CA in hexadecimal, they’re just four different ways of writing the same quantity, each useful in different contexts.

The Four Common Number Systems

  • Decimal (base 10): the everyday number system, using digits 0 to 9.
  • Binary (base 2): the system computers use natively, using only 0 and 1.
  • Octal (base 8): uses digits 0 to 7, historically used in some computing contexts.
  • Hexadecimal (base 16): uses digits 0 to 9 plus letters A to F, widely used by programmers.

Why Hexadecimal Is Convenient for Programmers

Each hexadecimal digit represents exactly 4 binary bits (since 16 = 24), so a long binary string can be written far more compactly in hex without losing any structure, converting between the two is just a matter of grouping bits four at a time. This is why hex shows up constantly in programming contexts like memory addresses and color codes.

Worked Example

The number 202 (decimal) written in each system:

System Value
Decimal (base 10) 202
Binary (base 2) 11001010
Octal (base 8) 312
Hexadecimal (base 16) CA

Common Mistakes

  • Reading a hex or binary number as if it were decimal. “CA” in hex is 202, not “ninety-something”; the same digits mean different things depending on the base.
  • Forgetting hex uses letters A to F. Hexadecimal digits go from 0 to 9 and then A (10) through F (15), not just 0 to 9 repeated.
  • Assuming octal is still common. It’s mostly a historical artifact today (from early computing with 6-bit or 12-bit words); hexadecimal is far more common in modern programming.

Use the Number Base Converter

The Number Base Converter converts between binary, octal, decimal, and hexadecimal instantly.

Try it yourself

Number Base Converter

Try our Number Base Converter →

Frequently Asked Questions

Why do computers use binary?

Because digital circuits naturally represent two states (on/off, high/low voltage), binary’s two digits (0 and 1) map directly onto that hardware reality.

How do I convert hex to decimal?

Multiply each hex digit by 16 raised to its position power, then sum the results. Using a converter avoids doing this by hand for anything beyond a couple of digits.

Why do programmers use hexadecimal instead of binary?

Hexadecimal represents the exact same information as binary but far more compactly, since each hex digit stands in for 4 binary digits, making long values much easier to read and write.

Is octal still used today?

Rarely. It was more common in early computing systems built around 6-bit or 12-bit word sizes; hexadecimal has largely replaced it in modern programming.

What are the valid digits in hexadecimal?

0 through 9, followed by A through F, representing the values 10 through 15.

Explore More

Find the right tool, or keep reading Brekzy's other guides.