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

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.
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.
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.
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert...
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert 69 (base 10) to 8-bit binary using one’s complement. Show your work 1c. Convert 70 (base 10) to 8-bit binary using two’s complement. Show your work. 1d. Convert - 67 (base 10) to 8-bit binary using signed magnitude. 1e. Convert - 67 (base 10) to 8-bit binary using ones compliment. Show your work. 1f. Convert - 67 (base 10) to 8-bit binary using 2s...
Convert the following NFA given by M to a DFA. Show your work which includes both...
Convert the following NFA given by M to a DFA. Show your work which includes both state diagrams. M = ( {q0, q1, q2} , {a, b} , δ, q0, {q1}) with the state table given a b q0 {q1, q1} q1 null {q2} q2 null {q2}
Convert 3/7 to IEEE 754. Convert 171.375 to IEEE754 Convert the float number 0x4024 0080 0000...
Convert 3/7 to IEEE 754. Convert 171.375 to IEEE754 Convert the float number 0x4024 0080 0000 0000 to decimal. What is the true exponent? Circle the true exponent. 0x3FAF 9000 0000 is an IEEE float number. Convert it to base 10. While doing the conversion answer two questions: What is the true exponent? What is the mantissa? Make these two values obvious by circling them.
Convert the following numbers to 32-bit, 2s compliment binary and hexadecimal formats. Show your work in...
Convert the following numbers to 32-bit, 2s compliment binary and hexadecimal formats. Show your work in recursive division form. 899726616 1656906428 -77102817 -251026154
Show ALL work if it is required for the question and BASES 4. Convert the following...
Show ALL work if it is required for the question and BASES 4. Convert the following from Signed Binary to Decimal: (signed) a. 10011010 b. 01001101 5. 10000001 - 01100110 6. 80D3 + 74C2
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT