Expotential form

From Compsci1

Revision as of 20:15, 11 October 2006 by Admin (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)

Exponential form

When numbers are very large or very small they are written in Scientific Notation
     n
a x 10       1<a<10
<
Write the following in Scientific Notation:
58 000 000				.035
48600					.00478
1 430 000 000				.000 000 000 893
228 000 000				.00064

Rewrite the above putting the decimal point directly in front of the first non zero digit:
58 000 000				.035
48600					.00478
1 430 000 000				.000 000 000 893
228 000 000				.00064

This is called exponential form: The number is called the MANTISSA.

The power is called the EXPONENT.

Binary Exponential Form:

In binary exponential form we use powers of 2 instead of powers of 10.

Examples of binary numbers written in binary exponential form with exactly 5 bits.

Binary number	Exponential form	Mantissa	Exponent/power

1010.1
0.001111
-111
0.1
-0.01010101	0.10101 x 24
0.11110 x 2-2
-0.11100 x 23
0.100000 x 20
-0.10101 x 2-1	0.10101
0.11110
-0.11100
0.10000
0.10101	4
-2
3
0
-1

Binary numbers as above are stored in the computer in their binary exponential form. Each number has 3 pieces of information to be stored –

• the sign of the number

• the mantissa

• the power or exponent

To store this number the computer has 3 blocks of storage, eg, with a 32 bit memory we could store a binary exponential as follows

1 bit for sign
0= +
1= -	7 bits for the exponent	24 bits to store the mantissa

This is called FLOATING POINT REPRESENTATION. The sign bit: This is 0 for a positive number and 1 for a negative number

The mantissa: Convert a decimal number to binary by dividing the part before the decimal point repeatedly by 2 and writing the remainders from the bottom up. Multiply the decimal part repeatedly by 2 and write the carrys from the top down.

The exponent or power: This can be stored in two ways:- Firstly it can be stored as a positive number if it is positive and store as its 2’s complement if it is negative.

Or

Store as its characteristic. The characteristic is calculated by n + 2t-1 , t is the number of bits for storing the exponent. Most computers use the characteristic for storing powers/exponents.

Eg to store the number -110111100.011101

A; Convert to exponential form

= - 0.110111100011101 x 29

B:-

The sign bit is 1 as the number is negative

C:-

The mantissa is

110111100011101

As we want the mantissa to be 24 bits we add zeros after to make up the correct number of bits

D:-

The characteristic is: n + 2t-1

We have 7 bits for the exponent so t = 7

n + 2t-1 =

9 + 27-1 =

9 + 26 =

9 + 64 = 73 = 1001001 in binary

So, the floating point representation of my number is:-

1	1001001	110111100011101000000000
Sign	characteristic		mantissa
Personal tools
Handy Pages