T7-D1: (Binary Representations)
DIY (See solution sketch for T7-Q1.)
T7-D2: (ASCII and UNICODE encoding) -- SOLUTION SKETCH
Message:
"My secret spot in U-Town" (Do not include the surrounding "" marks.)
(a) in ASCII code --- 24 bytes = 24x8 bits = 192 bits
(b) in UNICODE --- 48 bytes = 48x8 bits = 384 bits
(Note: Count everything between ""; spaces, punctuations, etc.)
| Internal Representation: |
|
9(b): Mike = 01001101 01101001 01101011 01100101
M i k e
9(d): (a+b) = 00101000 01100001 00101011 01100010 00101001
( a + b )
(Colour digital picture: true colour with 24 bits per pixel)
(a) Uncompressed: (16 x 106) x 24 bits = 384 x 106 bits = 48 x 106 bytes
A 8-GBytes memory stick can store 8*230 / 48 x 106 = 178.957 images
namely 178 images
(b) Compressed 20:1 ratio: 178.957 x 20 = 3579 songs
(MP3 format sound) 3 minute song
[From textbook, MP3 format: sample rate 44,100 and bit depth 16 bits]
(a) Uncompressed: 44100 samples/sec x 16 bits/sample x (60 x 3) sec = 127,008,000 bits
= 127,008,000/(220) M-bits = 15.14 MBytes
A 8-GB memory stick can store about 541 songs (3mins per song)
8GB/15.14 MBytes = 8*1024MBytes / 15.14MBytes = 541.1
(b) With compression ratio 11:1 ratio: 127,008,000/11 = 11,546,181.8 bits = 1.37641 MBytes
A 1-GB memory stick can store 8*1024MBytes / 1.376MBytes = 5951 songs