Lec-1-Introduction To Numerical Computing
Lec-1-Introduction To Numerical Computing
Numeric Data
Numerical computing may involve two types of data: discrete data and continuous data.
Data that are obtained by counting are called discrete data. Examples of discrete data
are total number of students in a class, total number of items in a box etc.
Data that are obtained through measurement are called continuous data. Example of
continuous data is the temperature of a patient as measured by a thermometer.
Page 1 of 4
MSA / L-1 CSE-4745 - Numerical Methods July 25, 2022
Page 1 of 4
MSA / L-1 CSE-4745 - Numerical Methods July 25, 2022
than others. Some methods may not converge at all. It is, therefore, important to test for
convergence before a method is used.
Numerical Stability: Errors introduced into computation, from whatever source,
propagate in different ways. In some cases these errors tend to grow exponentially, with
disaster computational results. A computing process that exhibits such exponential error
growth is said to be numerically unstable. We must choose methods that are not only fast
but also stable.
Numerical instability may also arise due to ill-conditioned problems. There are many
problems which are inherently sensitive to round off errors and other uncertainties.
Thus, we must distinguish between sensitivity of the methods and sensitivity inherent
in problems. When the problem is ill-conditioned, there is nothing we can do to make
a method to become numerically stable.
Efficiency: Efficiency in numerical method means the amount of effort required by both
human and computer to implement the method. A method that requires less of computing
time and less of programming effort and yet achieves the desired accuracy is always
preferred.
Page 1 of 4
MSA / L-1 CSE-4745 - Numerical Methods July 25, 2022
Representation of Numbers
All modern computers are designed to use binary digits to represent numbers and other
information. The memory is usually organized into strings of bits called words.
The largest number a computer can store depends on its word length. For example, the
largest binary number a 16 bit word can hold is 16 bits of 1. This binary number is
equivalent to a decimal value of 65535. The following relation gives the largest decimal
number that can be stores in a computer:
Largest number = 2n – 1
where n is the word length in bits. Thus, we see that the greater number of bits, the larger
the number that may be stored.
Integer representation
Decimal numbers are first converted into the binary equivalent and then represented in
either integer or floating-point form.
For integers, the decimal or binary point is always fixed to the right of the least
significant digit and therefore, fraction are not included. The magnitude of the number is
restricted to 2n –1 where n is the word length in bits.
Again, negative numbers are stored by using the 2’s complement. This is achieved by
taking the 1’s complement of the binary representation of the positive number and then
adding 1 to it. [Example 3.8, Balagurusamy, Page-50]
If we reserve one bit to represent the sign of the number, called sign bit, we have only n-1
bits to represent the number. Thus a 16bit word can contain numbers –2 15 to 215 – 1
(i,e. –32768 to 32767). Generally, if the sign bit is 1, the number is negative and if the
sign bit is 0, the number is positive.
Page 1 of 4