+1 vote
1.9k views
in Programming Languages & Algorithms by

Convert the decimal number 32.48x104 to a single-precision floating point binary number? (Show all steps of conversion)

1 Answer

0 votes
by (user.guest)
 
Best answer

32-bit Single Precision = [ Sign bit ] + [ Exponent ] + [ Mantissa (32 bits) ]

First convert 324800 to binary.

32480010 = 010011110100110000002

Convert the binary number into base 2 scientific notation.

01001111010011000000 = 1 . 001111010011000000 x 218

Determine the sign bit.

  • Positive number takes 0 as sign bit
  • Negative number takes 1 as sign bit

Since 324800 is a positive number, our sign bit is 0. This will be the first bit out of the 32 total bits in the IEEE 754 single precision representation.

Get the exponent based on precision

1 . 001111010011000000 x 218 

There are a set of biases for both single and double precision. The exponent bias for single precision is 127. Adding 127 to the base 2 exponent, we get 127 + 18 = 145 (Single Precision).

Convert the exponent to binary

14510 = 100100012

Write in standard form: 10010001 = 1 . 0010001 x 27

Mantissa = 0010001 (decimal part of the exponent in binary)

Combine the calculated values into one final number. Add trailing zeros to get 32 bits in total

32-bit Single Precision = [ Sign bit ] + [ Exponent ] + [ Mantissa (32 bits) ]

0 10010001 00100010000000000000000


Please leave a comment below and share with other students in your network if you found this solution helpful. Happy learning!

Related questions

+1 vote
1 answer 1.4k views
0 votes
1 answer 3.1k views
+1 vote
1 answer 1.4k views
0 votes
0 answers 22 views
+1 vote
1 answer 84 views
0 votes
1 answer 815 views
Welcome to CPENTalk.com
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...