1
LECTURE 1.1
Dr. Vyas
Overview: (Covers pages 13 – 27)
•
Binary Integer and Fraction representation
•
Definition of Error and significant digits
•
Examples/programs
•
Machine Computation (Appendix I, left to students as self study material)
I. Base Numbers
1.
The arithmetic that we commonly use to communicate the process of scientific
computation is in
base 10
(decimal form
). The following is implied by
base 10
:
Let
N
be any positive integer, then
1
2
2 1 0
k
k
k
N
a a
a
a a a


=
K
, where
{0,1,2,3,4,5,6,7,8,9}
k
a
∈
.The
base 10
is clearly seen via the equivalent
expression,
1
1
0
1
1
0
10
10
10
10
k
k
k
k
N
a
a
a
a


=
×
+
×
+
×
+
×
K
2.
For example,
3
2
1
0
1257
1000 200 50 7
1 10
2 10
5 10
7
10
=
+
+
+
=
×
+
×
+
×
+
×
3.
The digital computer uses the
base 2
(binary form
) system to compute the
required computations. However, our interaction with the computer is via the
decimal
form which computer converts into equivalent
binary form
, computes
what is required by the user in the
binary form
, and returns the computed results
to the user after reconverting into the
decimal form
. Therefore, it is important to
refresh the fundamental aspects of the binary calculations and approximations.
4.
The following is implied by
base 2
: Let
N
be any positive integer, then
1
2
2 1 0
k k
k
N
b b b
b b b


=
K
, where
{0,1}
k
b
∈
.The
base 2
is clearly seen via an
equivalent expression,
1
1
0
1
1
0
2
2
2
2
k
k
k
k
N
b
b
b
b


=
×
+
×
+
×
+
×
K
Example 1:
Convert
1257
to an equivalent binary form
The solution is best described in a tabular form,
10 9 8 7 6 5 4 3 2 1 0
10011101001 10011101001
two
N
b b b b b b b b b b b
=
=
=
1257
2(628)
1
=
+
0
1
b
=
0628
2(314) 0
=
+
1
0
b
=
0314
2(157) 0
=
+
2
0
b
=
0157
2(078) 1
=
+
3
1
b
=
0078
2(039) 0
=
+
4
0
b
=
0039
2(019) 1
=
+
5
1
b
=
0019
2(009) 1
=
+
6
1
b
=
0009
2(004) 1
=
+
7
1
b
=
0004
2(002) 0
=
+
8
0
b
=
0002
2(001) 0
=
+
9
0
b
=
0001
2(0) 1
=
+
10
1
b
=