Off The Wall: How Many Combinations?

How big is 64K, really? Have you ever wondered exactly how many possible combinations there are in 65536 memory locations, each capable of assuming values from 0 to 255? Well, 64K bytes is 524288 bits, so the number of possibilities is 2**524288, or about 2.6E157826 (26 followed by 524,287 zeros). Printing this number in decimal would take 225 screens on your computer display.

While we can express such numbers, they are obviously far beyond our power to comprehend. So let’s break the problem down to a “manageable” magnitude, and just consider a paltry eight bytes. In other words, how many different custom characters can be generated on the Spectrum/2068? It won’t take your computer long to tell you that 2**64 = 1.84E19. There, that’s better. Or is it? You could write a simple program (see Paul Bingham‘s bit generator for starters) consisting of eight nested loops, each running from 0 to 255. If the 2068 can generate 10 such characters per second (actually pushing it a little) how long will it take to run the program?

Well, I’ll tell you: just a little over 58 BILLION YEARS. If you printed each character on the TS2040, 32 characters per line, the resulting printout would circumscribe the known solar system (orbit of Pluto) 50 times. Astronomers – feel free to check my figures.

-fn