Nexus Learn

Binary, decimal, hex and octal converter

Type a number, pick its base, and see it in binary, octal, decimal and hexadecimal at once, with the working shown. Everything runs in your browser.

Binary (2)-
Octal (8)-
Decimal (10)-
Hexadecimal (16)-

Working

How number bases work

A base tells you how many digits a number system uses. Decimal uses ten digits (0 to 9). Binary uses two (0 and 1), octal uses eight (0 to 7), and hexadecimal uses sixteen (0 to 9 and A to F).

Each place in a number is worth a power of the base. In binary, 1011 means 1×8 + 0×4 + 1×2 + 1×1 = 11.

Convert decimal to binary by hand

Divide the number by 2 again and again and write down each remainder. Read the remainders from last to first. For 13: 13÷2 = 6 r 1, 6÷2 = 3 r 0, 3÷2 = 1 r 1, 1÷2 = 0 r 1. Reading upwards gives 1101.

Quick tips for hex

One hex digit is exactly four binary digits, so you can convert in groups of four bits. For example, binary 1111 0101 is hex F5. Hex is popular because it is a short way to write long binary values such as colours (#FF8800) and memory addresses.

Common values

DecimalBinaryOctalHex
81000108
10101012A
15111117F
16100002010
64100000010040
25511111111377FF

More free tools: truth table generator · CS MCQs · Big-O cheat sheet