| Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|||||
| First Prev [ 1 2 ] Next Last |
Because two is the base of the binary system, powers of two are important to computer science. Specifically, two to the power of n is the number of ways the bits in a binary integer of length n can be arranged, and thus numbers that are one less than a power of two denote the upper bounds of integers in binary computers (one less because 0, not 1, is used as the lower bound). As a consequence, numbers of this form show up frequently in computer software. As one example, in the video game The Legend of Zelda for the 8-bit Nintendo, one can only hold 255 rupees at one time - the result of a byte, which is 8 bits long, being used to store the number, giving a maximum value of 28-1 = 255.
Powers of two also measure computer memory. A byte is eight (23) bits, and a kilobyte (some prefer the word kibibyteA Kibibyte (a contraction of ki lo bi nary byte is a unit of information or computer storage. 1 Kibibyte 210 bytes 1 024 bytes Byte 3 bytes 1 000 bytes. It is abbreviated Ki-, as in KiB for kibibytes. See also Binary prefix Units of information.) is 1 024 (210) bytes. Nearly all processor registersIn computer architecture, a processor register is a small amount of very fast computer memory used to speed the execution of computer programs by providing quick access to commonly used values—typically, the values being in the midst of a calculation at a have sizes that are powers of two (32 being currently used in most personal computersThe term personal computer or PC has three meanings: IBM's range of PCs that led to the use of the term see IBM PC. A generic term used to describe all microcomputers (mentioned here). A generic term sometimes used to describe a computer based on IBM's or).
Powers of two occur in a range of other places as well. For many disk drives, at least one of the sector size, number of sectors per track, and number of tracks per surface is a power of two. The logical block size is almost always a power of two.
Numbers which are not powers of two occur in a number of situations such as video resolutions, but they are often the sum or product of only two or three powers of two, or powers of two minus one. For example, 640 = 512 + 128, and 480 = 32 × 15. Put another way, they have fairly regular bit patterns.
A prime numberIn mathematics, a prime number or prime for short, is a natural number whose only distinct positive divisors are 1 and itself; otherwise it is called a composite number . Hence a prime number has exactly two divisors. The number 1 is neither prime nor com that is one less than a power of two is called a Mersenne primeIn mathematics, a Mersenne prime is a prime number that is one less than a power of two. For example, 3 4 − 1 22 − 1 is a Mersenne prime; so is 7 8 − 1 23 − 1. On the other hand, 15 16 − 1 24 − 1, for example, is not a. For example, the prime number 31 is a Mersenne prime because it is 1 less than 32 (25).
| 22 two is the natural number following 1 and preceding 3. Prefixes for 2 are di- ( Greek) and duo- ( Latin). Evolution of the glyph The glyph we use today in the Western world to represent the number 2 traces its roots back to the Brahmin Indians, who wrot | 2 048 | 2 097 152 | 2 147 483 648 | |||||||||||
| 4 | 4 096 | 4 194 304 | 4 294 967 296 | |||||||||||
| 8 | 8 192 | 8 388 608 | 8 589 934 592 | |||||||||||
| 16 | 16 384 | 16 777 216 | 17 179 869 184 | |||||||||||
| 32 | 32 768 | 33 554 432 | 34 359 738 368 | |||||||||||
| 64 | 65 536 | 67 108 864 | 68 719 476 736 | |||||||||||
| 128 | 131 072 | 134 217 728 | 137 438 953 472 | |||||||||||
| 256 | 262 144 | 268 435 456 | 274 877 906 944 | |||||||||||
| 512 | 524 288 | 536 870 912 | 549 755 813 888 | |||||||||||
| 1 024 | 1 048 576 | 1 073 741 824 | 1 099 511 627 776 |