Question

In: Computer Science

Represent the value -65.75 in single and double precision. Please show all work.

Represent the value -65.75 in single and double precision. Please show all work.

Solutions

Expert Solution

a)
-65.75
Converting 65.75 to binary
   Convert decimal part first, then the fractional part
   > First convert 65 to binary
   Divide 65 successively by 2 until the quotient 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 1000001
   So, 65 of decimal is 1000001 in binary
   > Now, Convert 0.75000000 to binary
      > 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.75 of decimal is .11 in binary
   so, 65.75 in binary is 01000001.11
-65.75 in simple binary => 1000001.11
so, -65.75 in normal binary is 1000001.11 => 1.00000111 * 2^6

single precision:
--------------------
sign bit is 1(-ve)
exponent bits are (127+6=133) => 10000101
   Divide 133 successively by 2 until the quotient is 0
      > 133/2 = 66, remainder is 1
      > 66/2 = 33, remainder is 0
      > 33/2 = 16, remainder is 1
      > 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 10000101
   So, 133 of decimal is 10000101 in binary
frac/significant bits are 00000111000000000000000

so, -65.75 in single-precision format is 1 10000101 00000111000000000000000
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
Converting 11000010100000111000000000000000 to hexadecimal
1100 => C
0010 => 2
1000 => 8
0011 => 3
1000 => 8
0000 => 0
0000 => 0
0000 => 0
So, in hexadecimal 11000010100000111000000000000000 is 0xC2838000

in hexadecimal it is 0xC2838000

b)
64-bit format:
--------------------
sign bit is 1(-ve)
exponent 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/significant bits are 0000011100000000000000000000000000000000000000000000

so, -65.75 in 64-bit format is 1 10000000101 0000011100000000000000000000000000000000000000000000
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
Converting 1100000001010000011100000000000000000000000000000000000000000000 to hexadecimal
1100 => C
0000 => 0
0101 => 5
0000 => 0
0111 => 7
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0000 => 0
So, in hexadecimal 1100000001010000011100000000000000000000000000000000000000000000 is 0xC050700000000000

in hexadecimal it is 0xC050700000000000



Related Solutions

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.
Show the IEEE 754 binary representation of the number -0.25(subscript)ten in single and double precision. List...
Show the IEEE 754 binary representation of the number -0.25(subscript)ten in single and double precision. List all the steps required to get the single and double precision.
2. a) Represent the decimal value 47.375 as a single precision IEEE floating point number. Give...
2. a) Represent the decimal value 47.375 as a single precision IEEE floating point number. Give your answer in hexadecimal and show your work. b) Represent the decimal value 47.375 as a double precision IEEE floating point number. Give your answer in hexadecimal and show your work.
Please explain and show all work: A double-blind study was performed on consumers comparing a new...
Please explain and show all work: A double-blind study was performed on consumers comparing a new formulation of a diet soft drink with the original formulation. Of 100 subjects, 57 preferred the new formulation, 38 preferred to original formulation, and 5 were undecided or could not tell the difference. Use the sign test to decide whether consumers prefer the new formulation at the 5% level.
Describe the difference between single, double precision and residue checksum. Give an example (numerical) Please do...
Describe the difference between single, double precision and residue checksum. Give an example (numerical) Please do not copy from internet and need it typed not hand written
convert -549.675 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast...
convert -549.675 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast 1000 words)
convert -47.199 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast...
convert -47.199 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast 1000 words)
4. Explain how the following computations are performed using both IEEE single precision and double precision...
4. Explain how the following computations are performed using both IEEE single precision and double precision floating point representation. a. 11716 +2A916 b. 1011.112-11.1510 c. 1.0010102 x 0.011012 d. Comment on any differences you see in accuracy and precision.
Please answer all parts of the question. Please show all work and all steps. 1a.) Show...
Please answer all parts of the question. Please show all work and all steps. 1a.) Show that the solutions of x' = arc tan (x) + t cannot have maxima 1b.) Find the value of a such that the existence and uniqueness theorem applies to the ivp x' = (3/2)((|x|)^(1/3)), x(0) = a. 1c.) Find the limits, as t approaches both positive infinity and negative infinity, of the solution Φ(t) of the ivp x' = (x+2)(1-x^4), x(0) = 0
Show that ?̅ is an unbiased estimator for ?. ( please show all work completely)
Show that ?̅ is an unbiased estimator for ?. ( please show all work completely)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT