EA1 Ch3 2
EA1 Ch3 2
3
Unit Symbol Value
The most basic unit of data. It can be either
Bit bit, b
"0" or "1".
Byte B 1 B = 8 bits
4
Unit Symbol Value
Bit per second bps, bit/s, b/s One bit of data is transferred every second.
Kilobit per second kbps, kbit/s, kb/s 1 kbps = 103 bps = 1000 bps = 103 bps
Megabit per second Mbps, Mbit/s, Mb/s 1 Mbps = 103 kbps = 1000 kbps = 106 bps
Gigabit per second Gbps, Gbit/s, Gb/s 1 Gbps = 103 Mbps = 1000 Mbps = 109 bps
Terabit per second Tbps, Tbit/s, Tb/s 1 Tbps = 103 Gbps = 1000 Gbps = 1012 bps
5
Decimal number 0 1 2 3 4 5 6 7
Binary number 000 001 010 011 100 101 110 111
6
11012
Digit 1 0 0 1
Place value 23 = 8 22 = 4 21 = 2 20 = 1
Value of the
8 × 1 = 8 4 × 1 = 4 2 × 0 = 0 1 × 1 = 1
digit
11012 = 8 + 4 + 0 + 1 = 1310
7
101101012
Digit 1 0 1 1 0 1 0 1
Place value 27 = 128 26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1
Value of
the digit
101101012
8
Digit 1 0 1 1 0 1 0 1
Place value 27 = 128 26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1
Value of
128 × 1 = 128 64 × 0 = 0 32 × 1 = 32 16 × 1 = 16 8×0=0 4×1=4 2×0=0 1×1=1
the digit
101101012
9
11810
11810 11101102
10
14910
14910
11
14910
14910 100101012
12
1011012 1111102
13
1110112 11001012
14
1110112 11001012
15
1111102 1011012
16
11001012 − 1110112
17
11001012 − 1110112
18
1st pattern 2nd pattern
0 1
1st pattern 2nd pattern 3rd pattern 4th pattern 5th pattern 6th pattern 7th pattern 8th pattern
000 001 010 011 100 101 110 111
19
The range of a digit
Binary number 0 to 1
Decimal number 0 to 9
Hexadecimal number 0 to 9, A to F
20
B4AF16
Value of 4096 × 11 =
256 × 4 = 1024 16 × 10 = 160 1 × 15 = 15
the digit 45056
21
9C7E16
Value of
4096 × 9 = 36864 256 × 12 = 3072 16 × 7 = 112 1 × 14 = 14
the digit
22
5462510
5462510 D56116
23
3460410
3460410
24
3460410
3460410 872C16.
25
B4AF16 + 9C7E16
26
6D6116 + 972C16
27
6D6116 + 972C16
28
972C16 − 6D6116
29
972C16 − 6D6116
30
15A
31
32
33
34
35
36
37
38
Decimal number -4 -3 -2 -1 0 1 2 3
Two’s complement
100 101 110 111 000 001 010 011
representation
39
101
Digit 1 0 1
Place -(22) = -4 21 = 2 20 = 1
Value of the
-4 × 1 = -4 2 × 0 = 0 1 × 1 = 1
digit
1012 = -4 + 0 + 1 = 310
40
0101
Digit 0 1 0 1
Place -(23) = -8 22 = 4 21 = 2 20 = 1
Value of the
-8 × 0 = 0 4 × 1 = 4 2 × 0 = 0 1 × 1 = 1
digit
0101 = 4 + 0 + 1 = 510
41
1010
Digit 0 1 0 1
Place value -(23) = -8 22 = 4 21 = 2 20 = 1
Value of the
digit
1010 =
42
1010
Digit 0 1 0 1
Place value -(23) = -8 22 = 4 21 = 2 20 = 1
Value of the
-8 × 1 = -8 4 × 0 = 0 2 × 1 = 2 1 × 0 = 0
digit
1010 = -8 + 0 + 2 + 0 = -610
43
10101
Digit 1 0 1 0 1
Place value -(24) = -16 23 = 8 22 = 4 21 = 2 20 = 1
Value of
the digit
10101 =
44
10101
Digit 1 0 1 0 1
Place value -(24) = -16 23 = 8 22 = 4 21 = 2 20 = 1
Value of
-16 × 1 = -16 8 × 0 = 0 4 × 1 = 4 2 × 0 = 0 1 × 1 = 1
the digit
45
310
310
310
310
46
Decimal number -4 -3 -2 -1 0 1 2 3 4
Two’s complement Out of
100 110 110 111 000 001 010 011
representation range
Out of
Two’s complement 011 010 001 000 111 110 101 100
range
110 111
−110
47
2710
2710 11011
0001 10112
28 1 0000 0000
48
49
4510
4510 101101
0010 1101
1101 0011
4510 1101 0011
−4510
50
51
001 0001
001 0010
110 1110
110 1111
52
0000 0001
1000 0001
1111 1110
1111 1111
53
1001
11 0111
0001 0111
54
0110
1011
55
56
Addition Subtraction
910 + 910 = 1001 + 1001 1010 − 1210 = 1010 − 1210 = 1010 − 1100
57
Addition Subtraction
310 + 510 = 0011 + 0101 −410 − 610 = −410 + (−610) = 1100 + 1010
58
59
60
61
62
63
64
65
66
67
68
•
•
69
Code
BD73 BD58 A874 B2CE B1E0 C2EB CFB5 CDB3
(in hexadecimal representation)
Character in Big-5 code 編 碼 系 統 晤 鎢 炵 苀
Character in Guobiao (GB) code 絪 絏 ╰ 参 编 码 系 统
70
71
Code
7DE8 78DC 7CFB 7D71 7F16 7801 7CFB 7EDF
(in hexadecimal representation)
Character in Unicode 編 碼 系 統 编 码 系 统
72
Language Character encoding system Size per character
English ASCII 7 bits to 1 byte
Traditional Chinese Big-5 code
2 bytes
Simplified Chinese Guobiao (GB) code
Most languages in the world Unicode 1 to 4 bytes
73
74
75
76
77
78
79
80
81
82
83
•
•
Readable
barcode
Unreadable
barcode
84
85
86
Rotated Distorted Dirtied
87
Attribute Barcode QR code
A QR code can be scanned from any
direction. Even if the scanner is at an
Normally, a barcode can only be scanned
Easiness to scan angle that distorts the scanned image, it
from two angles, which are 0° or 180°.
still has a chance to read the QR code
successfully.
If the width of a single bar or a single A QR code has a higher error correction
Error correction
space is altered, a barcode cannot be capability than a barcode. It can often
capability
scanned correctly. restore up to 30% of data.
The maximum length of the number Usually, the character limit of the text
Character limit
sequence is around 50. string is at least 1000.
88
89
90
91
•
92
Analog data storage Digital data storage
93
Attribute Analog data Digital data
Physical. The change between its values Discrete symbols. Usually, the symbols
Way of representation
is continuous. are "0" and "1" in digital devices.
High.
Viability to reduce storage
Low. Digital television signals occupy less
size by compression
radio spectrum.
Low. High.
Calculation results written on a ledger An electronic spreadsheet can update
Capability of data
needs to be updated manually when data automatically when relevant data
analysis
relevant data is changed. is changed and even create charts in no
time.
94
•
•
95
96
97
98
99
100
101
102
103
104
105
•
•
106
107
Lossless Compression Lossy compression
108
𝑈𝑛𝑐𝑜𝑚𝑝𝑟𝑒𝑠𝑠𝑒𝑑 𝑆𝑖𝑧𝑒
𝐶𝑜𝑚𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛 𝑅𝑎𝑡𝑖𝑜 =
𝐶𝑜𝑚𝑝𝑟𝑒𝑠𝑠𝑒𝑑 𝑆𝑖𝑧𝑒
109
File format BMP PNG JPG
Image
Compression
1376 KB / 609 KB = 2.26 1376 KB / 5 KB = 275
ratio
110
111
112
File format BMP JPG
Compression Uncompressed Lossy
Image
File size 1 MB 1 MB
Image width 550 1618
Image height 635 1871
File size after compressing
853 KB 1017 KB
into a ZIP file
Compression ratio of
compressing it into a ZIP 1024 ÷ 853 = 1.20 1024 ÷ 1017 = 1.01
file
113
BMP JPG
114
•
•
115
•
116
•
117
File format Type Remarks
Relatively small file size.
TXT Plain text Widely supported by different operating systems.
Native to Adobe Acrobat, but is usually exported from other file formats.
Contain multimedia, including images, audios, videos and hyperlinks.
PDF Formatted text Provides consistent document layout and text format across different devices
as well as operating systems, i.e. it is cross-platform.
118
119
120
121
•
122
•
123
•
124
1-bit colour 3-bit grayscale 3-bit colour 8-bit colour
125
High-resolution image Low-resolution image
126
Original image Image with blank spaces Cropped image
127
16:9 monitor 4:3 monitor
128
129
Transparent Not Transparent
130
File Support Support
Type Compression
format transparency animation
BMP Bitmap Uncompressed
JPEG/
Bitmap Lossy
JPG
GIF Bitmap Lossless
PNG Bitmap Lossless
WebP Bitmap Lossless or Lossy
TIFF/TIF Bitmap Lossless
SVG Vector Uncompressed
131
Colour depth 24 bits
Resolution 1024 × 768
132
133
134
135
136
137
•
•
•
138
Sampling with a high bit depth Sampling with a low bit depth
139
Sampling with a high bit depth Sampling with a low bit depth
140
•
141
File format Compression Remarks
High audio quality.
WAV/WAVE Uncompressed
Relatively large file size.
MP3, AAC,
Lossy Relatively small file size.
OGG
High audio quality.
FLAC, ALAC Loseless
Relatively large file size.
142
Bit depth 16 bits
Number of channel(s) 2
Sampling rate 96,000 Hz
2 minutes and 30
Duration
seconds
143
144
145
1. Advantage: WAV has a higher audio quality.
146
•
•
•
•
147
148
149
Browser
File format Codec File size Features and applications
support
Relatively small with high
MPEG-4 Most • Video streaming
compression rate
• Live streaming
H.264
Most Smaller than MPEG-4
MP4 (AVC)
• HD and Full HD video streaming
• Live streaming
H.265
Few Smaller than H.264
(HEVC) • Better image quality for streaming
videos with a resolution above 2K
Most • Video streaming
Smaller than H.264 with
WebM VP8 latest
higher compression rate
versions • Live streaming
150
Bit depth 16 bits
Resolution 640 × 360
Frame rate 24 fps
Duration 1 hour
151
Original files Compressed files
A. A.png A.zip
B. B.jpg B.zip
C. C.wav C.zip
D. D.wmv D.zip
152
153
154