Question

In: Computer Science

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

Solutions

Expert Solution

a)   IEEE single

Convert -26.25 to IEEE 32-bit floating point format.

Start with the positive version of the number
|-26.25| = 26.25

Step1: The integral part is 26 = 11010
The fractional .25= 01


so we get 26.25 in binary as = 11010.01

step 2: Normalize the binary representation of the number
11010.01 = 1.1010 01*2^4

step 3:find exponent
as we get 2^4 so add 4 to 127 127+4=131 =10000011

step 4:
Mantissa is(23 bit) : 101 0010 0000 0000 0000 0000


step 5: 32 bit number is

sign bit(1 bit): 1 as number is negative
exponent(8 bit): 1000 0011
mantisaa(23 bit): 101 0010 0000 0000 0000 0000

1 1000 0011 101 0010 0000 0000 0000 0000

=====================================================================================
a) IEEE double

Convert -26.25 to IEEE 64-bit floating point format.

Start with the positive version of the number
|-26.25| = 26.25

Step1: The integral part is 26 = 11010
The fractional .25= 01


so we get 26.25 in binary as = 11010.01

step 2: Normalize the binary representation of the number
11010.01 = 1.1010 01*2^4

step 3:find exponent
as we get 2^4 so add 4 to 1023
1023+4=1027 =100 0000 0011

step 4:
Mantissa is(52 bit) : 1010 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000


step 5: 64 bit number is

sign bit(1 bit): 1 as number is negative
exponent(11 bit): 100 0000 0011
mantisaa(52 bit): 1010 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

1 100 0000 0011 1010 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

=====================================================================================

b)   IEEE single

15/2=7.5

Convert 7.5 to IEEE 32-bit floating point format.


Step1: The integral part is 7 = 111
The fractional .5= 0.1


so we get 7.5 in binary as = 111.1

step 2: Normalize the binary representation of the number
111.1= 1.111*2^2

step 3:find exponent
as we get 2^2 so add 2 to 127
127+2=129 =1000 0001

step 4:
Mantissa is(23 bit) : 111 0000 0000 0000 0000 0000


step 5: 32 bit number is

sign bit(1 bit): 0 as number is positive
exponent(8 bit): 1000 0001
mantisaa(23 bit): 111 0000 0000 0000 0000 0000

0 1000 0001 111 0000 0000 0000 0000 0000

=====================================================================================
b) IEEE double

Convert 7.5 to IEEE 64-bit floating point format.


Step1: The integral part is 7 = 111
The fractional .5= 0.1


so we get 7.5 in binary as = 111.1

step 2: Normalize the binary representation of the number
111.1= 1.111*2^2

step 3:find exponent
as we get 2^2 so add 2 to 1023
1023+2=1025 =100 0000 0001

step 4:
Mantissa is(52 bit) : 1110 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000


step 5: 64 bit number is

sign bit(1 bit): 0 as number is positive
exponent(11 bit): 100 0000 0001
mantisaa(52 bit): 1110 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

0 100 0000 0001 1110 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000


Related Solutions

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
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
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
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...
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)
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
Q1: In the addition of floating-point numbers, how do we adjust the representation of numbers with...
Q1: In the addition of floating-point numbers, how do we adjust the representation of numbers with different exponents? Q2: Answer the following questions: What binary operation can be used to set bits? What bit pattern should the mask have? What binary operation can be used to unset bits? What bit pattern should the mask have? What binary operation can be used to flip bits? What bit pattern should the mask have?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT