MIME-Version: 1.0 Content-Location: file:///C:/915B48F2/Powersof2.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii" Powers of 2

# Powers of 2

It is important for a Computer Scientist to know the p= owers of 2.  You need to know how much data can fit in a given number of bits.  Below are some values that you may frequently encounter.

 n 2n 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 9 512 10 1024 11 2048 12 4096 20 1048576 30 1073741824<= /p>

Notice that 210 is approximately 103.  If you want to determine the approximate largest value that will fit in a large number of bits you can use the following algorithm.

B =3D number of bits

T =3D B / 10 &nbs= p;            &= nbsp;     integer division  = (first decimal digits)

R =3D B mod 10 &n= bsp;            remainder of above division (last decimal dig= it)

Using the above table get M =3D 2R

Decimal value is M * 103T

For example: DES keys are 5= 6 bits in length.  How many possible = key values are there?

T =3D 5  &nb= sp; R =3D 6   M =3D 64

There are approximately 64 * 1015 possible = key combinations.