Represent the following decimal numbers using IEEE-754 floating point representation. please show all work
i. -0.75
ii. 0
iii. - infinity
iv. 23
v. 10.25
In Single Point IEEE-754 Floating Point Representation:
Sign = 1 bit
Exponent = 8 bits
Mantissa = 23 bits
In Single Point IEEE-754 Floating Point Representation:
Sign = 1 bit
Exponent = 11 bits
Mantissa = 52 bits
i) -0.75
Convert the number into binary form:
(0.75)10 =(0.11)2
= 1.1 * 2-1
Sign = 1 (as the number is negative)
Single Precision Representation:
Biased exponent = 127+(-1) = 126
126 = 01111110
Normalised matissa = 1
The IEEE 754 Single Precision : 1 01111110 100000000000000000000000
(add 0's to normalised matissa to make it 23 bits)
Hexadecimal Representation = BF400000
Double Precision Representation:
Biased exponent = 1023+(-1) = 1022
1022 = 1111111110
Normalised Mantissa = 1
The IEEE 754 Double Precision : 1 01111111110 1000000000000000000000000000000000000000000000000000
(add 0's to normalised matissa to make it 52 bits)
Hexadecimal Representation: BFE8000000000000
ii) 0
Convert the number into binary form:
(0)10 =(0)2
= 0
Sign = 0 (as the number is positive)
Single Precision Representation:
The IEEE 754 Single Precision : 0 00000000 000000000000000000000000
(add 0's to normalised matissa to make it 23 bits)
Hexadecimal Representation = 00000000
Double Precision Representation:
The IEEE 754 Double Precision : 0 00000000000 0000000000000000000000000000000000000000000000000000
(add 0's to normalised matissa to make it 52 bits)
Hexadecimal Representation: 0000000000000000
iii) - infinity
It cannot be converted to any form as it is boundless and is something that is unknown and is something that can be larger or smaller than any number that is known.
iv) 23
Convert the number into binary form:
(23)10 =(10111)2
= 1.0111 * 24
Sign = 0 (as the number is positive)
Single Precision Representation:
Biased exponent = 127+(4) = 131
131 = 10000011
Normalised matissa = 0111
The IEEE 754 Single Precision : 0 10000011 011100000000000000000000
(add 0's to normalised matissa to make it 23 bits)
Hexadecimal Representation = 41B80000
Double Precision Representation:
Biased exponent = 1023+(4) = 1027
1027 = 10000000011
Normalised Mantissa = 0111
The IEEE 754 Double Precision : 0 10000000011 0111000000000000000000000000000000000000000000000000
(add 0's to normalised matissa to make it 52 bits)
Hexadecimal Representation: 4037000000000000
v) 10.25
Convert the number into binary form:
(10)10 =(1010)2
(0.25)10 = (01)2
10.25 = 1010.01
= 1.01001 * 23
Sign = 0 (as the number is positive)
Single Precision Representation:
Biased exponent = 127+(3) = 130
130 = 10000010
Normalised matissa = 01001
The IEEE 754 Single Precision : 0 10000010 01001000000000000000000
(add 0's to normalised matissa to make it 23 bits)
Hexadecimal Representation = 41240000
Double Precision Representation:
Biased exponent = 1023+(3) = 1026
1026 = 10000000010
Normalised Mantissa = 01001
The IEEE 754 Double Precision : 0 10000000010 0100100000000000000000000000000000000000000000000000
(add 0's to normalised matissa to make it 52 bits)
Hexadecimal Representation: 4024800000000000
Get Answers For Free
Most questions answered within 1 hours.