970 likes | 979 Views
Learn about binary encoding for data representation, encoding alternatives, arithmetic with binary numbers, ASCII code for text representation, and binary signaling in data transmission. Test your understanding with quizzes and examples.
E N D
Physical Layer Propagation:UTP and Optical Fiber Chapter 3 Updated January 2009 XU Zhengchuan Fudan University
Orientation • Chapter 2 • Data link, internet, transport, and application layers • Characterized by message exchanges • Chapter 3 • Physical layer (Layer 1) • There are no messages—bits are sent individually • Concerned with transmission media, plugs, signaling methods, propagation effects • Chapter 3: Signaling, UTP, optical fiber, and topologies • Wireless transmission is covered in Chapter 5
Figure 3-1: Signal and Propagation Received Signal (Attenuated & Distorted) Transmitted Signal Propagation Transmission Medium Sender Receiver A signal is a disturbance in the media that propagates (travels) down the transmission medium to the receiver If propagation effects are too large, the receiver will not be able to read the received signal
Test Your Understanding • P 141
Binary-Encoded Data • Computers store and process data in binary representations • Binary means “two” • There are only ones and zeros • Called bits 1101010110001110101100111
Binary-Encoded Data • Non-Binary Data Must be Encoded into Binary • Text • Integers (whole numbers) • Decimal numbers • Alternatives (North, South, East, or West, etc.) • Graphics • Human voice • etc. Hello 11011001…
Binary-Encoded Data • Some data are inherently binary • 48-bit Ethernet addresses • 32-bit IP addresses • Need no further encoding
Integer 0 1 2 3 4 5 6 7 8 Binary 0 1 10 11 100 101 110 111 1000 Figure 3-2: Arithmetic with Binary Numbers Binary Arithmetic for Whole Numbers (Integers) (Counting Begins with 0, not 1) “There are 10 kinds of people—those who understand binary and those who don’t”
Figure 3-2: Arithmetic with Binary Numbers, Continued Binary Arithmetic for Binary Numbers Basic Rules 1 0 0 1 1 +1 +0 +1 +0 +1 +1 =0 =1 =1 =10 =11
Figure 3-2: Arithmetic with Binary Numbers, Continued Examples Binary Decimal 1000 8 +1 +1 =1001 =9 +1 +1 =1010 =10 +1 +1 =1011 =11 +1 +1 =1100 =12
Figure 3-3: Binary Encoding for Alternatives Encoding Alternatives (Product number, region, gender, etc.) (N bits can represent 2N Alternatives) Number of Bits In Field (N) 1 2 3 4 8 16 … Number of Alternatives That Can be Encoded with N bits 2 (21) 4 (22) 8 (23) 16 (24) 256 (28) 65,536 (216) … Each added bit doubles the number of alternatives that can be represented
Powers of 2 Each additional bit doubles the number of possibilities Start with one you know and double or halve until you have what you need E.g., if you know 8 is 256, 10 must be 4 times as large or 1,024. Memorize for 1, 4, 8, and 16 bits
Figure 3-3: Binary Encoding for Alternatives • Quiz • How many flavors of ice cream can you represent in half a byte of storage? • How many bits do you need to represent 64 flavors of ice cream? • How many bits do you need to represent 6 sales districts?
Figure 3-4: ASCII and Extended ASCII • ASCII Code to Represent Text • ASCII is the traditional binary code to represent text data • Seven bits per character • 27 (128) characters possible • Sufficient for all keyboard characters (including shifted values) • Capital letters (A is 1000001) • Lowercase letters (a is 1100001) • Each character is stored in a byte • The 8th bit in a byte normally is not used
Figure 3-4: ASCII and Extended ASCII, Continued • Extended ASCII • Used on PCs • Uses a full 8 bits per character • 28 (256) characters possible • Extra characters can represent formatting in word processing, etc. • Converters • Text-to-ASCII and Text-to-Extended ASCII Converters are Readily Available on the Internet
Figure 3-5: Binary Coding for Graphics Image • Pixels • 1. Screen is divided into small squares called pixels (picture elements) • 2. Each pixel has three dots—red, green, and blue. Sometimes a black dot too 3. JPEG stores one byte per color (24 bits total) This gives 256 intensity levels for each color or16.8 million colorsoverall (2563)
Test Your Understanding • P 146 • 3 c
Figure 3-6: Data Encoding and Signaling 1. First, data must be converted to binary, as we have just seen Data “Now is the …” Male or Female Graphics Human Voice Binary Encoding Binary- Encoded Data 1101010 Signaling 2. Second, bits must be covered Into signals (voltage changes, etc.). Voltage change, etc.
Figure 3-7: On/Off Binary Signaling Clock Cycle Light Source Off= 0 On= 1 On= 1 Off= 0 On= 1 Off= 0 On= 1 Optical Fiber During each clock cycle, light is turned on for a one or off for a zero.
Figure 3-8: Binary Signaling in 232 Serial Ports In a clock cycle, 3 to 15 volts represents a zero -3 to -15 volts is a ONE 15 Volts Clock Cycle 0 0 0 3 Volts 0 Volts -3 Volts 1 This type of signaling is used in232 serial ports. 1 -15 Volts
Figure 3-9: Relative Immunity to Errors in Binary Signaling Transmitted Signal (12 Volts) Received Signal (6 volts) 15 Volts 0 3 Volts 0 Volts -3 Volts Despite a 50% drop in voltage, the receiver will still know that the signal is a zero 1 -15 Volts
11 10 01 00 Binary and Binary Signaling • In binary signaling, there are two states • This can represent a single bit per clock cycle. • In digital signaling, there are a few bits per clock cycle—2, 4, 8, 16, 32, … • With more states, several bits to be sent per clock cycle • Note that all binary transmission (2 states) is digital (few states) • But not all digitaltransmission isbinary 11 10 01 01 Clock Cycle 00
Test Your Understanding • P 149 • 4 a, b, c
11 10 01 00 Figure 3-10: 4-State Digital Signaling Box Clock Cycle 11 10 01 01 00 Client PC Server Digital signaling has a FEW possible states per clock cycle (4 in this slide) This allows it to send multiple bits per clock cycle This increases the bit transmission rate per clock cycle It reduces error resistance because differences between states are smaller
Quiz Box • Which Is Binary? Which Is Digital? 3. On/Off Switch 2. Number of Fingers 1. Calendar 5. Gender Male or Female 4. Day of the Week
Figure 3-10: 4-State Digital Signaling, Continued Box • Equation 3-1:Bit rate = Baud rate * Bits sent per clock cycle • Baud rate is the number of clock cycles per second • If the clock cycle is 1/1000 of a second, the baud rate is 1,000 baud • Bit rate is then the number of clock cycles per second times the number of bits sent per clock cycle • If the three bits are sent per clock cycle, the bit rate is 3,000 bps or 3 kbps
Figure 3-10: 4-State Digital Signaling, Continued Box • Equation 3-2: States = 2Bits • Bits is the number of bits to be sent per clock cycle • States is the number of states needed to send that many bits • Doubling the number of states transmits one more bit per clock cycle.
Figure 3-10: 4-State Digital Signaling, Continued Box • Example: • The clock cycle is 1/100,000 second • The baud rate is 100 kbaud (not kbauds) • You want a bit rate of 500,000 bps • Solution: • You have to send 5 bits per clock cycle (baud) • This will require 32 states • States = 2bits • States = 25 • States = 32
Figure 3-10: 4-State Digital Signaling, Continued Box • Example: • Suppose there a system has 8 states • Suppose that the clock cycle is 1/10,000 second • How fast can the system transmit? • Solution: • With four states, 3 information bits can be sent per clock cycle (8=2X) [Equation 3-2] X=3 • With a clock cycle of 1/10,000, baud rate is 10,000 baud • The bit rate will be 30 kbps (3 bits/clock cycle times 10,000 clock cycles per second). [Equation 3-1]
Test Your Understanding • P 151
UTP Propagation Unshielded Twisted Pair wiring
Figure 3-12: 4-Pair UTP Cord with RJ45 Connector 3. RJ-45 Connector 1. UTP Cord Industry Standard Pen 2. 8 Wires Organized as 4 Twisted Pairs UTP Cord
RJ-45 Jacks and Connectors RJ-45 Jack RJ-45 Jack RJ-45 Jack RJ-45 Connectors
Figure 3-11: Unshielded Twisted Pair (UTP) Wiring, Continued • UTP Characteristics • Inexpensive and to purchase and install • Dominates media for access links between computers and the nearest switch
Test Your Understanding • P 154
Figure 3-13: Attenuation and Noise Power 1. Signal Signals in UTP attenuate with propagation distance. If attenuation is too great, the signal will not be readable by the receiver. Distance
Figure 3-14: Decibels • Attenuation is Sometimes Expressed in Decibels (dB) • The equation for decibels is • dB = 10 log10(P2/P1) • Where P1 is the initial power and P2 is the final power after transmission • If P2 is smaller than P1, then the answer will be negative
Figure 3-14: Decibels, Continued • Example • Over a transmission link, power drops to 37% of its original value • P2/P1 = 37/100 = .37 (37%/100%) • LOG10(0.37) = -0.4318 • 10*LOG10(0.37) = -4.3 dB (negative, reflecting power reduction through attenuation) • In calculations, the Excel LOG10 function can be used
Figure 3-14: Decibels, Continued • There are two useful approximations • 3 dB loss is a reduction to very nearly 1/2 the original power • 6 dB loss is a decrease to 1/4 the original power • 9 dB loss is a decrease to 1/8 the original power • … • 10 dB loss is a reduction to very nearly 1/10 the original power • 20 dB loss is a decrease to 1/100 the original power • …
Figure 3-13: Attenuation and Noise, Continued Power Signal Noise Spike Error Noise Floor Signal- to-Noise Ratio (SNR) Noise Distance Noise is random unwanted energy within the wireIts average is called the noise floor (噪声基底)Random noise spikes (噪声毛刺) cause errors--A high signal-to-noise ratio reduces noise error problemsAs a signal attenuates with distance, damaging noise spikes become more common
Limiting UTP Cord Length • Limit UTP cord length to 100 meters • Limits attenuation to being a negligible problem • Limits noise problems being a negligible problem • Note that limiting cord lengths limits BOTH noise and attenuation problems 100 Meters Maximum Cord Length
Test Your Understanding • P 157-158
Figure 3-11: Unshielded Twisted Pair (UTP) Wiring, Continued • Electromagnetic Interference (EMI) (Fig. 3-15) • Electromagnetic interference (电磁干扰) is electromagnetic energy from outside sources that adds to the signal • From fluorescent lights, electrical motors, microwave ovens, etc. • The problem is that UTP cords are like long radio antennas. • They pick up EMI energy nicely • When they carry signals, they also send EMI energy out from themselves
Figure 3-15: Electromagnetic Interference (EMI) and Twisting Electromagnetic Interference (EMI) Twisted Wire Interference on the Two Halves of a Twist Cancels Out
Figure 3-16: Crosstalk Interference and Terminal Crosstalk Interference (交互干扰) Untwisted at Ends Signal Crosstalk Interference Terminal crosstalk interference Normally is the biggest EMI problem for UTP Terminal Crosstalk Interference
Figure 3-11: Unshielded Twisted Pair (UTP) Wiring, Continued • Electromagnetic Interference (EMI) (Fig. 3-15) • Terminal crosstalk interference dominates interference in UTP • Terminal crosstalk interference is limited to an acceptable level by not untwisting wires more than a half inch (1.25 cm) at each end of the cord to fit into the RJ-45 connector • This reduces terminal crosstalk interference to a negligible level. 1.25 cm or 0.5 inches
UTP Limitations • Limit cords to 100 meters • Limits BOTH noise AND attenuation problems to an acceptable level • Do not untwist wires more than 1.25 cm (a half inch) when placing them in RJ-45 connectors • Limits terminal crosstalk interference to an acceptable level • Neither completely eliminates the problems but they usually reduce the problems to negligible levels