Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP2130 Winter 2015 Storing signed numbers in memory.

Similar presentations


Presentation on theme: "COMP2130 Winter 2015 Storing signed numbers in memory."— Presentation transcript:

1 COMP2130 Winter 2015 Storing signed numbers in memory

2 Single Precision Floats IEEE Bit

3 Floating Point (32 bit) Mantissa (0-22) Exponent (23-30) Signed bit (31) 0 = positive 1 = negative

4 Floating Point (32 bit) 0  Convert  Positive so sign bit 31 = 0

5 Floating Point (32 bit) Convert Positive so bit 31 = 0 Need to convert to 1.xxxxxx number 0

6 Floating Point (32 bit) Convert to 1.xxxxxx number / 2 = / 2 = / 2 = / 2 = / 2 = / 2 = / 2 = >= 1.0 use Log 2 (173.7), 173.7/2 x 0

7 Floating Point (32 bit) = x2 7 Time to fill in the exponent Has a bias of = in unsigned 8 bit binary is

8 Floating Point (32 bit) = x2 7 Time to fill in the exponent Has a bias of = in unsigned 8 bit binary is

9 Floating Point (32 bit) x2 7 Now we will need to deal with the orange part of the number which will be placed into the mantissa

10 Floating Point (32 bit) Numberx2Whole

11 Floating Point (32 bit) Numberx2Whole

12 Floating Point (32 bit) Numberx2Whole

13 Floating Point (32 bit) Numberx2Whole

14 Floating Point (32 bit) Numberx2Whole

15 Floating Point (32 bit) Numberx2Whole

16 Floating Point (32 bit) Numberx2Whole

17 Floating Point (32 bit) Numberx2Whole

18 Floating Point (32 bit) Numberx2Whole

19 Floating Point (32 bit) Numberx2Whole

20 Floating Point (32 bit) Numberx2Whole

21 Floating Point (32 bit) Numberx2Whole

22 Floating Point (32 bit) Numberx2Whole

23 Floating Point (32 bit) Numberx2Whole

24 Floating Point (32 bit) =

25 Floating Point (32 bit) What if was ?

26 Floating Point (32 bit) What if was ? =

27 Floating Point (32 bit) What if was ? = =


Download ppt "COMP2130 Winter 2015 Storing signed numbers in memory."

Similar presentations


Ads by Google