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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education