Topic summary

Power of 2

Power of 2

Extracted from the Wikipedia article Power of two.

Computer science

Most computers use a binary (base two) representation of numbers, a number system in which each place represents a power of 2, and the only possible binary digits ("bits") are 0 and 1. Powers of two are thus ubiquitous in computing and computer science. Written in binary, a power of two always has the form 100...000 or 0.00...001, like a power of 10 in the decimal (base ten) system. Just as a decimal number can be multiplied by a power of ten by adding zeros or moving the decimal point, a binary number can be multiplied by a power of two using bit shifting (moving all of the bits a certain number of places to the left or right), one of the fastest available arithmetical operations.