|
|
N E T W O R K I N G W
E E K 1
Basic
Idea (media)
- Encode data as energy and transmit
it
- Decode energy at destination back to data
- Energy can be electrical, light, radio, or sound
Ping
Program Research
[ T O P ]
Radio
Signal Travel Time
- Problem:
If a satellite orbits 20000 miles above the earths surface,
how long does it take a radio signal to reach the satellite and
be sent back?
- Known entities
- Speed of light is 3x10^8 m/s
- Time to retransmit = 53 microseconds
- Convert miles to meters
- 20000 miles = 32,186,880 meters
- Divide distance by speed
- assume that the signal travels at the speed of light
- 32,186,880 meters/3x10^8 meters/sec.
- cancel the meters and get .107 seconds
- Multiply by two (round trip) and add retransmit time
- (.107*2)+.000056 = .214056 seconds to transmit to satellite
and back
[ T O P ]
Local Asynchronous Communication
- asynchronous: transmitter and receiver do not explicitly
coordinate each data transmission
- Asynchronous may also mean no explicit information about
where data bits begin and end
- Data transmission requires:
- Encoding bits as energy
- Transmitting energy through medium
- Decoding energy back into bits
[ T O P ]
Full-duplex
communication
- Two endpoints may send data simultaneously
- Requires an electrical path in each direction
[ T O P ]
RS-232
- Connection must be less than 50 feet
- Data represented by voltages between +15v and -15v
- 25-pin connector, with specific signals such as data, ground
and control assigned to designated pins
- Specifies transmission of characters between, e.g., a terminal
and a modem
- Transmitter never leaves wire at 0v; when idle, transmitter
puts negative voltage (a 1) on the wire transmitter indicates
start of next character by transmitting a zero
- Receiver can detect transition as start of character (zero
/ space) called the start bit
- Transmitter sends a one (mark) after each character (stop
bit)
- Start and stop bits represent framing of each character
- If transmitter and receiver are using different speeds, stop
bit will not be received at the expected time which is called
a framing error
- RS-232 devices may send an intentional framing error called
a BREAK
- character represented by 7 data bits requires transmission
of 9 bits
- Transmitter and receiver must agree on timing of each bit
by choosing transmission rate measured in bits per second
- Baud rate measures number of signal changes per second
[ T O P ]
Nyquist
sampling theorems
- For RS-232, using two voltages, maximum speed over medium
with bandwidth B is 2B
- In general, for system using K different states, maximum
is 2B log2K
- A periodic signal can be reproduced precisely using n samples
per second. If the Max frequency in signal is F and n=2F
For Example (using two voltages):
Suppose one sent 10000 7-bit characters across a RS-232
connection that operates at 9600 baud. How long would the transmission
require.
- Nyquist theorem suggests that if the bandwidth is 9600 then
the maximum rate of data transmission is 48050 bits a second.
- Now 7 bit characters plus a start and a stop bit = 9 bits
a piece * 10000 is 90000 bits to transmit.
- 90000bits/48050 bits per second = 1.9 seconds
Another Example (using multiple voltages):
What is the maximum rate in bits per second on a system
that has a bandwidth of 4000 Hz and uses four values of voltage.
- Nyquist theorem suggests that if the bandwidth is 4000 then
the maximum rate of data transmission is 2B log2
k and so (2)4000 log2 4.
- 16000 bits/second.
[ T O P ]
Terminology
- Frequency: cycles per second or htz.
- Phase Shift: a shift of the sine curve left or right.
- Amplitude: height of the sine wave curves.
- Baud Rate: how fast the hardware can change a signal.
[ T O P ]
waveform diagram
A waveform diagram that results when the
word bit is sent in ASCII across an RS-232 connection. Click here.
[ T O P ]
Advantages of digitized systems
- digital - 1's and 0's
- analog - time varying, continuous signal
Nyquist suggests
that we can digitize data by sampling (2x height = number of
samples needed) a sine wave (Y coordinates), instead of transmitting
the entire wave. The advantage ... No signal degradation.
[ T O P ]
Figuring
bit-rate (examples)
What is the rate for digitized "CD" quality
sound?
- humans need 20-2200hz to hear
- because of Nyquist theorem we double ==> 44,100hz
- 2 channels of 8 bits a piece
- (44100 samples/(seconds/channel))* 2 channels * 8
bits/samples
- cancel and multiply to get 705600 bits/second
What is the rate for digitized telephone?
- Max frequency is 4000hz
- because of Nyquist theorem we double ==> 8000hz
- (8000 samples/(seconds/channel))* 1 channels * 8
bits/samples
- cancel and multiply to get 6600 bits/second or 64k
[ T O P ]
Shannon's
theorem (how many bits can you pump through a channel)
- C - channel capacity (bits/sec.) ... a channel is the communication
between sender and receiver.
- B - bandwidth
- S - average power of signal
- N - average power of noise
- C = B log2 (1 + (S/N))
S/N is ratio of two powers which is in units of decibels (logarithmic).
Example:
- 1 decibel = 10 log10 (S/N)
- standard signal to noise ration on a telephone is 30 decibels
- 30 = 10 log10 (S/N)
- 3 = log10 (S/N)
- 1000 = S/N
So now lets use Shannon's theorem (p.51 question 5.6):
- C = B log2 (1 + (S/N))
- S/N = 1000 (from above)
- 3000 is bandwidth (B) of telephone
- so C = 3000 log2 (1 + 1000)
- (1001 = 2 to the c power) * 3000
- something < 10 * 3000 is roughly 30000bps
Finally then, if we are getting 56k out of our telephone lines
then we must have higher quality lines then before which are
better then 30 decibels.
[ T O P ]
Carrier
Based Communications
- Binary Transmission
- Modulation Transmission
- not limited by distance
- frequency Transmission
- amplitude
- AM
- height of sine wave modulates
- EXAMPLE (p.51 question 5.1):
- If a sine wave operates at 4000Hz then it can encode:
- (N= number of sine wave heights or amplitudes)
- (2)4000log2N bits.
- frequency
- frequency modulates
- EXAMPLE (p.51 question 5.2):
- Each radio station in an area must be assigned a unique carrier
frequency to avoid interferience when a receiver picks up both
(close frequencies) .
- phase
- phase shift to encode info
- a right shift of 180 degrees would resemble two upside down
parabolas side by side
- frequency division multiplexing (FDM)
- linear shift of frequency
- goes through a box that triples all frequencies into a piece
of the spectrum
- bandwidth filters
- each channel has its own frequency that is filtered into
a piece of the spectrum
- time division multiplexing
[ T O P ]
Some
Common Conversions
yotta
zetta
exa
peta
tera
giga
mega
kilo
hecto
deka |
10E24
10E21
10E18
10E15
10E12
10E9
10E6
10E3
10E2
10E1 |
deci
centi
milli
micro
nano
pico
femto
atto
zepto
yocto |
10E-1
10E-2
10E-3
10E-6
10E-9
10E-12
10E-15
10E-18
10E-21
10E-24 |
|
8 bits |
is |
1 byte |
byte |
|
8192 bites |
is |
1 kilobyte |
k |
|
1024 bytes |
is |
1 kilobyte |
k |
|
1024 kilobytes |
is |
1 megabyte |
MB |
|
1048576 bytes |
is |
1 megabyte |
MB |
|
8388608 bites |
is |
1 megabyte |
MB |
[ T O P ] |
|