Math & Science

Number Base

Binary, octal, decimal, hex

Instant results100% privateFree forever

Advertisement

Sponsored

Ready to calculate? Open the Number Base below, free, instant, no login.

Free · No login required · Results in seconds

Quick Answer

Number base conversion works by parsing the input in its original base, converting to decimal (base-10), then re-expressing that decimal in the target base. For example: binary 11111111 = decimal 255 = hex FF = octal 377.

What Is a Number Base?

A number base (or radix) system defines how many digits are used before the count rolls over to the next place value. Decimal uses base 10 (digits 0–9). Binary (base 2) uses only 0 and 1. Octal (base 8) uses digits 0–7. Hexadecimal (base 16) uses digits 0–9 plus letters A–F for values 10–15.

Different bases have real-world uses: Binary is fundamental to how all digital electronics work — every file and value in a computer is stored and processed as binary. Hexadecimal is used in programming because each hex digit represents exactly 4 binary digits, making binary values much shorter to write. Octal appears in Unix/Linux file permission systems.

This converter takes any number in binary, octal, decimal, or hexadecimal and shows all four representations simultaneously — useful for programmers, students, and anyone working with digital systems.

How to Use This Number Base

  1. 1Type your number in the input field.
  2. 2Select the base you're converting FROM: Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16).
  3. 3All four base representations update instantly.

The Formula Explained

Core method
Parse input in original base → decimal integer → re-express in each target base
Binary place values
11111111₂ = 1×128 + 1×64 + 1×32 + 1×16 + 1×8 + 1×4 + 1×2 + 1×1 = 255₁₀
Hex digits
A=10 B=11 C=12 D=13 E=14 F=15

Example: Convert decimal 255 to all bases

  • Binary: 11111111
  • Octal: 377
  • Hex: FF
255 (decimal) = 11111111 (binary) = 377 (octal) = FF (hex)

Tips & Things to Know

  • Hex is used in web colors: #FFFFFF = white, #000000 = black, #FF0000 = red.
  • One byte = 8 binary bits = 2 hex digits. Max value of one byte: 11111111₂ = FF₁₆ = 255₁₀.
  • Hex in code: 0xFF (C/Python), #FF (CSS), $FF (Assembly).

Frequently Asked Questions

What is binary and why do computers use it?

Binary (base 2) uses only 0 and 1. Computers use it because digital circuits have two states — off (0) and on (1) — which map naturally to binary digits.

What is hexadecimal used for?

Hexadecimal (base 16) is used in programming, web colors, and memory addresses because each hex digit exactly represents 4 binary bits, making binary much shorter to write.

How do you convert binary to decimal?

Multiply each binary digit by its positional power of 2 (rightmost = 2⁰ = 1) and add them all. For 1010: (1×8) + (0×4) + (1×2) + (0×1) = 10.

What does FF hex equal in decimal?

FF hex = (15×16) + 15 = 240 + 15 = 255. In binary that's 11111111 — all 8 bits of a byte set to 1.

What are Unix file permissions in octal?

Unix permissions like '755' are octal: 7 = 111 binary (read, write, execute), 5 = 101 (read, no write, execute), 0 = 000 (no permissions).

More Math & Science calculators

Advertisement

Sponsored

All Calculators

53 tools, free forever, no login

Most Used

All Calculators

Simple Interest

Quick interest calculation

Profit & Loss

Margin, markup and profit

ROI

Return on investment, annualized

Break-Even

Units to break even

Salary

Take-home after tax & deductions

FD Calculator

Fixed deposit maturity & interest

Inflation Calculator

Future cost & purchasing power loss

Net Worth

Assets minus liabilities

EMI Affordability

Max loan you can afford

Pip Value

Pip value per lot

Forex Margin

Margin required for any trade

Risk / Reward

Plan your trade R:R

DCA

Dollar cost averaging simulator

Stock Return

Total return incl. dividends

BMR / Calories

Daily calories by goal

Body Fat %

US Navy method

Ideal Weight

Range from 4 formulas

Water Intake

Daily hydration target

Calories Burned

By exercise type & duration

Age Calculator

Years, months, days

Date Difference

Days, weeks, months between dates

Percentage

Of, is, and change

Unit Converter

Length, weight, temp & more

Area

Area of common shapes

Volume

Volume of common solids

Speed / Distance / Time

Solve for any of the three

Number Base

Binary, octal, decimal, hex

Discount Calculator

Final price after % or flat discount

Ratio Calculator

Simplify ratios & solve proportions

Time Zone Converter

Convert time across 15 cities

Simple Calculator

Basic arithmetic calculator

Speed & Distance

km, miles, m/s — all formats

Temperature Converter

°C, °F, Kelvin, Rankine

World Cup Group Stage Simulator

Enter 6 scores, get full standings with FIFA tiebreakers

World Cup Third-Place Race Tracker

Track all 12 third-place teams chasing 8 knockout spots

Penalty Shootout Win Probability

Win odds from each team's penalty conversion rate

Fair Play Score Calculator

FIFA fair-play points from yellow/red cards — tiebreaker #6

Golden Boot Top Scorer Tracker

Rank up to 20 players in the World Cup top-scorer race

Grade Calculator

Percentage to letter grade

CGPA to %

Convert CGPA to percentage

Word Counter

Words, chars, reading time

Roman Numerals

Number ↔ Roman

Islamic Section

Zakat, Prayer Times & more

Islamic calculators live in their own dedicated section, Zakat, Nisab, Qibla, Hijri, Tasbih.

Open Islamic Tools →