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

Conversion to Floating-Point For each of the following decimal numbers, convert

ID: 1807745 • Letter: C

Question

Conversion to Floating-Point For each of the following decimal numbers, convert the number to base 2 notation, using only as many bits as are necessary to precisely specify the number (using no leading nor trailing zeroes), then convert your answer into the IEEE single-precision floating-point representation (as discussed in the book and in lecture). 3. 75 -313. 3125 Conversion from Floating-Point For each of the following bit patterns, calculate the number represented by the bits when interpreted using the IEEE single-precision floating-point representation (as discussed in the book and in lecture). Write your answer in decimal (scientific notation is fine). 0 00000000 11100000000000000000000 1 10000001 00011000000000000000000

Explanation / Answer

1)a) 3.75

3 in binary is 11

0.75 = 1 x 2-1 + 1x 2-2

Therefore , mantissa is 1100000000.....0

Number is positive , so sign bit is 0

3.75 = 0 0000011 11000000000000000000000

b) -313.3125

sign bit is 1

exponent bits(i.e 313 in binary is)   100111001

0.3125 = 0 x 2-1 + 1x 2-2 + 0 x 2-3 + 1x 2-4

-313.3125 = 1 100111001 01010000000000000000000

2)    number = (-1)sign bit x (1+fraction) x 10exponent - bias

a) 0 0000000 11100000000000000000000

mantissa part = 1 x 2-1 + 1x 2-2 + 1 x 2-3 = 0.8725

sign bit = 0

==> number is positive

bias = 127

0 0000000 11100000000000000000000 = 1.8725 x 2exponent - bias

= 1.8725 x 2-127

b) 1 1000001 00011000000000000000000

sign bit = 0

==> number is negative

exponent part = 65

mantissa part = 1 x 2-4 + 1x 2-5 = 0.09375

1 1000001 00011000000000000000000 = 1.09375 x 10-62

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