Show how each of the following floating-point values would be stored using IEEE-754 single precision (be sure to indicate the sign bit, the exponent, and the significand fields): a)      12.5      b) -1.5      c) 0.75      d) 26.625

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter8: Data And Network Communication Technology
Section: Chapter Questions
Problem 31VE
icon
Related questions
Question

Show how each of the following floating-point values would be stored using IEEE-754 single precision (be sure to indicate the sign bit, the exponent, and the significand fields):

a)      12.5      b) -1.5      c) 0.75      d) 26.625

Expert Solution
Step 1

a)

Converting 12.5 to binary
   Convert decimal part first, then the fractional part
   > First convert 12 to binary
   Divide 12 successively by 2 until the quotient is 0
      > 12/2 = 6, remainder is 0
      > 6/2 = 3, remainder is 0
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1100
   So, 12 of decimal is 1100 in binary
   > Now, Convert 0.5 to binary
      > Multiply 0.5 with 2.     Since 1.0 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.5 of decimal is .1 in binary
   so, 12.5 in binary is 1100.1
12.5 in simple binary => 1100.1
so, 12.5 in normal binary is 1100.1 => 1.1001 * 2^3

single precision:
--------------------
sign bit is 0(+ve)
exp bits are (127+3=130) => 10000010
   Divide 130 successively by 2 until the quotient is 0
      > 130/2 = 65, remainder is 0
      > 65/2 = 32, remainder is 1
      > 32/2 = 16, remainder is 0
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder is 0
      > 4/2 = 2, remainder is 0
      > 2/2 = 1, remainder is 0
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 10000010
   So, 130 of decimal is 10000010 in binary
frac bits are 10010000000000000000000

so, 12.5 in single-precision format is 0 10000010 10010000000000000000000
in hexadecimal it is 0x41480000
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 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
A+ Guide To It Technical Support
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
A+ Guide to Hardware (Standalone Book) (MindTap C…
A+ Guide to Hardware (Standalone Book) (MindTap C…
Computer Science
ISBN:
9781305266452
Author:
Jean Andrews
Publisher:
Cengage Learning