Question

In: Computer Science

Convert −98765.4321 to IEEE 745 (show your work)

Convert 98765.4321 to IEEE 745 (show your work)

Solutions

Expert Solution

Converting 98765.4321 to binary
   Convert decimal part first, then the fractional part
   > First convert 98765 to binary
   Divide 98765 successively by 2 until the quotient is 0
      > 98765/2 = 49382, remainder is 1
      > 49382/2 = 24691, remainder is 0
      > 24691/2 = 12345, remainder is 1
      > 12345/2 = 6172, remainder is 1
      > 6172/2 = 3086, remainder is 0
      > 3086/2 = 1543, remainder is 0
      > 1543/2 = 771, remainder is 1
      > 771/2 = 385, remainder is 1
      > 385/2 = 192, remainder is 1
      > 192/2 = 96, remainder is 0
      > 96/2 = 48, remainder is 0
      > 48/2 = 24, remainder is 0
      > 24/2 = 12, remainder 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 11000000111001101
   So, 98765 of decimal is 11000000111001101 in binary
   > Now, Convert 0.43210000000544824 to binary
      > Multiply 0.43210000000544824 with 2.     Since 0.8642000000108965 is < 1. then add 0 to result
      > Multiply 0.8642000000108965 with 2.  Since 1.728400000021793 is >= 1. then add 1 to result
      > Multiply 0.728400000021793 with 2.   Since 1.456800000043586 is >= 1. then add 1 to result
      > Multiply 0.4568000000435859 with 2.  Since 0.9136000000871718 is < 1. then add 0 to result
      > Multiply 0.9136000000871718 with 2.  Since 1.8272000001743436 is >= 1. then add 1 to result
      > Multiply 0.8272000001743436 with 2.  Since 1.6544000003486872 is >= 1. then add 1 to result
      > Multiply 0.6544000003486872 with 2.  Since 1.3088000006973743 is >= 1. then add 1 to result
      > Multiply 0.30880000069737434 with 2.     Since 0.6176000013947487 is < 1. then add 0 to result
      > Multiply 0.6176000013947487 with 2.  Since 1.2352000027894974 is >= 1. then add 1 to result
      > Multiply 0.23520000278949738 with 2.     Since 0.47040000557899475 is < 1. then add 0 to result
      > Multiply 0.47040000557899475 with 2.     Since 0.9408000111579895 is < 1. then add 0 to result
      > Multiply 0.9408000111579895 with 2.  Since 1.881600022315979 is >= 1. then add 1 to result
      > Multiply 0.881600022315979 with 2.   Since 1.763200044631958 is >= 1. then add 1 to result
      > Multiply 0.763200044631958 with 2.   Since 1.526400089263916 is >= 1. then add 1 to result
      > Multiply 0.526400089263916 with 2.   Since 1.052800178527832 is >= 1. then add 1 to result
      > Multiply 0.05280017852783203 with 2.     Since 0.10560035705566406 is < 1. then add 0 to result
      > Multiply 0.10560035705566406 with 2.     Since 0.21120071411132812 is < 1. then add 0 to result
      > Multiply 0.21120071411132812 with 2.     Since 0.42240142822265625 is < 1. then add 0 to result
      > Multiply 0.42240142822265625 with 2.     Since 0.8448028564453125 is < 1. then add 0 to result
      > Multiply 0.8448028564453125 with 2.  Since 1.689605712890625 is >= 1. then add 1 to result
      > Multiply 0.689605712890625 with 2.   Since 1.37921142578125 is >= 1. then add 1 to result
      > Multiply 0.37921142578125 with 2.    Since 0.7584228515625 is < 1. then add 0 to result
      > Multiply 0.7584228515625 with 2.     Since 1.516845703125 is >= 1. then add 1 to result
      > Multiply 0.516845703125 with 2.  Since 1.03369140625 is >= 1. then add 1 to result
      > Multiply 0.03369140625 with 2.   Since 0.0673828125 is < 1. then add 0 to result
      > Multiply 0.0673828125 with 2.    Since 0.134765625 is < 1. then add 0 to result
      > Multiply 0.134765625 with 2.     Since 0.26953125 is < 1. then add 0 to result
      > Multiply 0.26953125 with 2.  Since 0.5390625 is < 1. then add 0 to result
      > Multiply 0.5390625 with 2.   Since 1.078125 is >= 1. then add 1 to result
      > Multiply 0.078125 with 2.    Since 0.15625 is < 1. then add 0 to result
      > Multiply 0.15625 with 2.     Since 0.3125 is < 1. then add 0 to result
      > Multiply 0.3125 with 2.  Since 0.625 is < 1. then add 0 to result
      > Multiply 0.625 with 2.   Since 1.25 is >= 1. then add 1 to result
      > Multiply 0.25 with 2.    Since 0.5 is < 1. then add 0 to result
      > Multiply 0.5 with 2.     Since 1.0 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.43210000000544824 of decimal is .01101110100111100001101100001000101 in binary
   so, 98765.4321 in binary is 11000000111001101.01101110100111100001101100001000101
-98765.4321 in simple binary => 11000000111001101.01101110100111100001101100001000101
so, -98765.4321 in normal binary is 11000000111001101.01101110100111100001101100001000101 => 1.10000001110011010110111 * 2^16

single precision:
--------------------
sign bit is 1(-ve)
exp bits are (127+16=143) => 10001111
   Divide 143 successively by 2 until the quotient is 0
      > 143/2 = 71, remainder is 1
      > 71/2 = 35, remainder is 1
      > 35/2 = 17, remainder is 1
      > 17/2 = 8, remainder is 1
      > 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 10001111
   So, 143 of decimal is 10001111 in binary
frac bits are 10000001110011010110111

so, -98765.4321 in single-precision format is 1 10001111 10000001110011010110111
in hexadecimal it is 0xC7C0E6B7

Related Solutions

Binary conversion: Convert 1234.5869 × 103 to IEEE 745 (show your work)
Binary conversion: Convert 1234.5869 × 103 to IEEE 745 (show your work)
Binary and Floating point: Convert −98765.4321 to IEEE 745 both single and double (show your work)
Binary and Floating point: Convert −98765.4321 to IEEE 745 both single and double (show your work)
Binary math: Convert 0xc996b4d7 from IEEE 745 to scientific notation (X * 10Y) (show your work)
Binary math: Convert 0xc996b4d7 from IEEE 745 to scientific notation (X * 10Y) (show your work)
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
1. Convert 5.5 to hexadecimal notation using IEEE 754 single precision. Please show your work and...
1. Convert 5.5 to hexadecimal notation using IEEE 754 single precision. Please show your work and answer must be in hexadecimal notation. 2. (4 points) Convert -7.875 to hexadecimal notation using IEEE 754 single precision. Please show your work and answer must be in hexadecimal notation.
6. Convert numbers as requested. SHOW YOUR WORK Convert 2B7 (base 16) to binary. Convert 0B2C...
6. Convert numbers as requested. SHOW YOUR WORK Convert 2B7 (base 16) to binary. Convert 0B2C (base 16) to binary. Convert -47 (base 10) to binary 8-bit signed-magnitude. Convert -52 (base 10) to binary 8-bit signed-magnitude. Convert -47 (base 10) to binary 8-bit one's complement. Convert -52 (base 10) to binary 8-bit one's complement. Convert -39 (base 10) to 8-bit binary using excess 127 notation. Convert -61 (base 10) to 8-bit binary using excess 127 notation.
Convert 1101.11011101 x 223 to IEEE Standard 754 for single-precision floating-point binary format. Convert the IEEE...
Convert 1101.11011101 x 223 to IEEE Standard 754 for single-precision floating-point binary format. Convert the IEEE Standard 754 number 11001010100011010101000000000000 to its decimal equivalent.
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and...
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and the fraction. Convert -3.875 to an IEEE 754 double-precision floating-point number. Show the sign bit, the exponent, and the fraction Convert the IEEE 754 single-precision floating-point numbers 42E4800016 and 0080000016 to their corresponding decimal numbers.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT