# Powers of Two

This is a fundamentals post. You need those sometimes. Today’s goal is to know your powers of two.

For any readers who have not reached exponents in their math classes yet, this just means 2×2=4, 2x2x2=8, 2x2x2x2=16, 2x2x2x2x2=32, and so on. Even if you are completely innumerate, you have surely noticed that the numbers 128, 256, and 512 proliferate around computers. These are higher powers of two. Computers are binary (two-based), so everything tends to be in powers of two. We talk about gaming here, and lots of things in games are 50% chances, coin-flips, however they phrase it: it is all 2s, and if you know the basic math behind what is going on, you will better prosper and be emotionally and intellectually prepared for the likely outcomes. There are two that I want to focus on today.

2^5=32. 1 in 32 series of 5 coin flips will be all heads, another 1/32 all tails. If there is a 50-50 chance of something happening, there is a 1/32 chance of its happening (or not) 5 times in a row. That’s roughly a 3% chance: unlikely, but not exactly a rare event when you are doing something hundreds of times, so be ready for it. As a concrete example, if you are playing Tyrant and a Xeno Forcefield comes out, you can probably take it out in one attack. On average, it regenerates (refills its hit points) once, but about 3% of the time, you will need to knock that wall down 6 times before it stays down. Given how much you play whatever game it is, you may hit the 1 in 32 chance every day. Watch for it, plan for it.

2^10=1024. Ten doublings gives you a thousand. This is a convenient bit of quick arithmetic to keep in your head, mostly because it stacks. If ten doublings is one thousand, twenty is one million, and thirty is one billion (American billion or British milliard). Doubling adds up quickly. There is the old story about asking for a reward of a single grain of rice/wheat on the first square of a chessboard, 2 on the second, 4 on the third, 8 on the fourth, and so on. A chessboard has 64 squares, so it will still be a few from the end when we clear 1,000,000,000,000,000,000. Doubling is powerful, and most people lose track of how the exponents work. The easy math to remember is that 10 doublings gives you another set of ,000 on the end of a number. Use this to estimate large quantities.

: Zubon

## 6 thoughts on “Powers of Two”

1. ArcherAvatar says:

“Never tell me the odds!” – a hopeless, inveterate gambler in a galaxy far, far away.

(I had no idea how much I liked “fundamentals posts” until I read this one… nice.)

2. Jabberwockist says:

“Ten doublings gives you a thousand.”

“The easy math to remember is that 5 doublings gives you another set of ,000 on the end of a number.”

Shouldn’t that last “5” be a “10”?

1. Typo. Fixed. Thanks.

3. Aufero says:

It’s an admirable rule of thumb, but it used to give me fits when I was working tech support for a place that sold computer components. Explaining the difference in usage between binary gigabytes (used for computer memory: 2^30 bytes, or 1,073,741,824) and decimal gigabytes (used for hard drives: 10^9, or 1,000,000,000) to the occasional irate half-tech-literate customer who thought he’d been cheated out of hard drive space wasn’t fun.

4. As Tim Minchin says: to say that something which has a 1/1000000000 chance of happening is a miracle is to grossly underestimate the total number of things that happen.

1. In a world of 7 billion people, one in a million events happen 7,000 times a day.