Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Dr. Thomas Hicks Computer Science Department Trinity University 1 Data Communication & Networking CSCI 3342.

Similar presentations


Presentation on theme: "1 Dr. Thomas Hicks Computer Science Department Trinity University 1 Data Communication & Networking CSCI 3342."— Presentation transcript:

1

2 1 Dr. Thomas Hicks Computer Science Department Trinity University 1 Data Communication & Networking CSCI 3342

3 2 Digital To Digital Encoding

4 3 Major 4 Encoding Methods Digital-To- Digital Digital-To- Analog Analog-To- Digital Analog-To- Analog Binary Data Must Be Encoded/Converted To A Form That Will Propagate Over A Wire

5 4 zDigital To Digital Encoding – Converting Binary 0’s and 1’s Into A Sequence Of Voltage Pulses That Can Propagate Over A Wire. yTransmit Data From Computer To Printer Digital To Digital Encoding

6 5 Signal Encoding Signal Level Data Level

7 6 Signal Level vs. Data Level

8 7 Pulse Rate & Bit Rate

9 8 Pulse Rate = No Pulses Per Second Bit Rate = No Bits Per Second If the pulse carries only one bit, the Bit Rate = Pulse Rate [Not Always The Case]

10 9 General Case: BitRate = PulseRate x log 2 L L = # Data Levels BitRate = PulseRate x log 2 L L = # Data Levels BitRate = PulseRate x log 2 DataLevels BitRate = PulseRate x log 2 DataLevels

11 10 Example 1 A signal has two data levels with a pulse duration of 1 ms. We calculate the pulse rate and bit rate as follows: Pulse Rate = 1/ = 1000 pulses/s Bit Rate = Pulse Rate x log 2 L = 1000 x log 2 2 = 1000 bps

12 11 Example 2 A signal has four data levels with a pulse duration of 1 ms. We calculate the pulse rate and bit rate as follows: Pulse Rate = 1/ = 1000 pulses/s Bit Rate = PulseRate x log 2 L = 1000 x log 2 4 = 2000 bps

13 12 DC Components

14 13 Most Coding Schemes Will Have Values Above & Below The Line - Positive & Negative Values We Shall Examine Numerous Coding Schemes

15 14 Some coding schemes have a residual DC [Direct-Current] that has a zero frequency. The positive and negative voltages do not cancel each other This extra energy on the line is useless and will not pass properly through Transformers! Bad! DC Component Coding Schemes

16 15 Synchronization

17 16 The Receiver's Bit Intervals Must Match The Sender's Bit Intervals If The Signal Is To Be Interpreted Correctly! We Must Have Some Way Of Synchronizing The Signal!

18 17 Lack Of Synchronization

19 18 Example 3 In a digital transmission, the receiver clock is 0.1 percent faster than the sender clock. How many extra bits per second does the receiver receive if the data rate is 1 Kbps? How many if the data rate is 1 Mbps? Solution At 1 Kbps: 1000 bits sent  1001 bits received  1 extra bps At 1 Mbps: 1,000,000 bits sent  1,001,000 bits received  1000 extra bps

20 19 Many Line Coding Schemes

21 20 Only Some Of Major Encoding Methods! UnipolarBipolarPolar NRZ RZ AMIHDB3B8ZS NRZ-L NRZ-IManchester Differential Manchester ETC

22 21 NRZ-L You May Make A 5"x8" Card To Use On Exam (May Include Titles & Images)

23 22 Unipolar

24 23 Unipolar Encoding uses only One Voltage Level.

25 24 Unipolar Encoding

26 25 zUnipolar – Very Simple & Very Primitive Encoding Scheme (almost obsolete) yUnipolar – Only one polarity. zSending Voltage Pulses along a medium link (usually a wire or cable) yVoltage Level = 1’s yZero Voltage Level = 0’s zUnipolar uses either a Positive Or Negative Not Essential Assignment, But Logical! Unipolar Encoding -1

27 26 zUnipolar Requires DC Component yAverage Amplitude Is Non-Zero yNot All Mediums Can Handle A DC Component zUnipolar Requires Synchronization yNo Way Receiver Can Determine Beginning Or End yProblem With A Long, Uninterrupted Series Of 1’s yProblem With A Long, Uninterrupted Series Of 0’s zSolution To Synchronization Problem – Use A Separate Parallel Line To Carry Clock Pulse yDoubling # Lines Expensive Unipolar Encoding -2

28 27 Polar

29 28 Polar Encoding uses two voltage levels (positive and negative?)

30 29 Types Of Polar Encoding

31 30 zPolar Encoding – Uses Two Voltage Levels –> 0 Positive & 1 Negative – or Visa Versa yAverage Amplitude is 0 yDC Component Not Needed z4+ Types Of Polar Encoding yNRZ yRZ yManchester yDifferential Manchester Polar Encoding

32 31 NRZ-L Encoding (Polar)

33 32 Polar NRZ-L Encoding In Polar NRZ-L the Level of the Signal is Dependent upon the State of the Bit.

34 33 zNRZ - NonReturn to Zero – Two Most Popular Methods Are NRZ-L and NRZ-I zNRZ-L yUsually 0 Positive & 1 Negative {For Us!} yBiggest Problem With Long Stream Of 1’s or 0’s [Clocks Might Not Be Synchronized] Polar Encoding  NRZ-L

35 34 zSketch The NRZ-L Encoding For The Signal Below. NRZ-L Practice

36 35 NRZ-I Encoding (Polar)

37 36 In NRZ-I the signal is Inverted If a 1 is Encountered.

38 37 zNRZ-I yAn Inversion Of The Voltage Represents 1 xIf Pos  Neg If Neg  Pos y No Change Represents 0 zSynchronization Occurs With Every 1 Bit y0’s Can Still Cause Problem – More 1’s Than 0’s y0 First  Pos y1 First  Neg yNext Bit Is 1 Polar Encoding  NRZ-I

39 38 zSketch The NRZ-I Encoding For The Signal Below. NRZ-I Practice

40 39 RZ Encoding (Polar)

41 40 Polar RZ zRZ yPositive Voltage Means 1 yNegative Voltage Means 0 ySignal Returns To 0 Voltage Half-Through zRZ - Return to Zero – A Signal Change With Every Bit To Assure Synchronization ySeveral Solutions

42 41 Polar RZ zRZ – 3 Levels Of Amplitude – 3 Voltage Levels

43 42 Polar RZ Practice zSketch The RZ Encoding For The Signal Below.

44 43 A Good Encoded Digital Signal Must Contain a Provision for Synchronization.

45 44 Manchester Encoding (Polar)

46 45 In Manchester Encoding, the Transition at the Middle of the Bit is used for both Synchronization and Bit Representation.

47 46 Polar Manchester zManchester yPositive To Negative Transition For 0 yNegative To Positive Transition For 1 yTwo Levels Of Amplitude yInversion At Middle Middle Of Bit Time

48 47 Polar Manchester (cont) zManchester yInversion At Middle Middle Of Bit Time ySynch Signal Change Middle Of Each Bit Green Blue

49 48 Polar Manchester Practice zSketch The Manchester Encoding For The Signal Below. Two Levels Of Amplitude Same Synchronization As RZ

50 49 Manchester I Would Provide KEY

51 50 Differential Manchester Encoding (Polar)

52 51 In Differential Manchester Encoding, the Transition at the Middle of the Bit is used only for synchronization. The Bit Representation is defined by the Inversion or Non-Inversion at the beginning of the bit.

53 52 Polar Differential Manchester zDifferential Manchester ySynch Signal Change Middle Of Each Bit yInversion At Beginning Of Bit Time yTransition At Start Of Bit Time = 0 yNo Transition At Start Of Bit Time = 1 y2 Signal Changes For 0, 1 Signal Change for 1

54 53 Polar Differential Manchester Practice zSketch The Differential Manchester Encoding For The Signal Below.

55 54 Bipolar

56 55 In Bipolar Encoding, we use Three Levels: positive, zero, and negative.

57 56 Bipolar zBipolar – Three Most Most Common Solutions – AMI, B8ZS, & HDB3 zUses 3 Voltage Levels yPositive, Negative, Zero zZero Level Is 0 zAlternating Positive & Negative Are 1

58 57 AMI Encoding (Bipolar)

59 58 Bipolar - AMI zAMI – Alternate Mark Inversion yMark In Telegraphy Means 1 yZero Voltage Represent 0 yAlternating Positive & Negative Represent 1 Synchronize Long Sequence 1’s No Synchronize Long Sequence 0’s DC Component = 0

60 59 Bipolar AMI Practice zSketch The AMI Encoding For The Signal Below.

61 60 Bipolar - Pseudoternary z“A Variation Of Bipolar AMI is called Pseudoternary, In Which Binary 0’s Alternate Between Positive & Negative Voltages.”

62 61 BZPS Encoding (Bipolar)

63 62 Bipolar – BZPS zB8ZS – Bipolar 8 Zero Substitution ySame As AMI Until 8 Consecutive 0’s yUse Chart Below [Will Be Provided On Exam/ Quiz]

64 63 Bipolar – B8ZS Practice zSketch The B8ZS Encoding For The Signal Below.

65 64 Bipolar – HDB3 zHDB3 – High Density Bipolar 3 ySimilar To B8ZS – Except Done In Sets Of 4 yUse Chart Below [Will Be Provided On Exam/ Quiz]

66 65 2B1Q Encoding (Bipolar)

67 66 2B1Q Encoding  2 Binary 1 Quaternary Encoding z2B1Q Encoding  2 Binary 1 Quaternary Encoding  4 Voltages

68 67 MLT-3 Encoding (Bipolar)

69 68 MLT-3 Encoding zMLT-3 Encoding Similar to NRZ-I zUses 3 Levels Of Signal +1, 0, -1 zThe Signal Transitions From One Level To The Next At The Beginning Of A 1 Bit zThere Is No Transition At The Beginning Of A 0 Bit

70 69 Block Encoding

71 70 Figure 4.15 Block coding Need Some Kind Of Redundancy To Assure Synchronization! Need Some Of The Chapter 10 Error Detection To Assure Delivery! High Performance!

72 71 1. Divide Into Groups Of M Bits 2. Substitute N-Bit Code For M-Bit Group N > M 3. Use A Line Encoding Scheme To Create A Signal Block Encoding Comes At A Cost - Requires Increase Bandwidth!

73 72 Figure 4.16 Substitution in block coding

74 73 4B5B 8B10B Encoding

75 74 Table 4.1 4B/5B encoding -- Not All 5 Bit Codes Used! DataCodeDataCode

76 75 Table 4.1 4B/5B encoding (Continued) DataCode Q (Quiet)00000 I (Idle)11111 H (Halt)00100 J (start delimiter)11000 K (start delimiter)10001 T (end delimiter)01101 S (Set)11001 R (Reset) B/10B Encoding Groups of 8 Bits - Substituted Into A 10 Bit Code - More Efficient & Better Error Detection! Long Table!

77 76 8B6T Encoding

78 77 8B/6T Block Encoding Take Advantage Of Speed & Error Detection Of Block Encoding Requires Much Less Bandwidth 8 Binary Bits Substituted Into A 6 Bit Ternary Table 8 Bits Translated Into 6 Bit of +1, 0, -1 [Table In Appendix D] Bit Sequences 3 6 Ternary

79 78 Analog To Digital Encoding

80 79 Encoding Methods Review Digital-To- Digital Digital-To- Analog Analog-To- Digital Analog-To- Analog Binary Data Must Be Encoded/Converted To A Form That Will Propagate Over A Wire

81 80 Analog To Digital Encoding zAnalog To Digital Encoding – Digitizing An Analog Signal yReducing The Potentially Infinite Number Of Values In An Analog Signal So That They Can Be Represented In A Digital Stream With A Minimum Loss Of Information.

82 81 Codec PAM PCM

83 82 Codec – Coder-Decoder zAnalog To Digital Converter Called A Codec yco der –dec oder  codec zConversion Requires Two Steps: yPulse Amplitude Modulation (PAM) yPulse Code Modulation (PCM)

84 83 Pulse Amplitude Modulation has some applications, but it is not used by itself in data communication. However, it is the first step in another very popular conversion method called Pulse Code Modulation.

85 84 Step 1: Pulse Amplitude Modulation (PAM) zI. Pulse Amplitude Modulation (PAM) ySample Analog Signal At Regular Intervals  Generate Pulses Accuracy Depends Upon # Of Samples Selected

86 85 Step 2: Pulse Code Modulation (PCM)- 1 zII. Pulse Code Modulation (PCM) z3 Steps yStep 1: Quantitize PAM Signals

87 86 Step 2: Pulse Code Modulation (PCM) - 2 zII. Pulse Code Modulation (PCM) z3 Steps yStep 2: Translate Each Value Into 7 Bit Binary Equivalent

88 87 Step 2: Pulse Code Modulation (PCM) - 3 zII. Pulse Code Modulation (PCM) z3 Steps yStep 3: Convert To Digital Using Appropriate Technique. Review UnipolarBipolarPolar ……

89 88 Complete Analog-To-Digital Conversion Flow Diagram

90 89 Nyquist According to the Nyquist Theorem, the Sampling Rate must be at least 2 times the Highest Frequency.

91 90 NYQUIST Theorem Sampling Rate  Remember : Analog-To-Digital Accuracy Depends Upon # Of Samples Selected zHow Many? zNyquist Theorem : The Sampling Rate Must Be At Least Two Times The Highest Frequency!

92 91 Nyquist In The Real World Sampling Rate Practice zTelephone Voice yMaximum Frequency = 4000 Hz Sampling Rate = __________ Samples/Second 8,000 zA Bandwidth of 11,000 Is Needed To Transfer A Signal Whose Frequency Range Is 1,000 Hz to 12,000 Hz. Sampling Rate = __________ Samples/Second 24,000

93 92 Bit Rate Bit Rate = Sampling Rate x Number Bits Per Sample Bit Rate : Also Called The Data Rate

94 93 Bit Rate Practice Want To Digitize Human Voice Using Eight Bit Samples. Sampling Rate = __________ Samples/Second Bit Rate = __________ Kbps Human Voice Has Frequency Range of 0 to 4 KHz. Sampling Rate = 2 * Highest Frequency (4000 Hz) 8,000 Bit Rate = Sampling Rate (8,000) * NoBitsPerSample (8) Bit Rate = 64,000 bps 64

95 94 Example 4 What sampling rate is needed for a signal with a bandwidth of 10,000 Hz (1000 to 11,000 Hz)? Solution The sampling rate must be twice the highest frequency in the signal: Sampling rate = 2 x (11,000) = 22,000 samples/s

96 95 Example 5 A signal is sampled. Each sample requires at least 12 levels of precision (+0 to +5 and -0 to -5). How many bits should be sent for each sample? Solution We need 4 bits; 1 bit for the sign and 3 bits for the value. A 3-bit value can represent 2 3 = 8 levels (000 to 111), which is more than what we need. A 2-bit value is not enough since 2 2 = 4. A 4-bit value is too much because 2 4 = 16.

97 96 Example 6 We want to digitize the human voice. What is the bit rate, assuming 8 bits per sample? Solution The human voice normally contains frequencies from 0 to 4000 Hz. Sampling rate = 4000 x 2 = 8000 samples/s Bit rate = sampling rate x number of bits per sample = 8000 x 8 = 64,000 bps = 64 Kbps

98 97 Transmission Modes

99 98 Data Transmission Parallel Asynchronous Synchronous Serial

100 99 Parallel Transmission zParallel Transmission – Eight or More Lines Are Bundled Together To Send One Byte At A Time

101 100 Serial Transmission zSerial Transmission – Requires Only One Communication Channel

102 101 Serial or Parallel Transmission Which Is Faster?

103 102 Serial or Parallel Transmission Which Is Least Expensive? Usually Limited To Short Distances

104 103 In Asynchronous Transmission, we send 1 start bit (0) at the beginning and 1 or more stop bits (1s) at the end of each byte. There may be a gap between each byte.

105 104 Serial Transmission Asynchronous - 1 zAsynchronous – Information Sent & Received In Agreed Upon Patterns; Timing Is Unimportant!

106 105 Serial Transmission Asynchronous - 2 zAsynchronous Serial Transmission yStart Bit [0] Is Sent To Alert Receiver y8 Bits – 1 Byte – Of Data Transmitted y1-2 Stop Bits [1’s] Is/Are Sent To Let User Know Finished yA Brief Time Gap Often Follows ySome Type Of Synchronization Must Be Embedded Within Data yCheap/Effective Choice For Low Speed Communication [Great For Terminal – Computer!]

107 106 Asynchronous here means “asynchronous at the byte level,” but the bits are still synchronized; their durations are the same.

108 107 Serial Transmission Synchronous - 1 zSynchronous – Information Combined Into Frames [Multiple Bytes]; Timing Is Essential!

109 108 Serial Transmission Synchronous - 2 zSynchronous Serial Transmission yNo Gaps – Unbroken String 1’s & 0’s yGaps Generally Filled In With Agreed Upon Sequences Of 1’s & 0’s – Idle yTiming Essential yMuch Faster Than Asynchronous

110 109 In Synchronous Transmission, we send bits one after another without start/stop bits or gaps. It is the responsibility of the receiver to group the bits.

111 110 Good Practice Problem zSketch The Encoding Of Signal With Each Of The Following On A New Page. Write NothingElse On This/These Pages Except Encoding Type & Your Name(s). Each Person On Team Must Do Their Own Copy Of This Problem! A. Unipolar B. NRZ-L C. NRZ-I D. RZ E. Manchester F. Differential Manchester G. AMI H. Pseudoternary I. B8ZS J. Quaternary 2B1Q K. MLT-3 L. 4B5B M. 8B6T

112 111 Data Communications & Networking CSCI 3342 Dr. Thomas E. Hicks Computer Science Department Trinity University Textbook: Computer Networks By Andrew Tanenbaum Textbook: Data Communications & Networking By Behrouz Forouzan Special Thanks To WCB/McGraw-Hill For Providing Graphics For Many Text Book Figures For Use In This Presentation.


Download ppt "1 Dr. Thomas Hicks Computer Science Department Trinity University 1 Data Communication & Networking CSCI 3342."

Similar presentations


Ads by Google