Question

In: Computer Science

Determine the IEEE single and double floating point representation of the following numbers: a) (15/2) x...

Determine the IEEE single and double floating point representation of the following numbers:
a) (15/2) x 2^50
b) - (15/2) x 2^-50
c) 1/5

Solutions

Expert Solution

a) (15/2) * 2^50

First convert the number to binary. Here is an example how to do the conversion. Rest of the conversions can be done similarly.

(15/2) = 7.5

(7)10 = (111)2  

(0.5)10 = (0.1)2

(15/2) * 2^50 = (111.1) * 250 = (1.111) * 252 [Since the base is 2]

Thus exponent , e = 52

In single precision,

exponent, e' = e+127 = 52+127 = 179 = (10110011)2

Mantissa:- .11100000000000000000000 [Since mantissa is 23 bits in ieee 754 single precision]

Also the number is positive. So sign bit = 0.

Final representation:- 0 10110011 11100000000000000000000 [32 bit]

In double precision,

exponent, e' = e+1023 = 52+1023 = 1075 = (1000110011)2  [11 bits]

Mantissa:- .1110000000000000000000000000000000000000000000000000 [Since mantissa is 52 bits in ieee 754 double precision]

Also the number is positive. So sign bit = 0.

Final representation:- 0 1000110011 1110000000000000000000000000000000000000000000000000 [64 bit]

b) (-15/2) * (2^-50)

15/2 = 7.5 = (111.1)2

(-15/2) * (2^-50) = (111.1)*2-50 = (1.111)*2-48

In single precision,

exponent, e' = e+127 = -48+127 = 79 = (01001111)2

Mantissa:- .11100000000000000000000 [Since mantissa is 23 bits in ieee 754 single precision]

Also the number is negative. So sign bit = 1.

Final representation:- 1 01001111 11100000000000000000000 [32 bit]

In double precision,

exponent, e' = e+1023 = -48+1023 = 975 = (01111001111)2  [11 bits]

Mantissa:- .1110000000000000000000000000000000000000000000000000 [Since mantissa is 52 bits in ieee 754 double precision]

Also the number is negative. So sign bit = 1.

Final representation:- 1 01111001111 1110000000000000000000000000000000000000000000000000 [64 bit]

c) 1/5 = 0.2

= (0.2)10 = (0.0011...)2

Convert to normal form:- 1.10011001100110011... * 2-3

In single precision,

exponent, e' = e+127 = -3+127 = 124 = (01111010)2

Mantissa:- .10011001100110011001100 [Since mantissa is 23 bits in ieee 754 single precision]

Also the number is positive. So sign bit = 0.

Final representation:- 0 01111010 10011001100110011001100 [32 bit]

In double precision,

exponent, e' = e+1023 = -3+1023 = 1020 = (01111111100)2  [11 bits]

Mantissa:- .1001100110011001100110011001100110011001100110011001 [Since mantissa is 52 bits in ieee 754 double precision]

Also the number is positive. So sign bit = 0.

Final representation:- 0 01111111100 1001100110011001100110011001100110011001100110011001 [64 bit]


Related Solutions

Determine the IEEE single and double floating point representation of the following numbers: a) -26.25 b)...
Determine the IEEE single and double floating point representation of the following numbers: a) -26.25 b) 15/2
Convert the following decimal numbers into their 32-bit floating point representation (IEEE single precision). You may...
Convert the following decimal numbers into their 32-bit floating point representation (IEEE single precision). You may use a calculator to do the required multiplications, but you must show your work, not just the solution. 1. -59.75 (ANSW: 11000010011011110000000000000000) 2. 0.3 (ANSW: 00111110100110011001100110011010 (rounded) 00111110100110011001100110011001 (truncated; either answer is fine)) Please show all work
Using IEEE 754 single precision floating point, write the hexadecimal representation for each of the following:...
Using IEEE 754 single precision floating point, write the hexadecimal representation for each of the following: a. Zero b. -2.0 (base 10) c. 256. 0078125 (base 10) d. Negative infinity
Consider the following 32-bit floating point representation based on the IEEE floating point standard: There is...
Consider the following 32-bit floating point representation based on the IEEE floating point standard: There is a sign bit in the most significant bit. The next eight bits are the exponent, and the exponent bias is 28-1-1 = 127. The last 23 bits are the fraction bits. The representation encodes number of the form V = (-1)S x M x 2E, where S is the sign, M is the significand, and E is the biased exponent. The rules for the...
For IEEE 754 single-precision floating point, what is the hexadecimal representation of 27.101562? A. 35CCD001 B....
For IEEE 754 single-precision floating point, what is the hexadecimal representation of 27.101562? A. 35CCD001 B. 2F5C10D0 C. 41D8D000 D. 7DCA1111 E. None of the above
Concert the following 32-bit floating point number (IEEE single precision) into their decimal representation. 1100 0101...
Concert the following 32-bit floating point number (IEEE single precision) into their decimal representation. 1100 0101 0001 1111 1000 0000 0000 0000 (ANSW: -2552.0) Please show all work
Convert the following number into 32bit IEEE 754 floating point representation. 0.000101
Convert the following number into 32bit IEEE 754 floating point representation. 0.000101
Determine the representation for the following decimal numbers in single-precision IEEE 754 format. Give them in...
Determine the representation for the following decimal numbers in single-precision IEEE 754 format. Give them in 32-bit binary and show the calculation. -10^(−8)
3. IEEE Floating Point Representation What decimal number does the 32-bit IEEE floating point number 0xC27F0000...
3. IEEE Floating Point Representation What decimal number does the 32-bit IEEE floating point number 0xC27F0000 represent? Fill in the requested information in the blanks below. What is the sign of the number (say positive or negative): What is the exponent in decimal format: What is the significand in binary: What is the value of the stored decimal number in decimal (final answer): Credit will be given for your final answer in the blanks and the work shown below.
Represent the following decimal numbers using IEEE-754 floating point representation. A. -0.375 B. -Infinity C. 17...
Represent the following decimal numbers using IEEE-754 floating point representation. A. -0.375 B. -Infinity C. 17 D. 5.25
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT