Question

In: Computer Science

Convert 103.375 into double precision floating format show all steps and explanations

Convert 103.375 into double precision floating format

show all steps and explanations

Solutions

Expert Solution

Converting 103.375 to binary
   Convert decimal part first, then the fractional part
   > First convert 103 to binary
   Divide 103 successively by 2 until the quotient is 0
      > 103/2 = 51, remainder is 1
      > 51/2 = 25, remainder is 1
      > 25/2 = 12, remainder is 1
      > 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 1100111
   So, 103 of decimal is 1100111 in binary
   > Now, Convert 0.37500000 to binary
      > Multiply 0.37500000 with 2.  Since 0.75000000 is < 1. then add 0 to result
      > Multiply 0.75000000 with 2.  Since 1.50000000 is >= 1. then add 1 to result
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.375 of decimal is .011 in binary
   so, 103.375 in binary is 1100111.011
103.375 in simple binary => 1100111.011
so, 103.375 in normal binary is 1100111.011 => 1.100111011 * 2^6

single precision:
--------------------
sign bit is 0(+ve)
exp bits are (1023+6=1029) => 10000000101
   Divide 1029 successively by 2 until the quotient is 0
      > 1029/2 = 514, remainder is 1
      > 514/2 = 257, remainder is 0
      > 257/2 = 128, remainder is 1
      > 128/2 = 64, remainder is 0
      > 64/2 = 32, remainder is 0
      > 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 10000000101
   So, 1029 of decimal is 10000000101 in binary
frac bits are 1001110110000000000000000000000000000000000000000000

so, 103.375 in single-precision format is 0 10000000101 1001110110000000000000000000000000000000000000000000
in hexadecimal it is 0x4059D80000000000

Related Solutions

Convert 103.375 into double precision floating format show all steps and explanations
Convert 103.375 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert -99.999 into double precision floating format show all steps and explanations
Convert 103.375 into double precision floating format show all steps and explanations
Convert 103.375 into double precision floating format show all steps and explanations
Convert 0xCD001234 from IEEE-754 hexadecimal to single-precision floating point format. Please show every single detail for...
Convert 0xCD001234 from IEEE-754 hexadecimal to single-precision floating point format. Please show every single detail for upvote. Please do not answer otherwise.
Convert 0xCD001234 from IEEE-754 hexadecimal to single-precision floating point format. Please show every single detail for...
Convert 0xCD001234 from IEEE-754 hexadecimal to single-precision floating point format. Please show every single detail for upvote. Please do not answer otherwise.
Convert 2.115 single-precision floating point binary format. Please show every single detail for upvote. Please do...
Convert 2.115 single-precision floating point binary format. Please show every single detail for upvote. Please do not answer otherwise.
Convert -10.5 single-precision floating point binary format. Please show every single detail for upvote. Please do...
Convert -10.5 single-precision floating point binary format. Please show every single detail for upvote. Please do not answer otherwise.
Using double precision floating point arithmetic, write a( MIPS )program that will convert input temperatures in...
Using double precision floating point arithmetic, write a( MIPS )program that will convert input temperatures in Fahrenheit to Celsius. The program should prompt the user for a temperature in Fahrenheit and then print the corresponding temperature in Celsius. The formula for the conversion is: C = 5/9 * (F – 32)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT