Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A hypothetical machine uses a floating-point number set that stores numbers usin

ID: 3849809 • Letter: A

Question

A hypothetical machine uses a floating-point number set that stores numbers using 9 binary bits. The first bit holds the sign of the number, the next 4 hold the sign and magnitude of the exponent, and the final 4 bits store the mantissa. What will the base-10 equivalents of the following be? a) 101011011 b) 010111100 What is the worst-case scenario round-off error for the system in Problem 1 if rounding is employed? For the system described in Problem 1: a) What is the base -10 equivalent of the smallest positive number that can be stored? b) What is the base -10 equivalent of the largest number that can be stored?

Explanation / Answer

1)Solution:
a)1 0 1 0 1 1 0 1 1

floating point representation


       Part of Floating point number        Bit Representation
      
       Sign of number is negative(1st bit)        1
       Sign of exponent is positive(2nd bit)       0
       Magnitude of the exponent (next 3 bits)       101
       Magnitude of mantissa (last 4 bits)       1011

Mantissa m= (1.1011)(base 2)
   =(1*2^0 + 1*2^(-1) +0*2^(-2) + 1*2^(-3) + 1*2^(-4))base 10
   = -(1.6776)(base 10)

Exponent e = (101)(base 2)
       =(1*2^2 + 0*2^1 + 1*2^0 ) (base 10)
       =(5)base 10

The binary format is   -(1.1011) *2^(101)

The number in base -10 format : -(1.6776) * 2^5
               =-53.6832

b) 0 1 0 1 1 1 1 0 0

       Part of Floating point number        Bit Representation
      
       Sign of number is negative(1st bit)        0
       Sign of exponent is positive(2nd bit)       1
       Magnitude of the exponent (next 3 bits)       011
       Magnitude of mantissa (last 4 bits)       1100


Mantissa m = (1.1100) base-2
       = (1*2^0 + 1*2^(-1) + 1*2(-2) + 0*2^(-3) + 0*2^(-4)) base-10
       =(1.75) base-10

Exponent e= (011) base2
       =(0*2^2 + 1*2^1 + 1*2^0 ) base-10
       (3) base-10


The binary format :   (1.1100) base-2 * 2^(-(011))base-2
      
The number in base-10 format : 1.75 * 2^(-3)
               = 0.02734

2) Worst case scenario of round off error:
if we round off the mantissa to the nearest number for example, for problem a) -(1.6776) into -1.678, then the binary value wil change.


3)a)smallest positive :
0 0000 0001

b) biggest positive :   0 0000 1111

//for clarification please comment..

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote