Number Systems

Binary / Decimal / Hex Reference

Side-by-side table of 0–255 in binary, decimal, hexadecimal, and octal.

0 – 31

DecimalBinaryHexOctal
00000000000000
10000000101001
20000001002002
30000001103003
40000010004004
50000010105005
60000011006006
70000011107007
80000100008010
90000100109011
10000010100A012
11000010110B013
12000011000C014
13000011010D015
14000011100E016
15000011110F017
160001000010020
170001000111021
180001001012022
190001001113023
200001010014024
210001010115025
220001011016026
230001011117027
240001100018030
250001100119031
26000110101A032
27000110111B033
28000111001C034
29000111011D035
30000111101E036
31000111111F037

32 – 63

DecimalBinaryHexOctal
320010000020040
330010000121041
340010001022042
350010001123043
360010010024044
370010010125045
380010011026046
390010011127047
400010100028050
410010100129051
42001010102A052
43001010112B053
44001011002C054
45001011012D055
46001011102E056
47001011112F057
480011000030060
490011000131061
500011001032062
510011001133063
520011010034064
530011010135065
540011011036066
550011011137067
560011100038070
570011100139071
58001110103A072
59001110113B073
60001111003C074
61001111013D075
62001111103E076
63001111113F077

Common boundaries

DecimalBinaryHexOctal
64100000040100
1281000000080200
19211000000C0300
22411100000E0340
24011110000F0360
24811111000F8370
25211111100FC374
25411111110FE376
25511111111FF377
100110010064144
20011001000C8310
1024100000000004002000
655351111111111111111FFFF177777
10485761000000000000000000001000004000000

Powers of 2

ExponentDecimalNote
2⁸2561 byte
2¹⁰1,0241 KiB (≈ 1K)
2¹⁶65,5362 bytes / uint16 range
2²⁰1,048,5761 MiB
2³²4,294,967,296uint32 range
2⁶⁴1.844 × 10¹⁹uint64 range

Notes

  • Hex prefixes: 0x (C / most), # (colors), $ (assembly).
  • Octal prefix: 0 (C legacy) or 0o (modern).
  • Binary prefix: 0b (most languages).
Was this article helpful?