Ch. 8: Bits and Bytes
Chapter Outlines
Ch. 5: Web Searching
Ch. 11: Multimedia Encoding
Coding with symbols.
Symbols are used to represent things.
Numbers are convenient, but we could use others.
601 925 3815, or ^)! (@% #*!%
Ordering.
Symbols made of digits are easily ordered for searching.
We can do this with any symbols if we agree on the
collating sequence
.
Alphabetical order is a collating sequence.
Combining symbols.
Symbols can be combined.
If you have
p
symbols, a group of
n
gives you
p
n
.
Six faces on a die, two dice, give 6
2
= 36 pairs.
Ten digits, 10
3
= 1000 3-digit numbers (including 000).
If labels are constructed using five capital letters, there are 26
5
= 11,881,376 possible labels.
Binary
Information must be coded some physical phenomenon.
Easiest to represent two states. Present and Absent: PandA.
On or off.
Charged or discharged.
Magnetized or not.
Pit or land (non-pit).
Divide disks into areas.
Hexadecimal
A more compact representation for strings of bits.
Use 16 symbols, 0–9, A–F: hex “digits”.
Each hex digit is four bits:
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
A
1010
B
1011
C
1100
D
1101
E
1110
F
1111
Group starting at right; pad with zeros on the left.
101000001010110011 is 282B3
37D1 is 0011011111010001.
Encoding text.
Each character is coded in
ASCII
.
Originally, 7 bits, 0000000–1111111 (00–7F).
PC expanded to 8, 00–FF. Second bank, 80–FF is not very standard.
Tom is 010101000110111101101101, or 546F6D
Other information is recorded using tags.
HTML is one way; many others.
Can think of
<
as an escape character.
Ch. 5: Web Searching
Ch. 11: Multimedia Encoding