# Power-ful Computing

We’re generally familiar with the term exponential growth:

“Her business has been growing exponentially since its start 6 months ago.”

“My number of followers on Twitter has been growing exponentially since I started sharing cat memes.”

It’s doubtful how often the use of the term is mathematically correct, it seems to have slipped into common parlance.  What does it actually mean?  Well, it’s really quite simple.  If I take a number and double it, then double again, then again, then again, like this

3, 6, 12, 24, 48, …

then I have exponential growth.  You multiply each number by the same amount as you go along.  It doesn’t have to be doubling, you could multiply by three each time:

10, 30, 90, 270, 810

or indeed any other number.

If you were to graph these numbers, they would produce very similar-shaped curves:

One of the most common examples of exponential growth is the sequence starting with 1 that doubles each time:

1, 2, 4, 8, 16, 32, …

You might recognise some powers of 2 in there:

21 = 2
22 = 2 × 2 = 4
23 = 2 × 2 × 2 = 8
24 = 2 × 2 × 2 × 2 = 16
25 = 2 × 2 × 2 × 2 × 2 = 32

In this case, the graph would have equation y = 2x (the graphs above have equations y = 3×2x and y = 10×3x respectively).  Take a closer look at what I’ve just written and you may be able to deduce the value of 20. 

Now, apart from some pretty cool numbers that get big very quickly (and some luuurvely graphs) it turns out that exponential growth forms the foundations your computer is built on.  Let’s start, as they say, at the beginning.

Every computer is made up of millions (and often, nowadays, billions) of tiny transistors (switches), which turn the circuitry on or off.  This dual state produces two numbers, 1 and 0, which are representations of whether the transistor is ON or OFF, and so the computer “talks” in ones and zeros, or binary.  I’ll go into how binary works another day, for now we’ll stick with the idea of two states.

Each 1 or 0 is called a “bit”, and you can think of it as the smallest unit of storage on your computer.  With one bit you can have two states: 1 or 0.  But what about if you add another bit?  You now have the following possible states:

0 0
0 1
1 0
1 1

That’s four states.  Add a third bit and you have eight possible states:

0 0 0
0 0 1
0 1 0
1 0 0
0 1 1
1 0 1
1 1 0
1 1 1

Hold on a second… 2, 4, 8 (who do we appreciate?) this looks familiar!  With four bits you’d have 16 states (or combinations of 1s and 0s),  these are just powers of 2.  In fact, with 5 bits you’d have 25 (32) combinations and with n bits you have 2n combinations.  Once you reach 8 bits these are grouped together and called a “byte”, which contains 28 (256) combinations.  To give this some context, one byte can store a single letter, like J.  If you wanted your computer to do some calculations, one byte could work with the 256 numbers from 0 to 255.

Now, you’ve seen the word “byte” in widespread terms such as kilobyte, megabyte, gigabyte and terabyte.  In standard usage, kilo = 1000 (like 1 kilometre = 1000 metres.  1000 is 103), mega = 1,000,000 (or 106, so 1 megametre (Mm) = 1000 km), giga = 1,000,000,000 (or 109, so 1 Gm = 1000 Mm) and tera = 1,000,000,000,000 (or 1012, so 1 terametre (Tm) = 1000 Gm).  In computing, we have to work in powers of 2, as you’ve seen, so these prefixes are applied to the power of 2 nearest to 1000, which is 210 or 1024, so we have:

1 byte = 8 (23) bits
1 kilobyte (kB) = 1024 (210) bytes
1 megabyte (MB) = 1024 (210) kilobytes
1 gigabyte (GB) = 1024 (210) megabytes
1 terabyte (TB) = 1024 (210) gigabytes

Those numbers are so huge, your brain can’t really comprehend them. That 1TB external hard drive you bought to back up all your photos (or both of them, if you’re extremely paranoid, like me) contains information stored via 248 1s and 0s, thats about 280,000,000,000,000 (280 trillion) 1s and 0s. If you live to 80 years old you’ll have experienced around 2.5 billion seconds, so the number 248 is about the number of seconds contained in 111,000 lifetimes.

That’s exponential growth. And, even more insanely, according to Moore’s Law the number of transistors in a microchip doubles roughly every two years!

I wonder how many bits are taken up by all those cat memes?

 If 23 is 8, 22 is 4, 21 is 2, then 20 is …
Does this work for any other numbers raised to a power of zero?