64K bytes: 216 = 2(6 + 10) = 26 × 210 = 64K
| Number |
|Number of Patterns|
as power of two
Many calculations involving bit patterns use the following familiar fact of arithmetic. (Although the fact is familiar, confusion is even more familiar. Be sure you know this factoid.)
It is not too much work to extend the table, as shown at right. You can always make this table from scratch, but memorizing a few key values does not hurt.
The numbers of patterns that can be formed with 10 or
more bits are usually expressed as multiples of 1024
(= 210) or in "Megs"
how many patterns can be formed from 24 bits?
224 = 24 × 220 = 16 Meg
The power of two (24) splits into a small part (24) and a part that has a name (220 = Meg). This is a useful trick you can use to amaze your friends and impress employers.
Some audio cards use 12 bits to represent the sound level at an instant in time (12 bits per sample). How many signal levels are represented?
212 = 22 × 210 = 4K levels
You wish to save a GIF image using either 6 bits per pixel or 8 bits per pixel. Saving the image with 8 bits per pixel takes somewhat more memory. Which should you choose?