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
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
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)
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
Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a =...
Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a = 0100 0000 1101 1000 0000 0000 0000 0000 b = 1011 1110 1110 0000 0000 0000 0000 0000 Perform the following arithmetic and show the results in both normalized binary format and IEEE 754 single-precision format. Show your steps. a)     a + b b)     a × b
Express the following two base 10 numbers in binary using the IEEE 754 single-precision floating point...
Express the following two base 10 numbers in binary using the IEEE 754 single-precision floating point format (i.e., 32 bits). Express your final answer in hexadecimal (e.g., 32’h????????). a) 68.3125 b) -19.675
1. Represent following floating-point numbers in IEEE single-precision (32-bit) format: a. -0.1875, b. 0.46875 2. What...
1. Represent following floating-point numbers in IEEE single-precision (32-bit) format: a. -0.1875, b. 0.46875 2. What is the decimal value of the following IEEE single-precision (32-bit) floating-point numbers (which are shown in hexadecimal)? a. 3F400000, b. BE000000
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT