CSC300: Counting and logarithm [3/9] |
We are all used to counting by adding one (arithmetic series):
0 1 2 3 4 5 6 7 ... N
You can also count by multiplying by two (geometric series):
1 2 4 8 16 32 64 128 ... N
There is an inverse operation, called logarithm.
People often write lg
for the base 2 logarithm.
lg(1) = 0 lg(thousand) ~ 10 lg(2) = 1 lg(million) ~ 20 lg(4) = 2 lg(billion) ~ 30 lg(8) = 3 lg(trillion) ~ 40 lg(16) = 4 lg(quadrillion) ~ 50 lg(32) = 5 lg(quintillion) ~ 60 lg(64) = 6 lg(128) = 7 lg(256) = 8 lg(512) = 9 lg(1024) = 10