Remember Me Forgot your Password?

Forum: Electrical & Computer Engineering :: Computer Organization :: Floating Point Arithmetic  New Topic
Problem #8 Reply
Author Message
nak31 Problem #8 Sat 3 Oct 2009 10:24:00 PM
Student
Joined Tues 31 Mar 2009
Posts 511

Problem 8:

Add the following numbers 0.5(10) and -0.4375(10) using the binary algorithm.


Student Rating3.9/5
nak31 Sat 3 Oct 2009 10:24:00 PM
Student
Joined Tues 31 Mar 2009
Posts 511

Solution:

Step 1: Transform the numbers into binary:

0.5(10) = 1.00 (2) x 2-1 and -0.4375(10) = -0.0111(2) = -1.110(2) x 2-2

Step 2: Adjust the significant so that the exponents match.

-1.110(2) x 2-2 = - 0.111(2) x 2-1

Step 3: Add the significands

1.00 (2) x 2-1 + (- 0.111(2) x 2-1) = (1.00 – 0.111)x2-1 = 0.001(2) x 2-1

Step 4: Normalize result and check for overflow/underflow

0.001(2) x 2-1 = 1.000(2) x 2-4.

Step 5: Round and renormalize if necessary

1.000(2) x 2-4, no change necessary


Therefore, the finals answer is 1.000(2) x 2-4 = 0.0625(10)


Student Rating3.9/5
1
© Copyright SolveMyProblem.Net 2017