Number base converter

Choose the base you have and the base you want. 255 in decimal = 11111111 in binary = FF in hex.

111111112
255 in base 10 = 11111111 in base 2
1111 1111binary (base 2)
377octal (base 8)
255decimal (base 10)
FFhexadecimal (base 16)

How base conversion works

In base b, each digit is worth a power of b. To read 1011₂: 1×8 + 0×4 + 1×2 + 1×1 = 11. To convert 11 to binary, divide by 2 repeatedly and read the remainders bottom-up: 11 → 5 r1 → 2 r1 → 1 r0 → 0 r1, giving 1011.

Bases above 10 use letters: A = 10, B = 11, … Z = 35.

Decimal, binary and hex from 0 to 32

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020

Frequently asked questions

What is 255 in hexadecimal?
FF.
Why do computers use binary?
Digital circuits have two stable states, on and off, which map directly to 1 and 0.