6. Using IEEE 754 representation for single precision floating point, give the 32. bit binary encoding for the numbers below. Show the sign, exponent, and mantissa (significand). a. -2.40625 b. 11.2265625

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

Can please help with part a and b and show work

6. Using IEEE 754 representation for single precision floating point, give the 32-
bit binary encoding for the numbers below.
Show the sign, exponent, and mantissa (significand).
a. -2.40625
b. 11.2265625
Transcribed Image Text:6. Using IEEE 754 representation for single precision floating point, give the 32- bit binary encoding for the numbers below. Show the sign, exponent, and mantissa (significand). a. -2.40625 b. 11.2265625
Expert Solution
Step 1

a. -2.40625:

The sign bit for negative numbers is 1, so we mark the number as negative. The integer part of the number is 2, and the fractional part is 0.40625. We can convert the integer part to binary by dividing by 2 repeatedly until we reach 0:

2 / 2 = 1, remainder 0
1 / 2 = 0, remainder 1

So the integer part in binary is 10. For the fractional part, we can multiply it by 2 repeatedly until we reach 1 or until we have 23 bits after the decimal point. Doing so, we get:

0.40625 × 2 = 0.8125, integer part is 0
0.8125 × 2 = 1.625, integer part is 1
0.625 × 2 = 1.25, integer part is 1
0.25 × 2 = 0.5, integer part is 0
0.5 × 2 = 1.0, integer part is 1

So the fractional part in binary is 01100100... (with 23 bits total). To encode this number in IEEE 754, we need to represent the exponent and mantissa in biased form. The exponent is the position of the most significant bit of the fractional part (counting from the left) minus 1, or -2 in this case. So the biased exponent is -2 + 127 = 125 in decimal, or 01111101 in binary. The mantissa is the fractional part without the leading 1, padded with zeros to 23 bits. So the mantissa in this case is 01100100000000000000000. Putting it all together, we get:

Sign bit: 1 (negative)
Exponent: 01111101 (125 in decimal)
Mantissa: 01100100000000000000000

Therefore, the 32-bit binary encoding for -2.40625 in IEEE 754 is:

1 01111101 01100100000000000000000

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning