Skip to content
A2ZCalc

Numbers Converter

Convert numbers between binary, octal, decimal, hexadecimal and any custom base from 2 to 36 with instant two-way conversion.

Written by Rahman · Last reviewed

Quick answer

Number base conversion rewrites a value in a different radix: binary (base 2), octal (base 8), decimal (base 10) or hexadecimal (base 16). The value itself never changes, only the notation. Hexadecimal is ubiquitous in computing because each hex digit maps to exactly four binary digits, so one byte is always exactly two hex characters.

Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF

About the Numbers Converter

Number systems represent values using different bases. Decimal (base 10) is everyday counting, while binary (base 2), octal (base 8) and hexadecimal (base 16) are used in computing and digital electronics.

This converter translates a number from any of these bases into all the others instantly.

Why hexadecimal is the base programmers actually use

Binary is how machines store numbers and it is unreadable at length. Hexadecimal exists because of an exact relationship: sixteen is two to the fourth, so one hex digit represents exactly four bits with no remainder. Any binary number splits into hex digits by grouping bits in fours, with no arithmetic required.

The number 255 is 11111111 in binary, 377 in octal and FF in hex. The hex form is two characters and maps directly onto the two four-bit halves of a byte, which is why memory addresses, colour codes and byte values are all written that way.

  • A byte is eight bits, so exactly two hex digits: values 00 to FF.
  • Octal groups three bits at a time and survives mainly in Unix file permissions, where three bits per permission set is exactly what is needed.
  • Colour codes like #FF8800 are three bytes: red, green and blue, each 00 to FF.

The same bits can mean different numbers

A binary pattern does not carry its own interpretation. The eight bits 11111111 are 255 when read as an unsigned integer and −1 when read as a signed one, and nothing in the bits themselves says which is intended.

Signed values are normally stored in two's complement, where the top bit indicates sign and the negative values are formed by inverting and adding one. That gives an eight-bit signed range of −128 to 127 against an unsigned range of 0 to 255: the same 256 patterns, mapped to different numbers.

  • This converter treats input as unsigned. Interpreting a stored value as signed requires knowing the width and the convention it was written with.
  • Overflow is the practical consequence: adding 1 to the largest value in a fixed width wraps to the smallest rather than growing.
  • Byte order matters once numbers span multiple bytes: the same value can be stored most significant byte first or last, which is why endianness has to be agreed between systems.

Frequently Asked Questions

What is binary?

⌄

Binary is base 2: it uses only the digits 0 and 1. It is the fundamental number system computers use internally.

Why is hexadecimal used in computing?

⌄

Hexadecimal (base 16) is a compact way to write binary: each hex digit represents exactly four binary digits, making long values easier to read.

What does the decimal number 255 look like in other bases?

⌄

255 is 11111111 in binary, 377 in octal and FF in hexadecimal.

More Common Converters