250 likes | 350 Vues
Explore the evolution of codes, from Baudot to ASCII, and how information pioneers like Boole and Shannon shaped digital communication. Discover the significance of genetic codes and the difference between analogue and digital information. Learn about error detection, redundancy, and more.
E N D
Chaos, Communication and ConsciousnessModule PH19510 Lecture 9 Codes
Overview of Lecture • What is a code ? • Analogue & Digital Information • Information Pioneers - Boole & Shannon • The bit and binary signals • Baudot & ASCII codes • PCM Encoding • Error Detection & Correction
Braille Semaphore Morse ASCII A=1000001, F=1000110, K=1001011 B=1000010, G=1000111, L=1001100 C=1000011, H=1001000, M=1001101 D=1000100, I=1001001, N=1001110 E=1000101, J=1001010, O=1001111 Codes • Represent information into form for: • transmission • storage • processing • Alphabet • Numbers
Evolution of Alphabets • Ideographs • 1 symbol / idea • Hieroglyphs • 1 symbol / syllable • Alphabet • Syllables encoded in alphabet abcdefghijlkmnopqrstuvwxyz ABCDEFGHIJLKMNOPQRSTUVWXYZ
Evolution of Numbers • Tally Marks Mesopotamian Sexagesimal • Roman numerals • Arabic numerals I II III IV V VIVII VIII IX X 0 1 2 3 4 5 6 7 8 9
Nature’s Code • Genetic information is stored in a code based on 4 units - adenine (A), thymine (T), guanine (G) and cytosine (C) • 4-character code is stored on DNA, whose structure was discovered by Crick and Watson in 1953 • Bacterium 600,000 pairs • Human 3 x 109 pairs
Analogue & Digital Information • Analogue Information • Any value between limits • Most ‘real world’ quantities are analogue • Temperature, pressure, light intensity etc • Digital Information • Only discrete values possible • Numbers, Letters, other abstractions
1 0 Why Binary ? • Noise is endemic in circuits • Freedom from noise • process information faithfully Input Device Output Device 1 Noise Margin 0
George Boole (1815 – 1864) • Mathematician • Symbolic Methods • 1847 “Mathematical analysis of Logic” • Analogy between algebra & logic • Symbolic operations on logical propositions • Equations in logic • Boolean algebra
Claude Shannon (1916-2001) • 1937 “A Symbolic Analysis of Relay and Switching Circuits” • Applied Boolean algebra to relay circuits • Relays can solve problems in Boolean algebra • 1948 “A Mathematical Theory of Communication” • Best way to encode information for transmission • Maximise transmission in presence of noise
The Bit • Binary Digit • Fundamental unit of information • System has N different states (equally likely) • requires n bits to transmit information on state • If states are not equally likely, less information
0 - 0 1 - 1 2 - 10 3 - 11 4 - 100 5 - 101 6 - 110 7 - 111 8 – 1000 … 4210 = 101010B=1x32+0x16+1x8+0x4+1x2+0x1 Streams of 1s and 0s cumbersome Break into groups of 4 bits 4 bits = 0 – 15 == 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F Hexadecimal 4210 = 2A Hex Binary Counting
Group bits for convenience 4 bits = nibble 8 bits = byte 16 bits = word 32 bits = double word 64 bits = quad word Kilobyte kB 1024 = 210 bytes Megabyte MB 1,048,576 = 220bytes Gigabyte GB 1,073,741,824 =230 bytes Terabyte TB 1,099,511,627,776 =240 bytes Powers of 2
Rotary Shaft Encoder Gray code • Re-arrange binary counting • Only 1 bit changes at a time • Rotary encoders
Jean-Maurice-Émile Baudot • 1874 Multiplexing printing telegraph system • Up to 4 telegraph channels on single wire • Time Division Multiplexing • 5 bit code
ASCIIAmerican Standard Code for Information Interchange • Published 1967 • 7-bit code • 128 characters • 95 Printable characters • 33 Non-Printing controls • STX,ETX,EOT,BEL,NUL… • 8-bit extensions • Code page upper 128
Pulse code Modulation (PCM) • Sample analogue signal • n-bits • 2n levels • Quantisation Noise Quantisation Noise
Sampling Frequency and Aliasing Distortion • Need to sample signal ‘often’ enough • Example signal: • Sample 1 • Frequency high enough • Sample 2 • Sampling just high enough • Sample 3 • Sampling to slow • Aliasing Distortion
Nyquist Criterion • Sampling Frequency must be at least twice the highest frequency in the signal • fSample 2 x fSignal • Filter signal to remove high frequencies • Wagon wheel (temporal) • Patterned clothing on TV (spatial) • Photocopying/scanning banknotes
PCM Audio Sampling • Rate and number of levels dependent on quality • fsample = 2 x fsignal • Speech 8-bit (256 levels) 8kHz • CD quality 16-bit (65,536 levels) 44kHz
Redundant Information • English text has redundant information • Wasteful of space but… • Allows recovery from errors • If yu cn rd ths yu cn gt a gd jb prgrmmng cmptrs • Error Detecting Codes (EDC) • Error correcting codes (ECC)
Error Detecting Codes • Add redundant information to detect errors • Parity • Add extra bit to each ‘byte’ of information • Calculate bit so always odd number of bits • Can detect single bit errors • Checksums (CRC – Cyclic Redundancy check) • Complex polynomial based on all bits of message • Can detect errors & transpositions • Information storage & transmission • Credit Cards • DVLA Driver numbers
Error Correcting Codes • Put extra information in data stream to detect and correct errors • Hamming Codes • Reed-Solomon
Review of Lecture • What is a code ? • Analogue & Digital Information • Information Pioneers - Boole & Shannon • The bit and binary signals • Baudot & ASCII codes • PCM Encoding • Error Detection & Correction