The fomula for the number of combinations possible given N bits is:
combinations = 2 ^ N = (2 to the power of N)
So an enumeration of W items will require a minimum of:
N = log2 (W)
Here are some real world examples of enumeration from Atari 2600 games. For each item calculate the minimum bits the program must use to keep track of the particular piece of information.
1. The catridge combat has 27 game variations, what is the minimum number of bits the combat program can use to keep track of the current variation?
2. The 112 game variations for Space Invaders.
3. The Atari 2600 Display is 160 pixels horizontally by 192 pixels vertically (NTSC) To position a player on the screen you must enumerate its horizontal and vertical position. How many bits are needed to store the horizontal and vertical positions of the player?
4. In Surround the "arena" is 40 blocks wide by 20 blocks high. Each block in the playfield is either filled or empty. How many bits are needed to remember the status of the playfield? How many bits are needed to remember the horizontal and vertical position of each player?
I will post the answers in 24 hours.
And even when he posted the answers, it went over my head. I don't understand the formula at all. Could someone please explain this to me?
Edited by Tl20N, Sat Feb 12, 2011 3:42 AM.