September 28, 2005

http://www.h-schmidt.net/FloatApplet/IEEE754.html

http://www.psc.edu/general/software/packages/ieee/ieee.html

http://stevehollasch.com/cgindex/coding/ieeefloat.html    - handout

I will not be in class on Monday or Wednesday next
week.   You must be in
class.  Professor Mata-Toledo will
use the handout I am distributing to illustrate the application of mathematical
induction to proving programs correct.
You must bring this to class both days.

You need to bring the Homework Assignment I post tonight or
tomorrow to class on Tuesday and turn it in to him.

More on floating point representations

Example of dividing by shifting right where one of the operands is
negative.

-26 /4

26 = 011010

-26
=  100101 + 1  =     100110

When dividing by 4 ,  k = 2   so need to add  2k -1  or
3

100110
= -26

000011   the  3 we are
adding for the bias

101001   -26  with
adjustment

Now shifting right 2 places  because we are dividing by 4

111010   is
the answer  &
is   -6

000101 +1  = 000110

Briefly
discussed multiplication

+7 = 0111

If I multiply by 2, (shift all the bits left and add in a 0
at the right) I get
1110 which is obviously a negative number and it shouldn’t
be.  Therefore,  it overflowed.