Powers of 2

From SubSurfWiki
Jump to navigation Jump to search

A power of two means a number of the form 2n where n is an integer. Because two is the base of the binary number system, powers of two are common in and digital signals and computational applications.

Bit-depth Values Range
1 21 0 1 2 0, 1
2 22 00 01 10 11 4 –1 to +2
3 23 000 001 010 011 100 101 110 111 8 –3 to +4
4 24 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 16 –7 to +8
5 25 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 etc 32 –15 to +16
6 26 000000 000001 000010 000011 000100 000101 000110 000111 001000 001001 etc 64 –31 to +32
8 28 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 etc 256 –127 to +128
16 216 0000000000000000 0000000000000001 0000000000000010 0000000000000011 etc 65 536 -32 767 to +32 768
24 224 000000000000000000000000 000000000000000000000001 etc 16 777 216 –8 388 607 to +8 388 608
32 232 00000000000000000000000000000000 00000000000000000000000000000001 etc 4 294 967 296 –2 147 483 647 to +2 147 483 648
64 264 0000000000000000000000000000000000000000000000000000000000000000 etc 1.8 × 1019 ±9 × 1018
128 2128 You get the idea 3.4 × 1038 ±1.7 × 1019

External links