Preview: [[Chapter_1 Bit]] Just use for simple things

Letters: BCD, EBCDIC, ASCII, Unicode, Morse Code
Integers: Binary, Gray, 2’s complement
Numbers: Floating-Point
Proteins: Genetic Code
Telephones: NANP, International codes
Hosts: Ethernet, IP Addresses, Domain names
Images: TIFF, GIF, and JPEG
Audio: MP3
Video: MPEG

Symble space size

  • The number of symbles that need to be encode
    As a special case, if there is only one symbol, no bits are required to specify it.

  • If the number of symbols is infinite but countable (able to be put into a one-to-one relation with the integers) then a bit string of a given length can only denote a finite number of items from this infinite set.

  • If the number of symbols is infinite and uncountable (such as the value of a physical quantity like voltage or acoustic pressure) then some technique of “discretization” must be used to replace possible values by a finite number of selected values that are approximately the same.

Use of Spare Capacity

  • Ignore
  • Map to other values
  • Reserve for future expansion
  • Use for control codes
  • Use for common abbreviations
    EXAMPLES:

BCD: ignore or other method

Genetic Code: control code(3个密码子,第三个密码子由于摆动特性,易被损坏,丙氨酸有四个代码,包括所有以GC开头的代码,提高了编码的鲁棒性,UAA、UAG、UGA为停止代码,control code)
ASCII
Morse

there is an interesting thing
XOR is not a universal gate