floating point representation conversion machine epsilon et

floating point representation conversion - machine epsilon etc

Floating-point representation Consider a computer that stores information using 9 bits words. The first bit is for the sign of the number, the next 4 for the sign and magnitude of the exponent and the last 4 for the magnitude of the mantissa. The mantissa is normalized as described in class and in the textbook. a. Convert 100011010 to a base-10 system b. What is the highest number that can be stored on this computer? c. What is the lowest positive number that can be stored on this computer? d. Determine the machine epsilon.

Solution

answer a: 1 0001 1010

Sign bit of number = 1. Hence, the number is negative.

Bits in exponent part = 0001(2) = 1(10) . This is 7 more than the actual exponent and therefore the actual exponent must be -6. Thus, in binary scientific notation, we have 1.1010(2) × 26

Bits in mantissa = 1010

(1.1010)2 = 1×20+1×2-1 +0×2-2 +1×2-3 +0×2-4

= 1+1/2+1/8

=(1.625)10

Hence, the number in base-10 = ( 1.625) × (2)-6

= (- 0.0507)10

answer b:

To determine the highest number, we would keep the sign bit 0, and place 1 in all the exponent bits to get the largest exponent possible, and place 1 in all the mantissa bits. This gives us 0 1111 1111, which represents

1.1111(2) × 215 7 = 1.1111(2) × 28 = (496)10

answer c:

To find the lowest possible positive number that cann be stored on this computer, we would keep the sign bit to 0, and place 0 in all the exponent bits to get the smallest exponent possible, and we place 0 in all the mantissa bits. This gives us 0 0000 0000, which represents

  1.000(2) × 20 7 = 27 0.0078(10).

answer d:

The machine epsilon is

mach= 2-(number of bits in mantisa)

= 2-4

  

floating point representation conversion - machine epsilon etc Floating-point representation Consider a computer that stores information using 9 bits words. The

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site