You are on page 1of 3

Ex15:

-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

(ASCII table: https://www.rapidtables.com/convert/number/ascii-to-


hex.html)

Ex18: Convert the following binary code into an ASCII string:


0111 0000 0011 0001 0011 0011 0111 0011 0000 0000
0111 0000: 26 +25 +24 =112 : p

0011 0001: 25 +24 +2 0=49 : 1


0011 0011: 25 +24 +21 +20 =51: 3

0111 0011: 26 +25 +24 +21 +20 =115: s

0000 0000: 0: null


So, the ASCII string is: p13s
(Binary to ASCII table)
Ex19:
Assume a color display using 8 bits for each of the primary colors
(Red, green, blue) per pixel and a frame size of 1280 × 1024.
a. What is the minimum size in bytes of the frame buff er to store a frame?
b. How long would it take, at a minimum, for the frame to be sent over a 100
Mbit/s network?
Ans.
a) The minimum size of the frame is equal to
=Frame(pixels) X bytes
=3 X 1280 X 1024 = 3932160 Bytes
b) Time= size/speed
Size= 3932160 X 8 = 31457280bit
Speed= 10^8bit/s
Therefore, Time will be 0.3145728s
Ex20:

You might also like