Encoding How is information represented?
Way of looking at techniques Data Medium Digital Analog Digital Analog NRZ Manchester Differential Manchester Phase Coded Modulation (digitized voice) ASK FSK PSK modems AM/FM radio Television
Analog vs Digital Figure 3.1 Edges are crisper on digital. Attempt to store discrete vs continuous waveforms. Some information is more naturally analog. Some is digital.
Analog Light waves Sound waves –natural –am fm radio Most waves in nature Waves are categorized according to frequency
Digital Most digital information derives from computer representation. Examples –programs –data Memories force representation to be digital because they store information digitally –in one of two states DIGITAL and ANALOG are not really that different!
Digital Data on Digital Signal Time low value high value T, duration of 1 bit Figure 3.2 NRZ Encoding NRZ -> 1 is low, 0 is high
Beginning and End of a bit Time low value high value Figure 3.3 NRZ Encoding of a Sequence of 0s constant voltage level If the values are not changing, how can the bit times be determined?
Adding Timing to the Info Time low value high value T, duration of 1 bit Figure 3.4 Manchester Encoding Manchester -> Downward middle 0, Upward middle 1 What general observation can you make about the bandwidth cost?
Another Digital encoding Differential Manchester -> No change at beginning 1 Change at beginning 0 Time low value high value T, duration of 1 bit Figure 3.5 Differential Manchester Encoding Signal level at start of transmission
Remember More timing is essential Costs bandwidth Leaves less room for data
Analog Data on Digital Signal Phone system was analog (lines and switches) Computers led to digital lines and switches Most lines still analog to end-office Most phones analog Phone lines End Office lines Phone
How to convert? Fig 3.12
Pulse Code Modulation Take samples Encode as digital values At receiver, use digital samples to convert back to analog. Sources of ERROR –Number of samples –Precision of samples
Process of PCM Reverse upon reception!
Too few samples Signal changes too fast. Intuition tells you to sample more often. How fast? Fig 3.19
Familiar Examples Two points make a line. Less.. Not enough More.. Redundant Three points make a parabola.. Less.. Not enough More.. Redundant
How about a sine wave? Twice as fast as the frequency of the wave Actually the highest frequency component Hz -> sample at Hz Called the Nyquist rate Sampling too fast is a waste!
Accuracy Number of levels dictates number of bits 8 levels -> 3 bits 256 levels -> 8 bits Too few levels -> lose accuracy reconstructing. Consider a simple case of TWO levels. Can’t have too many, but can only afford a limited amount!
CD sound application 44.1 Khz 16 bit linear About samples / sec or Hz signal Range of hearing about 20Khz 16 bits generates 2^16 levels or levels Each sample is accurate to one part in A function of personal taste samples x 2 Bytes = 88K Bytes per sec 60 secs requires 60 x 88K = 5280 K Bytes or 5.3 M Bytes
Analog Data on Analog Signal Before the digital/computer age Dying Still used in tv, radio, cable tv, etc Carrier signal “carries” the information S(f) f Band Band Band Carrier frequency Radio Signal 1000Hz
Figure 3.15 Information -> SLOWEST frequency Carrier -> HIGHEST frequency Review previous example Think about your radio station –YOU ONLY HEAR UP TO Hz –Channel is much higher frequency for AM and higher yet for FM Not perfect example. But correct idea.
Digital Data on Analog Signal Modems Telephone line to the house is analog but information in the computer is digital. Lots of progressively complicated techniques in this section.
Back to Amplitude Frequency and Phase Encoding is change Encode 0 or 1 with a change in one or more of the basic wave features Some techniques can “squeeze” more information into the signal by using combinations.
Frequency Shift Key Frequency (FSK) Fig 3.13
Amplitude Shift Key 1100 SameFrequency. Different Amplitudes. Typically have many cycles per bit time.
Phase Shift Key 1000 Phase change
How many bits per change? Two amplitudes -> 0 or 1 -> 1 bit Four amplitudes -> 00, 01, 10, 11 -> 2 bits Eight amplitudes -> 000, … 111 -> 3 bits How far can you go? Forever as long as you have no noise and the sender can control with that resolution and the receiver can distinguish those small differences. Of course there is always noise!
Baud vs Bit Rate example 3.14 Four levels -> 2 bits per change If this is ONE second, bit rate is 8 bps Baud rate is 4 per second (changes per second)
ASK and PSK in Combination 2 amplitudes, 4 phases -> 8 combinations 8 combinations -> 3 bits per change. 3.15
What is the ultimate limit? Noise Shannon’s theorem tells theoretically how far you can go based on noise. In practice even that is not achieved. Compression is another technique that adds the illusion of stretching this technique but it is actually an orthogonal (independent) issue.
How is noise measured? Relative to the signal Signal to noise. E.g to 1 EQUIVALENTLY and more commonly in decibels ratio
Shannon’s result Where b is the bandwidth Example -> 20Khz medium with 30db signal to noise MaxBitRate = * log2(1+1000) =(about) * 9.7 = 194,000 bps
Bandwidth vs Noise As bandwidth goes up, “bit” width becomes smaller As bit width becomes smaller, edges become more critical for proper signal interpretation Noise makes edges fuzzy and makes it more difficult to distinguish levels