AI & Computing

Number Base Converter (Binary, Octal, Decimal, Hex)

Type a number in any base to see it in binary, octal, decimal and hexadecimal.

Your numbers

Your results

Decimal
Decimal
—
Binary
—
Octal
—
Hexadecimal
—
In your extra base
—
Bits needed
—
Number of 1 bits
—

Number Base Converter (Binary, Octal, Decimal, Hex) by TheCalcTools

How the Number Base Converter (Binary, Octal, Decimal, Hex) works

Each digit’s value is multiplied by the base raised to its position. Binary (base 2) uses 0 and 1; hexadecimal (base 16) uses 0-9 and A-F, so one hex digit is exactly four bits.

Spaces and underscores are ignored, so you can paste grouped values like 1111 0000. Letters are case-insensitive.

The formula

Value = Σ digit × base^position

Worked example

Using the default values shown in the calculator:

Number255
Its baseDecimal (10)
Also show in base (2-36)3
  1. 255 in binary is 11111111 and in hexadecimal FF.
  2. It needs 8 bits.

Result:

Decimal255
Binary11111111
Octal377
HexadecimalFF
In your extra base100110
Bits needed8
Number of 1 bits8

Frequently asked questions

Why do programmers use hexadecimal?

Two hex digits describe one byte exactly, so memory addresses and colours (#FF8800) are compact and easy to map to bits.

Sources and further reading

More in AI & Computing · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.