Scientific Notation

Category:  Computer Mathematics → Basics

The definition of a (normalized) scientific notation is given. Some examples of decimal and binary numbers are presented in the scientific notation. To understand the material, the reader should be familiar with binary numbers and basically understand how to convert decimal numbers to binary.

Basic definition

Any decimal number, say $z$, could be represented in the so-called scientific notation: $$z = m \times b^{e},$$ where $m$ is a significand (mantissa), $b$ - a base of the exponential function, а $e$ - an exponent (order). This representation is not unique, because different combinations of a significand and an exponent could give the same number. For example, 123 = 1,23×102 = 3×411 = 123000×10-3 = 123×20. Among all of the representations of that kind we are interested in only two: binary and decimal, i. e. when the base is either 2 or 10.

When the base $b=10$ in most calculators and computer programs scientific numbers are displayed inline with the help of the symbol e (or E) which denotes the exponent, because superscribed exponents like 102 cannot be displayed. For example, 1,23×102 = 1,23e2, 123000×10-3 = 123000e-3 or 765,43×105 = 765,43E5.

Normalized notation

Scientific notation is called normalized, when $1 \leq |m| < b$. For the decimal case ($b=10$) it means that the absolute value of a significand is a number (probably, fractional) between one and ten (not reaching ten). For example, −123,456 = −1,23456×102. Any decimal number could be represented in that kind of notation uniquely.

There are some difficulties for the case of $b=2$. The point is that in the decimal case we just need to move decimal point left or right (divide or multiply by 10) until satisfying the condition $1 \leq |m| < 10$, while in the binary case we have to divide or multiply by 2 until satisfying the condition $1 \leq |m| < 2$. For example, 17,125 = 1,0703125×24. Another example: 0,01 = 1,28×2−7.

Binary scientific notation

By virtue of the fact that the computer arithmetic is binary (sometimes binary-coded decimal), we have to convert decimal number to binary. It seems to be very simple, for example, 17,125(10) = 10001,001(2) = 1,0001001(2)×24. However, it is not that simple, because not every terminating decimal fraction could be represented as a terminating binary fraction. For example, 0,1(10) = 0,0(0011)(2) = 1,1(0011)(2)×2−4. In other words, we get a repeating fraction with the period 0011. The fact that it is not always possible to represent a terminating decimal fraction as a terminating binary fraction is very important to understand when working with computer arithmetic.

Examples

You can check youself while analysing the following examples.

z = 100
dec: 1×102
bin: 1,100100×26


z = 31,6875
dec: 3,16875×101
bin: 1,11111011×24


z = 0,296875
dec: 2,96875×10−1
bin: 1,0011×2−2


z = 0,7
dec: 7,0×10−1
bin: 1,(0110)×2−1


z = 3,1415926536…
dec: 3,1415926536…×100
bin: 1,1001001000011111101101…×21