Professional Documents
Culture Documents
22bi13022 - hw2 - Ex15-Ex20
22bi13022 - hw2 - Ex15-Ex20
-1.5625 x 101
= -15.625
15: 1111
0.625:1010
15.625: 1111.1010
Scientific notaion:
1.1111010 ×23
Sign: 1
Exponent: 10000010
Fraction: 11110100000000000000000
The Bit pattern is: 1000 0010 1111 0100 0000 0000 0000 0000
(ieee 754 representation)
Ex16:
a) 0.5 + 0.3125
0.5: 00111111000000000000000000000000
0.3125: 00111110101000000000000000000000
00111111000000000000000000000000
+ 00111110101000000000000000000000
= 00111111010100000000000000000000
b) 12 – 3.875
01000001010000000000000000000000
- 01000000011110000000000000000000
= 01000001000111100000000000000000
Ex17: Convert the ASCII string “9.75” to its hexadecimal representation. Only represent the
characters between the quotation marks and assume it is a null terminated string.
“9”: 39
“.”: 2E
“7”: 37
“5”: 35
So, the hexadecimal representation of the ASCII string “9.75” is:
39 2E 37 35