Base Converter

Convert numbers between Binary, Octal, Decimal, and Hexadecimal

Advertisement Ad

Number Bases Explained

01

Binary

Binary (Base 2) uses only two digits: 0 and 1. It is the fundamental language of computers, where each digit (bit) represents an electrical state (off or on). Binary numbers are prefixed with 0b.

Example: 0b1010 = 10 (decimal)
0-7

Octal

Octal (Base 8) uses digits from 0 to 7. It was widely used in early computing as a compact representation of binary (3 bits = 1 octal digit). Octal numbers are prefixed with 0 or 0o.

Example: 012 = 10 (decimal)
0-9

Decimal

Decimal (Base 10) uses digits from 0 to 9. It is the most common number system used by humans, based on the ten fingers. Decimal numbers have no prefix.

Example: 10 = 10 (decimal)
0-F

Hexadecimal

Hexadecimal (Base 16) uses digits from 0 to 9 and letters A to F (representing 10-15). It is widely used in programming for representing colors, memory addresses, and binary data. Hexadecimal numbers are prefixed with 0x.

Example: 0xA = 10 (decimal)