Some Useful Tables

Binary-Hexadecimal

The values in the left two columns are bitwise complements of the values in the right two columns. This is useful for converting signed numbers.

Bin Hex Hex Bin
0000 0 F 1111
0001 1 E 1110
0010 2 D 1101
0011 3 C 1100
0100 4 B 1011
0101 5 A 1010
0110 6 9 1001
0111 7 8 1000

Decimal-Hexadecimal

The values in the left two columns are hexadecimal complements of the values in the right two columns. This is useful for converting signed numbers.

Dec Hex Hex Dec
0 0 F 15
1 1 E 14
2 2 D 13
3 3 C 12
4 4 B 11
5 5 A 10
6 6 9 9
7 7 8 8

Multiples of 16

The conversion algorithms between hexadecimal and decimal require multiplying 16 times a decimal digit. This table shows these products.

d d×16
0 0
1 16
2 32
3 48
4 64
5 80
6 96
7 112
8 128
9 144

Octal-Binary

Here are conversions between octal digits and binary.

Oct Bin
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

Powers of 10 and 2

This table shows the approximate relationship between powers of 10 and powers of 2 and their prefixes and abbreviations. The prefixes and abbreviations in parentheses are recommended for exact powers of 2. For example, a computer with 1 GiB (1 gibibyte) of memory has 230 = 1,073,741,824 bytes.

Prefix Abbreviation Power of 10 Power of 2
yocto y 10-24 2-80
zepto z 10-21 2-70
atto a 10-18 2-60
femto f 10-15 2-50
pico p 10-12 2-40
nano n 10-9 2-30
micro µ 10-6 2-20
milli m 10-3 2-10
100 20
kilo (kibi) K (Ki) 103 210
mega (mebi) M (Mi) 106 220
giga (gibi) G (Gi) 109 230
tera (tebi) T (Ti) 1012 240
peta (pebi) P (Pi) 1015 250
exa (exbi) E (Ei) 1018 260
zetta (zebi) Z (Zi) 1021 270
yotta (yobi) Y (Yi) 1024 280