Computer Network & Security
Course Learning Outcome (CLOs): After Completing this course successfully, the student will be able to…
CLO | Description |
CLO1 | Understand and describe fundamental concepts of computer networks, including network models and communication systems. |
CLO2 | Analyze and explain the functionalities of the physical layer, including data and signal representation, digital and analog transmission, and bandwidth utilization. |
CLO3 | Identify and evaluate different transmission media, switching mechanisms, and the use of telephone and cable networks for data communication. |
CLO4 | Apply error detection and correction techniques to ensure reliable communication at the data link layer. |
CLO5 | Explore and analyze advanced networking concepts, including switching, media access, and performance optimization for communication systems. |
Course Code: CSE-3203 | Credits: 03 |
Exam Hours: 03 | CIE Marks: 90 |
| SEE Marks: 60 |
Summary of Course Content:
Serial No. | SUMMARY OF COURSE CONTENT | Hours | CLOs |
1 | Overview of Networking: Introduction to networks, network models, and key concepts. | 3 | CLO1 |
2 | Physical Layer: Data representation, signals, digital and analog transmission, and bandwidth utilization techniques. | 6 | CLO1, CLO2 |
3 | Transmission Media: Types of media, properties, and their applications in networking. | 3 | CLO3 |
4 | Switching Mechanisms: Overview of circuit, packet, and message switching. | 3 | CLO3 |
5 | Data Link Layer: Error detection and correction techniques and flow control mechanisms. | 5 | CLO4 |
6 | Network Utilization: Multiplexing, spreading techniques, and performance optimization. | 4 | CLO2, CLO3 |
7 | Telephone and Cable Networks for Data Transmission: Using existing infrastructures for communication. | 4 | CLO3, CLO4 |
8 | Advanced Networking Topics: Ensuring reliability, exploring network performance metrics, and analyzing protocols. | 4 | CLO5 |
Recommended Books:
Assessment Pattern
Bloom's Category Marks (out of 90) | Tests (45) | Assignments (15) | Quizzes (15) | Attendance (15) |
Remember | 5 | 03 |
|
|
Understand | 5 | 04 | 05 |
|
Apply | 15 | 05 | 05 |
|
Analyze | 10 |
|
|
|
Evaluate | 5 | 03 | 05 |
|
Create | 5 |
|
|
|
Bloom's Category | Test |
Remember | 7 |
Understand | 7 |
Apply | 20 |
Analyze | 15 |
Evaluate | 6 |
Create | 5 |
CIE- Continuous Internal Evaluation ( 90 Marks)
SEE- Semester End Examination (60 Marks)
Course Plan
Week No | Topics | Teaching Learning Strategy(s) | Assessment Strategy(s) | Alignment to CLO |
1 | Introduction to Networking, Overview of Network Models | Lecture, PowerPoint presentation, Q&A, in-class discussions | Participation in discussions, quiz | CLO1 |
2 | Data and Signals: Analog and Digital Concepts, Signal Types | Lecture, visual demonstrations, problem-solving exercises | Quiz, short assignment | CLO1 |
3 | Digital Transmission: Encoding and Transmission Techniques | Problem-solving sessions, case studies, and hands-on practical exercises | Problem-solving tasks, quiz | CLO1, CLO2 |
4 | Analog Transmission: Techniques and Applications | Interactive lectures, group discussions, and multimedia resources | Group activity, quiz | CLO1, CLO2 |
5 | Bandwidth Utilization: Multiplexing and Spreading | Practical exercises, simulations, and real-world case studies | Assignment, hands-on assessment | CLO2 |
6 | Transmission Media: Characteristics and Applications | Lecture with multimedia support, group activities | Participation in group activities, assignment | CLO3 |
7 | Switching: Overview of Circuit, Packet, and Message Switching | Interactive lectures, group problem-solving activities | Group task, quiz | CLO3 |
8 | Using Telephone and Cable Networks for Data Transmission | Practical case studies, group discussions, and visual aids | Case study-based assessment, quiz | CLO3, CLO4 |
9 | Error Detection and Correction Techniques | Problem-solving sessions, live demos of algorithms | Problem-solving activity, short test | CLO4 |
Course Plan
Week No | Topics | Teaching Learning Strategy(s) | Assessment Strategy(s) | Alignment to CLO |
10 | Flow Control and Protocols | Lecture, practical exercises, and group discussions | Quiz, performance evaluation on exercises | CLO4 |
11 | Network Performance Optimization: Multiplexing and Spreading Techniques | Lecture, guided hands-on activities, collaborative group problem-solving | Assignment, quiz | CLO2, CLO3 |
12 | Introduction to Reliability and Data Communication Metrics | Interactive lectures, examples from real-world applications | In-class discussion, problem-solving task | CLO4, CLO5 |
13 | Networking Protocols and Standards | Lecture, industry case studies, practical examples | Group activity, quiz | CLO4, CLO5 |
14 | Advanced Switching and Routing Concepts | Lecture, problem-solving exercises | Quiz, problem-solving task | CLO3, CLO5 |
15 | Security in Networking: Introduction to Threats and Countermeasures | Lecture with multimedia resources, hands-on lab activity | Lab report, quiz | CLO5 |
16 | Final Topics Review and Discussion: Integration of Concepts | Revision through Q&A, group activities | Participation, group evaluation | CLO1–CLO5 |
17 | Final Exam and Project Presentation | Assessment of final project and examination | Final exam, project-based evaluation | CLO1–CLO5 |
1.7
Week: 01
Chapter 1
Introduction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1.8
1-1 DATA COMMUNICATIONS
The term telecommunication means communication at a distance. The word data refers to information presented in whatever form is agreed upon by the parties creating and using the data. Data communications are the exchange of data between two devices via some form of transmission medium such as a wire cable.
Topics discussed in this section:
1.9
Figure 1.1 Components of a data communication system
1.10
Figure 1.2 Data flow (simplex, half-duplex, and full-duplex)
1.11
1-2 NETWORKS
A network is a set of devices (often referred to as nodes) connected by communication links. A node can be a computer, printer, or any other device capable of sending and/or receiving data generated by other nodes on the network. A link can be a cable, air, optical fiber, or any medium which can transport a signal carrying information.
Topics discussed in this section:
1.12
Network Criteria
1.13
Physical Structures
1.14
Figure 1.3 Types of connections: point-to-point and multipoint
1.15
Figure 1.4 Categories of topology
1.16
Figure 1.5 A fully connected mesh topology (five devices)
1.17
Figure 1.6 A star topology connecting four stations
1.18
Figure 1.7 A bus topology connecting three stations
1.19
Figure 1.8 A ring topology connecting six stations
1.20
Figure 1.9 A hybrid topology: a star backbone with three bus networks
1.21
Categories of Networks
1.22
Figure 1.10 An isolated LAN connecting 12 computers to a hub in a closet
1.23
Figure 1.11 WANs: a switched WAN and a point-to-point WAN
1.24
Figure 1.12 A heterogeneous network made of four WANs and two LANs
1.25
1-3 THE INTERNET
The Internet has revolutionized many aspects of our daily lives. It has affected the way we do business as well as the way we spend our leisure time. The Internet is a communication system that has brought a wealth of information to our fingertips and organized it for our use.
Organization of the Internet
Internet Service Providers (ISPs)
Topics discussed in this section:
1.26
Figure 1.13 Hierarchical organization of the Internet
1.27
1-4 PROTOCOLS
A protocol is synonymous with rule. It consists of a set of rules that govern data communications. It determines what is communicated, how it is communicated and when it is communicated. The key elements of a protocol are syntax, semantics and timing
Topics discussed in this section:
1.28
Elements of a Protocol
2.29
Week: 02
Chapter 2
Network Models
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2.30
2-1 LAYERED TASKS
We use the concept of layers in our daily life. As an example, let us consider two friends who communicate through postal mail. The process of sending a letter to a friend would be complex if there were no services available from the post office.
Sender, Receiver, and Carrier�Hierarchy
Topics discussed in this section:
2.31
Figure 2.1 Tasks involved in sending a letter
2.32
2-2 THE OSI MODEL
Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s.
Layered Architecture�Peer-to-Peer Processes
Encapsulation
Topics discussed in this section:
2.33
ISO is the organization.�OSI is the model.
Note
2.34
Figure 2.2 Seven layers of the OSI model
2.35
Figure 2.3 The interaction between layers in the OSI model
2.36
Figure 2.4 An exchange using the OSI model
2.37
2-3 LAYERS IN THE OSI MODEL
In this section we briefly describe the functions of each layer in the OSI model.
Physical Layer�Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Topics discussed in this section:
2.38
Figure 2.5 Physical layer
2.39
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
Note
2.40
Figure 2.6 Data link layer
2.41
The data link layer is responsible for moving �frames from one hop (node) to the next.
Note
2.42
Figure 2.7 Hop-to-hop delivery
2.43
Figure 2.8 Network layer
2.44
The network layer is responsible for the �delivery of individual packets from
the source host to the destination host.
Note
2.45
Figure 2.9 Source-to-destination delivery
2.46
Figure 2.10 Transport layer
2.47
The transport layer is responsible for the delivery �of a message from one process to another.
Note
2.48
Figure 2.11 Reliable process-to-process delivery of a message
2.49
Figure 2.12 Session layer
2.50
The session layer is responsible for dialog �control and synchronization.
Note
2.51
Figure 2.13 Presentation layer
2.52
The presentation layer is responsible for translation, compression, and encryption.
Note
2.53
Figure 2.14 Application layer
2.54
The application layer is responsible for �providing services to the user.
Note
2.55
Figure 2.15 Summary of layers
2.56
2-4 TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not exactly match those in the OSI model. The original TCP/IP protocol suite was defined as having four layers: host-to-network, internet, transport, and application. However, when TCP/IP is compared to OSI, we can say that the TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and application.
Physical and Data Link Layers�Network Layer�Transport Layer
Application Layer
Topics discussed in this section:
2.57
Figure 2.16 TCP/IP and OSI model
2.58
2-5 ADDRESSING
Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, and specific.
Physical Addresses�Logical Addresses�Port Addresses�Specific Addresses
Topics discussed in this section:
2.59
Figure 2.17 Addresses in TCP/IP
2.60
Figure 2.18 Relationship of layers and addresses in TCP/IP
2.61
In Figure 2.19 a node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 is the sender, and the computer with physical address 87 is the receiver.
Example 2.1
2.62
Figure 2.19 Physical addresses
2.63
Most local-area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as shown below:
Example 2.2
07:01:02:01:2C:4B�
A 6-byte (12 hexadecimal digits) physical address.
2.64
Figure 2.20 shows a part of an internet with two routers connecting three LANs. Each device (computer or router) has a pair of addresses (logical and physical) for each connection. In this case, each computer is connected to only one link and therefore has only one pair of addresses. Each router, however, is connected to three networks (only two are shown in the figure). So each router has three pairs of addresses, one for each connection.
Example 2.3
2.65
Figure 2.20 IP addresses
2.66
Figure 2.21 shows two computers communicating via the Internet. The sending computer is running three processes at this time with port addresses a, b, and c. The receiving computer is running two processes at this time with port addresses j and k. Process a in the sending computer needs to communicate with process j in the receiving computer. Note that although physical addresses change from hop to hop, logical and port addresses remain the same from the source to destination.
Example 2.4
2.67
Figure 2.21 Port addresses
2.68
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.
Note
2.69
Example 2.5
A port address is a 16-bit address represented by one decimal number as shown.
753�
A 16-bit port address represented �as one single number.
3.70
Week: 03
Chapter 3
Data and Signals
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3.71
To be transmitted, data must be transformed to electromagnetic signals.
Note
3.72
3-1 ANALOG AND DIGITAL
Data can be analog or digital. The term analog data refers to information that is continuous; digital data refers to information that has discrete states. Analog data take on continuous values. Digital data take on discrete values.
Topics discussed in this section:
Analog and Digital Data
3.73
Analog and Digital Signals
3.74
3.75
Figure 3.1 Comparison of analog and digital signals
3.76
3-2 PERIODIC ANALOG SIGNALS
In data communications, we commonly use periodic analog signals and nonperiodic digital signals.
Periodic analog signals can be classified as simple or composite. A simple periodic analog signal, a sine wave, cannot be decomposed into simpler signals. A composite
periodic analog signal is composed of multiple sine waves.
Topics discussed in this section:
3.77
Figure 3.2 A sine wave
3.78
Figure 3.3 Two signals with the same phase and frequency, � but different amplitudes
3.79
Frequency and period are the inverse of each other.
Note
3.80
Figure 3.4 Two signals with the same amplitude and phase,� but different frequencies
3.81
Table 3.1 Units of period and frequency
3.82
The power we use at home has a frequency of 60 Hz. The period of this sine wave can be determined as follows:
Example 3.1
3.83
The period of a signal is 100 ms. What is its frequency in kilohertz?
Example 3.2
Solution
First we change 100 ms to seconds, and then we calculate the frequency from the period (1 Hz = 10−3 kHz).
Frequency
3.84
3.85
If a signal does not change at all, its frequency is zero.
If a signal changes instantaneously, its frequency is infinite.
Note
3.86
Phase describes the position of the waveform relative to time 0.
Note
3.87
Figure 3.5 Three sine waves with the same amplitude and frequency,� but different phases
3.88
A sine wave is offset 1/6 cycle with respect to time 0. What is its phase in degrees and radians?
Example 3.3
Solution
We know that 1 complete cycle is 360°. Therefore, 1/6 cycle is
3.89
Figure 3.6 Wavelength and period
3.90
Figure 3.7 The time-domain and frequency-domain plots of a sine wave
3.91
A complete sine wave in the time domain can be represented by one single spike in the frequency domain.
Note
3.92
The frequency domain is more compact and useful when we are dealing with more than one sine wave. For example, Figure 3.8 shows three sine waves, each with different amplitude and frequency. All can be represented by three spikes in the frequency domain.
Example 3.7
3.93
Figure 3.8 The time domain and frequency domain of three sine waves
Signals and Communication
3.94
Composite Signals and Periodicity
3.95
3.96
Figure 3.9 shows a periodic composite signal with frequency f. This type of signal is not typical of those found in data communications. We can consider it to be three alarm systems, each with a different frequency. The analysis of this signal can give us a good understanding of how to decompose signals.
Example 3.4
3.97
Figure 3.9 A composite periodic signal
3.98
Figure 3.10 Decomposition of a composite periodic signal in the time and� frequency domains
3.99
Figure 3.11 shows a nonperiodic composite signal. It can be the signal created by a microphone or a telephone set when a word or two is pronounced. In this case, the composite signal cannot be periodic, because that implies that we are repeating the same word or words with exactly the same tone.
Example 3.5
3.100
Figure 3.11 The time and frequency domains of a nonperiodic signal
Bandwidth and Signal Frequency
3.101
3.102
Figure 3.12 The bandwidth of periodic and nonperiodic composite signals
3.103
If a periodic signal is decomposed into five sine waves with frequencies of 100, 300, 500, 700, and 900 Hz, what is its bandwidth? Draw the spectrum, assuming all components have a maximum amplitude of 10 V.
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
Example 3.6
The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz (see Figure 3.13).
3.104
Figure 3.13 The bandwidth for Example 3.6
3.105
A periodic signal has a bandwidth of 20 Hz. The highest frequency is 60 Hz. What is the lowest frequency? Draw the spectrum if the signal contains all frequencies of the same amplitude.
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
Example 3.7
The spectrum contains all integer frequencies. We show this by a series of spikes (see Figure 3.14).
3.106
Figure 3.14 The bandwidth for Example 3.7
3.107
A nonperiodic composite signal has a bandwidth of 200 kHz, with a middle frequency of 140 kHz and peak amplitude of 20 V. The two extreme frequencies have an amplitude of 0. Draw the frequency domain of the signal.
Solution
The lowest frequency must be at 40 kHz and the highest at 240 kHz. Figure 3.15 shows the frequency domain and the bandwidth.
Example 3.8
3.108
Figure 3.15 The bandwidth for Example 3.8
3.109
An example of a nonperiodic composite signal is the signal propagated by an AM radio station. In the United States, each AM radio station is assigned a 10-kHz bandwidth. The total bandwidth dedicated to AM radio ranges from 530 to 1700 kHz. We will show the rationale behind this 10-kHz bandwidth in Chapter 5.
Example 3.9
3.110
Another example of a nonperiodic composite signal is the signal propagated by an FM radio station. In the United States, each FM radio station is assigned a 200-kHz bandwidth. The total bandwidth dedicated to FM radio ranges from 88 to 108 MHz. We will show the rationale behind this 200-kHz bandwidth in Chapter 5.
Example 3.10
3.111
Another example of a nonperiodic composite signal is the signal received by an old-fashioned analog black-and-white TV. A TV screen is made up of pixels. If we assume a resolution of 525 × 700, we have 367,500 pixels per screen. If we scan the screen 30 times per second, this is 367,500 × 30 = 11,025,000 pixels per second. The worst-case scenario is alternating black and white pixels. We can send 2 pixels per cycle. Therefore, we need 11,025,000 / 2 = 5,512,500 cycles per second, or Hz. The bandwidth needed is 5.5125 MHz.
Example 3.11
Fourier Analysis
3.112
Fourier analysis is a tool that changes a time domain signal to a frequency domain signal and vice versa.
Note
Fourier Series
3.113
Fourier Series
3.114
Examples of Signals and the Fourier Series Representation
3.115
Sawtooth Signal
3.116
Fourier Transform
3.117
Example of a Fourier Transform
3.118
Inverse Fourier Transform
3.119
Time limited and Band limited Signals
3.120
3.121
Week: 04
Chapter 3
Data and Signals
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3.122
3-3 DIGITAL SIGNALS
In addition to being represented by an analog signal, information can also be represented by a digital signal. For example, a 1 can be encoded as a positive voltage and a 0 as zero voltage. A digital signal can have more than two levels. In this case, we can send more than 1 bit for each level.
Topics discussed in this section:
3.123
Figure 3.16 Two digital signals: one with two signal levels and the other� with four signal levels
3.124
A digital signal has eight levels. How many bits are needed per level? We calculate the number of bits from the formula
Example 3.16
Each signal level is represented by 3 bits.
3.125
A digital signal has nine levels. How many bits are needed per level? We calculate the number of bits by using the formula. Each signal level is represented by 3.17 bits. However, this answer is not realistic. The number of bits sent per level needs to be an integer as well as a power of 2. For this example, 4 bits can represent one level.
Example 3.17
3.126
Assume we need to download text documents at the rate of 100 pages per sec. What is the required bit rate of the channel?
Solution
A page is an average of 24 lines with 80 characters in each line. If we assume that one character requires 8 bits (ascii), the bit rate is
Example 3.18
3.127
A digitized voice channel, as we will see in Chapter 4, is made by digitizing a 4-kHz bandwidth analog voice signal. We need to sample the signal at twice the highest frequency (two samples per hertz). We assume that each sample requires 8 bits. What is the required bit rate?�
Solution
The bit rate can be calculated as
Example 3.19
3.128
What is the bit rate for high-definition TV (HDTV)?�
Solution
HDTV uses digital signals to broadcast high quality video signals. The HDTV screen is normally a ratio of 16 : 9. There are 1920 by 1080 pixels per screen, and the screen is renewed 30 times per second. Twenty-four bits represents one color pixel.
Example 3.20
The TV stations reduce this rate to 20 to 40 Mbps through compression.
3.129
Figure 3.17 The time and frequency domains of periodic and nonperiodic� digital signals
3.130
Figure 3.18 Baseband transmission
3.131
A digital signal is a composite analog signal with an infinite bandwidth.
Note
3.132
Figure 3.19 Bandwidths of two low-pass channels
3.133
Figure 3.20 Baseband transmission using a dedicated medium
3.134
Baseband transmission of a digital signal that preserves the shape of the digital signal is possible only if we have a low-pass channel with an infinite or very wide bandwidth.
Note
3.135
An example of a dedicated channel where the entire bandwidth of the medium is used as one single channel is a LAN. Almost every wired LAN today uses a dedicated channel for two stations communicating with each other. In a bus topology LAN with multipoint connections, only two stations can communicate with each other at each moment in time (timesharing); the other stations need to refrain from sending data. In a star topology LAN, the entire channel between each station and the hub is used for communication between these two entities.
Example 3.21
3.136
Figure 3.21 Rough approximation of a digital signal using the first harmonic � for worst case
3.137
Figure 3.22 Simulating a digital signal with first three harmonics
3.138
In baseband transmission, the required bandwidth is proportional to the bit rate;
if we need to send bits faster, we need more bandwidth.
Note
In baseband transmission, the required bandwidth is proportional to the bit rate;
if we need to send bits faster, we need more bandwidth.
3.139
Table 3.2 Bandwidth requirements
3.140
What is the required bandwidth of a low-pass channel if we need to send 1 Mbps by using baseband transmission?�
Solution
The answer depends on the accuracy desired.
a. The minimum bandwidth, is B = bit rate /2, or 500 kHz.�
b. A better solution is to use the first and the third� harmonics with B = 3 × 500 kHz = 1.5 MHz.�
c. Still a better solution is to use the first, third, and fifth� harmonics with B = 5 × 500 kHz = 2.5 MHz.
Example 3.22
3.141
We have a low-pass channel with bandwidth 100 kHz. What is the maximum bit rate of this
channel?�
Solution
The maximum bit rate can be achieved if we use the first harmonic. The bit rate is 2 times the available bandwidth, or 200 kbps.
Example 3.22
3.142
Figure 3.23 Bandwidth of a bandpass channel
3.143
If the available channel is a bandpass channel, we cannot send the digital signal directly to the channel; �we need to convert the digital signal to an analog signal before transmission.
Note
3.144
Figure 3.24 Modulation of a digital signal for transmission on a bandpass � channel
3.145
An example of broadband transmission using modulation is the sending of computer data through a telephone subscriber line, the line connecting a resident to the central telephone office. These lines are designed to carry voice with a limited bandwidth. The channel is considered a bandpass channel. We convert the digital signal from the computer to an analog signal, and send the analog signal. We can install two converters to change the digital signal to analog and vice versa at the receiving end. The converter, in this case, is called a modem which we discuss in detail in Chapter 5.
Example 3.24
3.146
A second example is the digital cellular telephone. For better reception, digital cellular phones convert the analog voice signal to a digital signal (see Chapter 16). Although the bandwidth allocated to a company providing digital cellular phone service is very wide, we still cannot send the digital signal without conversion. The reason is that we only have a bandpass channel available between caller and callee. We need to convert the digitized voice to a composite analog signal before sending.
Example 3.25
3.147
Week: 05
Chapter 3
Data and Signals
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3.148
3-4 TRANSMISSION IMPAIRMENT
Signals travel through transmission media, which are not perfect. The imperfection causes signal impairment. This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. What is sent is not what is received. Three causes of impairment are attenuation, distortion, and noise.
Topics discussed in this section:
3.149
Figure 3.25 Causes of impairment
3.150
Attenuation
3.151
Measurement of Attenuation
dB = 10log10P2/P1
P1 - input signal
P2 - output signal
3.152
3.153
Figure 3.26 Attenuation
3.154
Suppose a signal travels through a transmission medium and its power is reduced to one-half. This means that P2 is (1/2)P1. In this case, the attenuation (loss of power) can be calculated as
Example 3.26
A loss of 3 dB (–3 dB) is equivalent to losing one-half the power.
3.155
A signal travels through an amplifier, and its power is increased 10 times. This means that P2 = 10P1 . In this case, the amplification (gain of power) can be calculated as
Example 3.27
3.156
One reason that engineers use the decibel to measure the changes in the strength of a signal is that decibel numbers can be added (or subtracted) when we are measuring several points (cascading) instead of just two. In Figure 3.27 a signal travels from point 1 to point 4. In this case, the decibel value can be calculated as
Example 3.28
3.157
Figure 3.27 Decibels for Example 3.28
3.158
Sometimes the decibel is used to measure signal power in milliwatts. In this case, it is referred to as dBm and is calculated as dBm = 10 log10 Pm , where Pm is the power in milliwatts. Calculate the power of a signal with dBm = −30.
Solution
We can calculate the power in the signal as
Example 3.29
3.159
The loss in a cable is usually defined in decibels per kilometer (dB/km). If the signal at the beginning of a cable with −0.3 dB/km has a power of 2 mW, what is the power of the signal at 5 km?
Solution
The loss in the cable in decibels is 5 × (−0.3) = −1.5 dB. We can calculate the power as
Example 3.30
3.160
Distortion
3.161
3.162
Figure 3.28 Distortion
3.163
Noise
3.164
3.165
Figure 3.29 Noise
Signal to Noise Ratio (SNR)
3.166
3.167
The power of a signal is 10 mW and the power of the noise is 1 μW; what are the values of SNR and SNRdB ?
Solution
The values of SNR and SNRdB can be calculated as follows:
Example 3.31
3.168
The values of SNR and SNRdB for a noiseless channel are
Example 3.32
We can never achieve this ratio in real life; it is an ideal.
3.169
Figure 3.30 Two cases of SNR: a high SNR and a low SNR
3.170
3-5 DATA RATE LIMITS
A very important consideration in data communications is how fast we can send data, in bits per second, over a channel. Data rate depends on three factors:
1. The bandwidth available
2. The level of the signals we use
3. The quality of the channel (the level of noise)
Topics discussed in this section:
3.171
Increasing the levels of a signal increases the probability of an error occurring, in other words it reduces the reliability of the system. Why??
Note
Capacity of a System
3.172
Nyquist Theorem
C = 2 B log22n
C= capacity in bps
B = bandwidth in Hz
3.173
3.174
Does the Nyquist theorem bit rate agree with the intuitive bit rate described in baseband transmission?
Solution
They match when we have only two levels. We said, in baseband transmission, the bit rate is 2 times the bandwidth if we use only the first harmonic in the worst case. However, the Nyquist formula is more general than what we derived intuitively; it can be applied to baseband transmission and modulation. Also, it can be applied when we have two or more levels of signals.
Example 3.33
3.175
Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with two signal levels. The maximum bit rate can be calculated as
Example 3.34
3.176
Consider the same noiseless channel transmitting a signal with four signal levels (for each level, we send 2 bits). The maximum bit rate can be calculated as
Example 3.35
3.177
We need to send 265 kbps over a noiseless channel with a bandwidth of 20 kHz. How many signal levels do we need?
Solution
We can use the Nyquist formula as shown:
Example 3.36
Since this result is not a power of 2, we need to either increase the number of levels or reduce the bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is 240 kbps.
Shannon’s Theorem
C = B log2(1 + SNR)
3.178
3.179
Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almost zero. In other words, the noise is so strong that the signal is faint. For this channel the capacity C is calculated as
Example 3.37
This means that the capacity of this channel is zero regardless of the bandwidth. In other words, we cannot receive any data through this channel.
3.180
We can calculate the theoretical highest bit rate of a regular telephone line. A telephone line normally has a bandwidth of 3000. The signal-to-noise ratio is usually 3162. For this channel the capacity is calculated as
Example 3.38
This means that the highest bit rate for a telephone line is 34.860 kbps. If we want to send data faster than this, we can either increase the bandwidth of the line or improve the signal-to-noise ratio.
3.181
The signal-to-noise ratio is often given in decibels. Assume that SNRdB = 36 and the channel bandwidth is 2 MHz. The theoretical channel capacity can be calculated as
Example 3.39
3.182
For practical purposes, when the SNR is very high, we can assume that SNR + 1 is almost the same as SNR. In these cases, the theoretical channel capacity can be simplified to
Example 3.40
For example, we can calculate the theoretical capacity of the previous example as
3.183
We have a channel with a 1-MHz bandwidth. The SNR for this channel is 63. What are the appropriate bit rate and signal level?
Solution
First, we use the Shannon formula to find the upper limit.
Example 3.41
3.184
The Shannon formula gives us 6 Mbps, the upper limit. For better performance we choose something lower, 4 Mbps, for example. Then we use the Nyquist formula to find the number of signal levels.
Example 3.41 (continued)
3.185
The Shannon capacity gives us the upper limit; the Nyquist formula tells us how many signal levels we need.
Note
3.186
3-6 PERFORMANCE
One important issue in networking is the performance of the network—how good is it? We discuss quality of service, an overall measurement of network performance, in greater detail in Chapter 24. In this section, we introduce terms that we need for future chapters.
Topics discussed in this section:
3.187
In networking, we use the term bandwidth in two contexts.
Note
3.188
The bandwidth of a subscriber line is 4 kHz for voice or data. The bandwidth of this line for data transmission
can be up to 56,000 bps using a sophisticated modem to change the digital signal to analog.
Example 3.42
3.189
If the telephone company improves the quality of the line and increases the bandwidth to 8 kHz, we can send 112,000 bps by using the same technology as mentioned in Example 3.42.
Example 3.43
3.190
A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network?
Solution
We can calculate the throughput as
Example 3.44
The throughput is almost one-fifth of the bandwidth in this case.
3.191
Propagation & Transmission delay
3.192
Propagation and Transmission Delay
3.193
3.194
What is the propagation time if the distance between the two points is 12,000 km? Assume the propagation speed to be 2.4 × 108 m/s in cable.
Solution
We can calculate the propagation time as
Example 3.45
The example shows that a bit can go over the Atlantic Ocean in only 50 ms if there is a direct cable between the source and the destination.
3.195
What are the propagation time and the transmission time for a 2.5-kbyte message (an e-mail) if the bandwidth of the network is 1 Gbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s.
Solution
We can calculate the propagation and transmission time as shown on the next slide:
Example 3.46
3.196
Note that in this case, because the message is short and the bandwidth is high, the dominant factor is the propagation time, not the transmission time. The transmission time can be ignored.
Example 3.46 (continued)
3.197
What are the propagation time and the transmission time for a 5-Mbyte message (an image) if the bandwidth of the network is 1 Mbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s.
Solution
We can calculate the propagation and transmission times as shown on the next slide.
Example 3.47
3.198
Note that in this case, because the message is very long and the bandwidth is not very high, the dominant factor is the transmission time, not the propagation time. The propagation time can be ignored.
Example 3.47 (continued)
3.199
Figure 3.31 Filling the link with bits for case 1
3.200
We can think about the link between two points as a pipe. The cross section of the pipe represents the bandwidth, and the length of the pipe represents the delay. We can say the volume of the pipe defines the bandwidth-delay product, as shown in Figure 3.33.
Example 3.48
3.201
Figure 3.32 Filling the link with bits in case 2
3.202
The bandwidth-delay product defines the number of bits that can fill the link.
Note
3.203
Figure 3.33 Concept of bandwidth-delay product
4.204
Week: 06
Chapter 4
Digital Transmission
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4.205
4-1 DIGITAL-TO-DIGITAL CONVERSION
In this section, we see how we can represent digital data by using digital signals. The conversion involves three techniques: line coding, block coding, and scrambling. Line coding is always needed; block coding and scrambling may or may not be needed.
Topics discussed in this section:
Line Coding
4.206
4.207
Figure 4.1 Line coding and decoding
Mapping Data symbols onto Signal levels
4.208
Relationship between data rate and signal rate
4.209
4.210
Figure 4.2 Signal element versus data element
Data rate and Baud rate
S = c x N x 1/r bauds
where N is data rate
c is the case factor (worst, best & avg.)
r is the ratio between data element & signal element
4.211
4.212
A signal is carrying data in which one data element is encoded as one signal element ( r = 1). If the bit rate is 100 kbps, what is the average value of the baud rate if c is between 0 and 1?
Solution
We assume that the average value of c is 1/2 . The baud rate is then
Example 4.1
4.213
Although the actual bandwidth of a digital signal is infinite, the effective bandwidth is finite.
Note
4.214
The maximum data rate of a channel (see Chapter 3) is Nmax = 2 × B × log2 L (defined by the Nyquist formula). Does this agree with the previous formula for Nmax?
Solution
A signal with L levels actually can carry log2L bits per level. If each level corresponds to one signal element and we assume the average case (c = 1/2), then we have
Example 4.2
Considerations for choosing a good signal element referred to as line encoding
4.215
Line encoding C/Cs
4.216
Line encoding C/Cs
4.217
4.218
Figure 4.3 Effect of lack of synchronization
4.219
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, the receiver receives 1001 bps instead of 1000 bps.
Example 4.3
At 1 Mbps, the receiver receives 1,001,000 bps instead of 1,000,000 bps.
Line encoding C/Cs
4.220
Line encoding C/Cs
4.221
Line encoding C/Cs
4.222
4.223
Figure 4.4 Line coding schemes
Unipolar
4.224
4.225
Figure 4.5 Unipolar NRZ scheme
Polar - NRZ
4.226
4.227
Figure 4.6 Polar NRZ-L and NRZ-I schemes
4.228
In NRZ-L the level of the voltage determines the value of the bit. �In NRZ-I the inversion �or the lack of inversion �determines the value of the bit.
Note
4.229
NRZ-L and NRZ-I both have an average signal rate of N/2 Bd.
Note
4.230
NRZ-L and NRZ-I both have a DC component problem and baseline wandering, it is worse for NRZ-L. Both have no self synchronization &no error detection. Both are relatively simple to implement.
Note
4.231
A system is using NRZ-I to transfer 1-Mbps data. What are the average signal rate and minimum bandwidth?
Solution
The average signal rate is S= c x N x R = 1/2 x N x 1 = 500 kbaud. The minimum bandwidth for this average baud rate is Bmin = S = 500 kHz.
Note c = 1/2 for the avg. case as worst case is 1 and best case is 0
Example 4.4
Polar - RZ
4.232
4.233
Figure 4.7 Polar RZ scheme
Polar - Biphase: Manchester and Differential Manchester
4.234
4.235
Figure 4.8 Polar biphase: Manchester and differential Manchester schemes
4.236
In Manchester and differential Manchester encoding, the transition
at the middle of the bit is used for synchronization.
Note
4.237
The minimum bandwidth of Manchester and differential Manchester is 2 times that of NRZ. The is no DC component and no baseline wandering. None of these codes has error detection.
Note
Bipolar - AMI and Pseudoternary
4.238
4.239
Figure 4.9 Bipolar schemes: AMI and pseudoternary
Bipolar C/Cs
4.240
Multilevel Schemes
4.241
Code C/Cs
4.242
4.243
In mBnL schemes, a pattern of m data elements is encoded as a pattern of n signal elements in which 2m ≤ Ln.
Note
Representing Multilevel Codes
4.244
4.245
Figure 4.10 Multilevel: 2B1Q scheme
Redundancy
4.246
4.247
Figure 4.11 Multilevel: 8B6T scheme
Multilevel using multiple channels
4.248
4.249
Figure 4.12 Multilevel: 4D-PAM5 scheme
Multitransition Coding
4.250
4.251
Figure 4.13 Multitransition: MLT-3 scheme
MLT-3
4.252
4.253
Table 4.1 Summary of line coding schemes
Block Coding
4.254
4.255
Block coding is normally referred to as mB/nB coding;
it replaces each m-bit group with an �n-bit group.
Note
4.256
Figure 4.14 Block coding concept
4.257
Figure 4.15 Using block coding 4B/5B with NRZ-I line coding scheme
4.258
Table 4.2 4B/5B mapping codes
4.259
Figure 4.16 Substitution in 4B/5B block coding
Redundancy
4.260
4.261
We need to send data at a 1-Mbps rate. What is the minimum required bandwidth, using a combination of 4B/5B and NRZ-I or Manchester coding?
Solution
First 4B/5B block coding increases the bit rate to 1.25 Mbps. The minimum bandwidth using NRZ-I is N/2 or 625 kHz. The Manchester scheme needs a minimum bandwidth of 1.25 MHz. The first choice needs a lower bandwidth, but has a DC component problem; the second choice needs a higher bandwidth, but does not have a DC component problem.
Example 4.5
4.262
Figure 4.17 8B/10B block encoding
More bits - better error detection
4.263
Scrambling
4.264
4.265
Figure 4.18 AMI used with scrambling
4.266
For example: B8ZS substitutes eight consecutive zeros with 000VB0VB.
The V stands for violation, it violates the line encoding rule
B stands for bipolar, it implements the bipolar line encoding rule
4.267
Figure 4.19 Two cases of B8ZS scrambling technique
4.268
HDB3 substitutes four consecutive zeros with 000V or B00V depending
on the number of nonzero pulses after the last substitution.
If # of non zero pulses is even the substitution is B00V to make total # of non zero pulse even.
If # of non zero pulses is odd the substitution is 000V to make total # of non zero pulses even.
4.269
Figure 4.20 Different situations in HDB3 scrambling technique
4.270
Week: 07
Chapter 4
Digital Transmission
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4.271
4-2 ANALOG-TO-DIGITAL CONVERSION
A digital signal is superior to an analog signal because it is more robust to noise and can easily be recovered, corrected and amplified. For this reason, the tendency today is to change an analog signal to digital data. In this section we describe two techniques, pulse code modulation and delta modulation.
Topics discussed in this section:
PCM
4.272
4.273
Figure 4.21 Components of PCM encoder
Sampling
4.274
4.275
Figure 4.22 Three different sampling methods for PCM
4.276
According to the Nyquist theorem, the sampling rate must be
at least 2 times the highest frequency contained in the signal.
Note
4.277
Figure 4.23 Nyquist sampling rate for low-pass and bandpass signals
4.278
For an intuitive example of the Nyquist theorem, let us sample a simple sine wave at three sampling rates: fs = 4f (2 times the Nyquist rate), fs = 2f (Nyquist rate), and �fs = f (one-half the Nyquist rate). Figure 4.24 shows the sampling and the subsequent recovery of the signal.
It can be seen that sampling at the Nyquist rate can create a good approximation of the original sine wave (part a). Oversampling in part b can also create the same approximation, but it is redundant and unnecessary. Sampling below the Nyquist rate (part c) does not produce a signal that looks like the original sine wave.
Example 4.6
4.279
Figure 4.24 Recovery of a sampled sine wave for different sampling rates
4.280
Consider the revolution of a hand of a clock. The second hand of a clock has a period of 60 s. According to the Nyquist theorem, we need to sample the hand every 30 s (Ts = T or fs = 2f ). In Figure 4.25a, the sample points, in order, are 12, 6, 12, 6, 12, and 6. The receiver of the samples cannot tell if the clock is moving forward or backward. In part b, we sample at double the Nyquist rate (every 15 s). The sample points are 12, 3, 6, 9, and 12. The clock is moving forward. In part c, we sample below the Nyquist rate (Ts = T or fs = f ). The sample points are 12, 9, 6, 3, and 12. Although the clock is moving forward, the receiver thinks that the clock is moving backward.
Example 4.7
4.281
Figure 4.25 Sampling of a clock with only one hand
4.282
An example related to Example 4.7 is the seemingly backward rotation of the wheels of a forward-moving car in a movie. This can be explained by under-sampling. A movie is filmed at 24 frames per second. If a wheel is rotating more than 12 times per second, the under-sampling creates the impression of a backward rotation.
Example 4.8
4.283
Telephone companies digitize voice by assuming a maximum frequency of 4000 Hz. The sampling rate therefore is 8000 samples per second.
Example 4.9
4.284
A complex low-pass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal?
Solution
The bandwidth of a low-pass signal is between 0 and f, where f is the maximum frequency in the signal. Therefore, we can sample this signal at 2 times the highest frequency (200 kHz). The sampling rate is therefore 400,000 samples per second.
Example 4.10
4.285
A complex bandpass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal?
Solution
We cannot find the minimum sampling rate in this case because we do not know where the bandwidth starts or ends. We do not know the maximum frequency in the signal.
Example 4.11
Quantization
Δ = (max - min)/L
4.286
Quantization Levels
4.287
Quantization Zones
4.288
Assigning Codes to Zones
nb = log2 L
4.289
4.290
Figure 4.26 Quantization and encoding of a sampled signal
Quantization Error
4.291
Quantization Error and SNQR
4.292
Bit rate and bandwidth requirements of PCM
Bit rate = nb x fs
4.293
4.294
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. So the sampling rate and bit rate are calculated as follows:
Example 4.14
PCM Decoder
4.295
4.296
Figure 4.27 Components of a PCM decoder
4.297
We have a low-pass analog signal of 4 kHz. If we send the analog signal, we need a channel with a minimum bandwidth of 4 kHz. If we digitize the signal and send 8 bits per sample, we need a channel with a minimum bandwidth of 8 × 4 kHz = 32 kHz.
Example 4.15
Delta Modulation
4.298
4.299
Figure 4.28 The process of delta modulation
4.300
Figure 4.29 Delta modulation components
4.301
Figure 4.30 Delta demodulation components
Delta PCM (DPCM)
4.302
4.303
4-3 TRANSMISSION MODES
The transmission of binary data across a link can be accomplished in either parallel or serial mode. In parallel mode, multiple bits are sent with each clock tick. In serial mode, 1 bit is sent with each clock tick. While there is only one way to send parallel data, there are three subclasses of serial transmission: asynchronous, synchronous, and isochronous.
Topics discussed in this section:
4.304
Figure 4.31 Data transmission and modes
4.305
Figure 4.32 Parallel transmission
4.306
Figure 4.33 Serial transmission
4.307
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.
Note
4.308
Asynchronous here means “asynchronous at the byte level,”
but the bits are still synchronized; �their durations are the same.
Note
4.309
Figure 4.34 Asynchronous transmission
4.310
In synchronous transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits. The bits are usually sent as bytes and many bytes are grouped in a frame. A frame is identified with a start and an end byte.
Note
4.311
Figure 4.35 Synchronous transmission
Isochronous
4.312
5.313
Chapter 5
Analog Transmission
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
5.314
5-1 DIGITAL-TO-ANALOG CONVERSION
Digital-to-analog conversion is the process of changing one of the characteristics of an analog signal based on the information in digital data.
Topics discussed in this section:
Digital to Analog Conversion
5.315
5.316
Figure 5.1 Digital-to-analog conversion
5.317
Figure 5.2 Types of digital-to-analog conversion
5.318
Bit rate, N, is the number of bits per second (bps). Baud rate is the number of signal
elements per second (bauds).
In the analog transmission of digital data, the signal or baud rate is less than �or equal to the bit rate.
S=Nx1/r bauds
Where r is the number of data bits per signal element.
Note
5.319
An analog signal carries 4 bits per signal element. If 1000 signal elements are sent per second, find the bit rate.
Solution
In this case, r = 4, S = 1000, and N is unknown. We can find the value of N from
Example 5.1
5.320
Example 5.2
An analog signal has a bit rate of 8000 bps and a baud rate of 1000 baud. How many data elements are carried by each signal element? How many signal elements do we need?
Solution
In this example, S = 1000, N = 8000, and r and L are unknown. We find first the value of r and then the value of L.
Amplitude Shift Keying (ASK)
5.321
Bandwidth of ASK
B = (1+d)S
5.322
5.323
Figure 5.3 Binary amplitude shift keying
5.324
Figure 5.4 Implementation of binary ASK
5.325
Example 5.3
We have an available bandwidth of 100 kHz which spans from 200 to 300 kHz. What are the carrier frequency and the bit rate if we modulated our data by using ASK with d = 1?
Solution
The middle of the bandwidth is located at 250 kHz. This means that our carrier frequency can be at fc = 250 kHz. We can use the formula for bandwidth to find the bit rate (with d = 1 and r = 1).
5.326
Example 5.4
In data communications, we normally use full-duplex links with communication in both directions. We need to divide the bandwidth into two with two carrier frequencies, as shown in Figure 5.5. The figure shows the positions of two carrier frequencies and the bandwidths. The available bandwidth for each direction is now 50 kHz, which leaves us with a data rate of 25 kbps in each direction.
5.327
Figure 5.5 Bandwidth of full-duplex ASK used in Example 5.4
Frequency Shift Keying
5.328
5.329
Figure 5.6 Binary frequency shift keying
Bandwidth of FSK
B = (1+d)xS +2Δf
5.330
5.331
Example 5.5
We have an available bandwidth of 100 kHz which spans from 200 to 300 kHz. What should be the carrier frequency and the bit rate if we modulated our data by using FSK with d = 1?
Solution
This problem is similar to Example 5.3, but we are modulating by using FSK. The midpoint of the band is at 250 kHz. We choose 2Δf to be 50 kHz; this means
Coherent and Non Coherent
5.332
Multi level FSK
B = (1+d)xS + (L-1)/2Δf = LxS
5.333
5.334
Figure 5.7 Bandwidth of MFSK used in Example 5.6
5.335
Example 5.6
We need to send data 3 bits at a time at a bit rate of 3 Mbps. The carrier frequency is 10 MHz. Calculate the number of levels (different frequencies), the baud rate, and the bandwidth.
Solution
We can have L = 23 = 8. The baud rate is S = 3 Mbps/3 = 1 Mbaud. This means that the carrier frequencies must be 1 MHz apart (2Δf = 1 MHz). The bandwidth is B = 8 × 1M = 8M. Figure 5.8 shows the allocation of frequencies and bandwidth.
5.336
Figure 5.8 Bandwidth of MFSK used in Example 5.6
Phase Shift Keyeing
B = (1+d)xS
5.337
5.338
Figure 5.9 Binary phase shift keying
5.339
Figure 5.10 Implementation of BASK
Quadrature PSK
5.340
5.341
Figure 5.11 QPSK and its implementation
5.342
Example 5.7
Find the bandwidth for a signal transmitting at 12 Mbps for QPSK. The value of d = 0.
Solution
For QPSK, 2 bits is carried by one signal element. This means that r = 2. So the signal rate (baud rate) is S = N × (1/r) = 6 Mbaud. With a value of d = 0, we have B = S = 6 MHz.
Constellation Diagrams
5.343
5.344
Figure 5.12 Concept of a constellation diagram
5.345
Example 5.8
Show the constellation diagrams for an ASK (OOK), BPSK, and QPSK signals.
Solution
Figure 5.13 shows the three constellation diagrams.
5.346
Figure 5.13 Three constellation diagrams
5.347
Quadrature amplitude modulation is a combination of ASK and PSK.
Note
5.348
Figure 5.14 Constellation diagrams for some QAMs
5.349
Week: 08
Chapter 5
Analog Transmission
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
5.350
5-2 ANALOG AND DIGITAL
Analog-to-analog conversion is the representation of analog information by an analog signal. One may ask why we need to modulate an analog signal; it is already analog. Modulation is needed if the medium is bandpass in nature or if only a bandpass channel is available to us.
Topics discussed in this section:
5.351
Figure 5.15 Types of analog-to-analog modulation
Amplitude Modulation
5.352
5.353
Figure 5.16 Amplitude modulation
5.354
�The total bandwidth required for AM �can be determined
from the bandwidth of the audio �signal: BAM = 2B.
Note
5.355
Figure 5.17 AM band allocation
Frequency Modulation
5.356
5.357
The total bandwidth required for FM can be determined from the bandwidth �of the audio signal: BFM = 2(1 + β)B. Where β is usually 4.
Note
5.358
Figure 5.18 Frequency modulation
5.359
Figure 5.19 FM band allocation
Phase Modulation (PM)
5.360
5.361
Figure 5.20 Phase modulation
5.362
The total bandwidth required for PM can be determined from the bandwidth �and maximum amplitude of the modulating signal:�BPM = 2(1 + β)B.
Where β = 2 most often.
Note
6.363
Week: 09
Chapter 6
Bandwidth Utilization:
Multiplexing and Spreading
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
6.364
Bandwidth utilization is the wise use of �available bandwidth to achieve �specific goals.�
Efficiency can be achieved by multiplexing; i.e., sharing of the bandwidth between multiple users.
Note
6.365
6-1 MULTIPLEXING
Whenever the bandwidth of a medium linking two devices is greater than the bandwidth needs of the devices, the link can be shared. Multiplexing is the set of techniques that allows the (simultaneous) transmission of multiple signals across a single data link. As data and telecommunications use increases, so does traffic.
Topics discussed in this section:
6.366
Figure 6.1 Dividing a link into channels
6.367
Figure 6.2 Categories of multiplexing
6.368
Figure 6.3 Frequency-division multiplexing (FDM)
6.369
FDM is an analog multiplexing technique that combines analog signals.
It uses the concept of modulation discussed in Ch 5.
Note
6.370
Figure 6.4 FDM process
FM
6.371
6.372
Figure 6.5 FDM demultiplexing example
6.373
Assume that a voice channel occupies a bandwidth of 4 kHz. We need to combine three voice channels into a link with a bandwidth of 12 kHz, from 20 to 32 kHz. Show the configuration, using the frequency domain. Assume there are no guard bands.
Solution
We shift (modulate) each of the three voice channels to a different bandwidth, as shown in Figure 6.6. We use the 20- to 24-kHz bandwidth for the first channel, the 24- to 28-kHz bandwidth for the second channel, and the 28- to 32-kHz bandwidth for the third one. Then we combine them as shown in Figure 6.6.
Example 6.1
6.374
Figure 6.6 Example 6.1
6.375
Five channels, each with a 100-kHz bandwidth, are to be multiplexed together. What is the minimum bandwidth of the link if there is a need for a guard band of 10 kHz between the channels to prevent interference?
Solution
For five channels, we need at least four guard bands. This means that the required bandwidth is at least
5 × 100 + 4 × 10 = 540 kHz,
as shown in Figure 6.7.
Example 6.2
6.376
Figure 6.7 Example 6.2
6.377
Four data channels (digital), each transmitting at 1 Mbps, use a satellite channel of 1 MHz. Design an appropriate configuration, using FDM.
Solution
The satellite channel is analog. We divide it into four channels, each channel having 1M/4=250-kHz bandwidth.
Each digital channel of 1 Mbps must be transmitted over a 250KHz channel. Assuming no noise we can use Nyquist to get:
C = 1Mbps = 2x250K x log2 L -> L = 4 or n = 2 bits/signal element.
One solution is 4-QAM modulation. In Figure 6.8 we show a possible configuration with L = 16.
Example 6.3
6.378
Figure 6.8 Example 6.3
6.379
Figure 6.9 Analog hierarchy
6.380
The Advanced Mobile Phone System (AMPS) uses two bands. The first band of 824 to 849 MHz is used for sending, and 869 to 894 MHz is used for receiving. Each user has a bandwidth of 30 kHz in each direction. How many people can use their cellular phones simultaneously?
Solution
Each band is 25 MHz. If we divide 25 MHz by 30 kHz, we get 833.33. In reality, the band is divided into 832 channels. Of these, 42 channels are used for control, which means only 790 channels are available for cellular phone users.
Example 6.4
6.381
Figure 6.10 Wavelength-division multiplexing (WDM)
6.382
WDM is an analog multiplexing technique to combine optical signals.
Note
6.383
Figure 6.11 Prisms in wavelength-division multiplexing and demultiplexing
6.384
Figure 6.12 Time Division Multiplexing (TDM)
6.385
�TDM is a digital multiplexing technique for combining several low-rate digital �channels into one high-rate one.
Note
6.386
Figure 6.13 Synchronous time-division multiplexing
6.387
In synchronous TDM, the data rate �of the link is n times faster, and the unit duration is n times shorter.
Note
6.388
In Figure 6.13, the data rate for each one of the 3 input connection is 1 kbps. If 1 bit at a time is multiplexed (a unit is 1 bit), what is the duration of (a) each input slot, (b) each output slot, and (c) each frame?
Solution
We can answer the questions as follows:
a. The data rate of each input connection is 1 kbps. This means that the bit duration is 1/1000 s or 1 ms. The duration of the input time slot is 1 ms (same as bit duration).
Example 6.5
6.389
b. The duration of each output time slot is one-third of the input time slot. This means that the duration of the output time slot is 1/3 ms.
c. Each frame carries three output time slots. So the duration of a frame is 3 × 1/3 ms, or 1 ms.
Note: The duration of a frame is the same as the duration of an input unit.
Example 6.5 (continued)
6.390
Figure 6.14 shows synchronous TDM with 4 1Mbps data stream inputs and one data stream for the output. The unit of data is 1 bit. Find (a) the input bit duration, (b) the output bit duration, (c) the output bit rate, and (d) the output frame rate.
Solution
We can answer the questions as follows:
a. The input bit duration is the inverse of the bit rate: �1/1 Mbps = 1 μs.
b. The output bit duration is one-fourth of the input bit duration, or ¼ μs.
Example 6.6
6.391
c. The output bit rate is the inverse of the output bit duration or 1/(4μs) or 4 Mbps. This can also be deduced from the fact that the output rate is 4 times as fast as any input rate; so the output rate = 4 × 1 Mbps = 4 Mbps. �
d. The frame rate is always the same as any input rate. So the frame rate is 1,000,000 frames per second. Because we are sending 4 bits in each frame, we can verify the result of the previous question by multiplying the frame rate by the number of bits per frame.
Example 6.6 (continued)
6.392
Figure 6.14 Example 6.6
6.393
Four 1-kbps connections are multiplexed together. A unit is 1 bit. Find (a) the duration of 1 bit before multiplexing, (b) the transmission rate of the link, (c) the duration of a time slot, and (d) the duration of a frame.
Solution
We can answer the questions as follows:
a. The duration of 1 bit before multiplexing is 1 / 1 kbps, or 0.001 s (1 ms).
b. The rate of the link is 4 times the rate of a connection, or 4 kbps.
Example 6.7
6.394
c. The duration of each time slot is one-fourth of the duration of each bit before multiplexing, or 1/4 ms or 250 μs. Note that we can also calculate this from the data rate of the link, 4 kbps. The bit duration is the inverse of the data rate, or 1/4 kbps or 250 μs.
d. The duration of a frame is always the same as the duration of a unit before multiplexing, or 1 ms. We can also calculate this in another way. Each frame in this case has four time slots. So the duration of a frame is 4 times 250 μs, or 1 ms.
Example 6.7 (continued)
Interleaving
6.395
6.396
Figure 6.15 Interleaving
6.397
Four channels are multiplexed using TDM. If each channel sends 100 bytes /s and we multiplex 1 byte per channel, show the frame traveling on the link, the size of the frame, the duration of a frame, the frame rate, and the bit rate for the link.
Solution
The multiplexer is shown in Figure 6.16. Each frame carries 1 byte from each channel; the size of each frame, therefore, is 4 bytes, or 32 bits. Because each channel is sending 100 bytes/s and a frame carries 1 byte from each channel, the frame rate must be 100 frames per second. The bit rate is 100 × 32, or 3200 bps.
Example 6.8
6.398
Figure 6.16 Example 6.8
6.399
A multiplexer combines four 100-kbps channels using a time slot of 2 bits. Show the output with four arbitrary inputs. What is the frame rate? What is the frame duration? What is the bit rate? What is the bit duration?
Solution
Figure 6.17 shows the output (4x100kbps) for four arbitrary inputs. The link carries 400K/(2x4)=50,000 2x4=8bit frames per second. The frame duration is therefore 1/50,000 s or 20 μs. The bit duration on the output link is 1/400,000 s, or 2.5 μs.
Example 6.9
6.400
Figure 6.17 Example 6.9
Data Rate Management
6.401
Data rate matching
6.402
6.403
Figure 6.19 Multilevel multiplexing
6.404
Figure 6.20 Multiple-slot multiplexing
6.405
Figure 6.21 Pulse stuffing
Synchronization
6.406
6.407
Figure 6.22 Framing bits
6.408
We have four sources, each creating 250 8-bit characters per second. If the interleaved unit is a character and 1 synchronizing bit is added to each frame, find (a) the data rate of each source, (b) the duration of each character in each source, (c) the frame rate, (d) the duration of each frame, (e) the number of bits in each frame, and (f) the data rate of the link.
Solution
We can answer the questions as follows:
a. The data rate of each source is 250 × 8 = 2000 bps = 2 kbps.
Example 6.10
6.409
b. Each source sends 250 characters per second; therefore, the duration of a character is 1/250 s, or �4 ms.
c. Each frame has one character from each source, which means the link needs to send 250 frames per second to keep the transmission rate of each source.
d. The duration of each frame is 1/250 s, or 4 ms. Note that the duration of each frame is the same as the duration of each character coming from each source.
e. Each frame carries 4 characters and 1 extra synchronizing bit. This means that each frame is �4 × 8 + 1 = 33 bits.
Example 6.10 (continued)
6.410
Two channels, one with a bit rate of 100 kbps and another with a bit rate of 200 kbps, are to be multiplexed. How this can be achieved? What is the frame rate? What is the frame duration? What is the bit rate of the link?
Solution
We can allocate one slot to the first channel and two slots to the second channel. Each frame carries 3 bits. The frame rate is 100,000 frames per second because it carries 1 bit from the first channel. The bit rate is 100,000 frames/s × 3 bits per frame, or 300 kbps.
Example 6.11
6.411
Figure 6.23 Digital hierarchy
6.412
Table 6.1 DS and T line rates
6.413
Figure 6.24 T-1 line for multiplexing telephone lines
6.414
Figure 6.25 T-1 frame structure
6.415
Table 6.2 E line rates
Inefficient use of Bandwidth
6.416
6.417
Figure 6.18 Empty slots
6.418
Figure 6.26 TDM slot comparison
6.419
Week: 10
Chapter 6
Bandwidth Utilization:
Multiplexing and Spreading
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
6.420
6-1 SPREAD SPECTRUM
In spread spectrum (SS), we combine signals from different sources to fit into a larger bandwidth, but our goals are to prevent eavesdropping and jamming. To achieve these goals, spread spectrum techniques add redundancy.
Topics discussed in this section:
Spread Spectrum
6.421
6.422
Figure 6.27 Spread spectrum
6.423
Figure 6.28 Frequency hopping spread spectrum (FHSS)
6.424
Figure 6.29 Frequency selection in FHSS
6.425
Figure 6.30 FHSS cycles
6.426
Figure 6.31 Bandwidth sharing
6.427
Figure 6.32 DSSS
6.428
Figure 6.33 DSSS example
7.429
Week: 11
Chapter 7
Transmission Media
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
7.430
Figure 7.1 Transmission medium and physical layer
7.431
Figure 7.2 Classes of transmission media
7.432
7-1 GUIDED MEDIA
Guided media, which are those that provide a conduit from one device to another, include twisted-pair cable, coaxial cable, and fiber-optic cable.
Twisted-Pair Cable�Coaxial Cable�Fiber-Optic Cable
Topics discussed in this section:
7.433
Figure 7.3 Twisted-pair cable
7.434
Figure 7.4 UTP and STP cables
7.435
Table 7.1 Categories of unshielded twisted-pair cables
7.436
Figure 7.5 UTP connector
7.437
Figure 7.6 UTP performance
7.438
Figure 7.7 Coaxial cable
7.439
Table 7.2 Categories of coaxial cables
7.440
Figure 7.8 BNC connectors
7.441
Figure 7.9 Coaxial cable performance
7.442
Figure 7.10 Fiber optics: Bending of light ray
7.443
Figure 7.11 Optical fiber
7.444
Figure 7.12 Propagation modes
7.445
Figure 7.13 Modes
7.446
Table 7.3 Fiber types
7.447
Figure 7.14 Fiber construction
7.448
Figure 7.15 Fiber-optic cable connectors
7.449
Figure 7.16 Optical fiber performance
7.450
7-2 UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often referred to as wireless communication.
Radio Waves
Microwaves
Infrared
Topics discussed in this section:
7.451
Figure 7.17 Electromagnetic spectrum for wireless communication
7.452
Figure 7.18 Propagation methods
7.453
Table 7.4 Bands
7.454
Figure 7.19 Wireless transmission waves
7.455
Radio waves are used for multicast communications, such as radio and television, and paging systems. They can penetrate through walls.
Highly regulated. Use omni directional antennas
Note
7.456
Figure 7.20 Omnidirectional antenna
7.457
Microwaves are used for unicast communication such as cellular telephones, satellite networks,�and wireless LANs.
Higher frequency ranges cannot penetrate walls.
Use directional antennas - point to point line of sight communications.
Note
7.458
Figure 7.21 Unidirectional antennas
7.459
�Infrared signals can be used for short-range communication in a closed area using line-of-sight propagation.
Note
Wireless Channels
7.460
10.461
Week: 12
Chapter 10
Error Detection �and �Correction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.462
Data can be corrupted �during transmission.�
Some applications require that �errors be detected and corrected.
Note
10.463
10-1 INTRODUCTION
Let us first discuss some issues related, directly or indirectly, to error detection and correction.
Types of Errors�Redundancy�Detection Versus Correction�Forward Error Correction Versus Retransmission�Coding
Modular Arithmetic
Topics discussed in this section:
10.464
In a single-bit error, only 1 bit in the data unit has changed.
Note
10.465
Figure 10.1 Single-bit error
10.466
A burst error means that 2 or more bits in the data unit have changed.
Note
10.467
Figure 10.2 Burst error of length 8
10.468
To detect or correct errors, we need to send extra (redundant) bits with data.
Note
10.469
Figure 10.3 The structure of encoder and decoder
10.470
In this book, we concentrate on block codes; we leave convolution codes �to advanced texts.
Note
10.471
In modulo-N arithmetic, we use only the integers in the range 0 to N −1, inclusive.
Note
10.472
Figure 10.4 XORing of two single bits or two words
10.473
10-2 BLOCK CODING
In block coding, we divide our message into blocks, each of k bits, called datawords. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords.
Error Detection�Error Correction�Hamming Distance
Minimum Hamming Distance
Topics discussed in this section:
10.474
Figure 10.5 Datawords and codewords in block coding
10.475
The 4B/5B block coding discussed in Chapter 4 is a good example of this type of coding. In this coding scheme, �k = 4 and n = 5. As we saw, we have 2k = 16 datawords and 2n = 32 codewords. We saw that 16 out of 32 codewords are used for message transfer and the rest are either used for other purposes or unused.
Example 10.1
Error Detection
10.476
10.477
Figure 10.6 Process of error detection in block coding
10.478
Let us assume that k = 2 and n = 3. Table 10.1 shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword.
Assume the sender encodes the dataword 01 as 011 and
sends it to the receiver. Consider the following cases:
1. The receiver receives 011. It is a valid codeword. The �receiver extracts the dataword 01 from it.
Example 10.2
10.479
2. The codeword is corrupted during transmission, and� 111 is received. This is not a valid codeword and is� discarded.
3. The codeword is corrupted during transmission, and� 000 is received. This is a valid codeword. The receiver� incorrectly extracts the dataword 00. Two corrupted� bits have made the error undetectable.
Example 10.2 (continued)
10.480
Table 10.1 A code for error detection (Example 10.2)
10.481
An error-detecting code can detect �only the types of errors for which it is designed; other types of errors may remain undetected.
Note
10.482
Figure 10.7 Structure of encoder and decoder in error correction
10.483
Let us add more redundant bits to Example 10.2 to see if the receiver can correct an error without knowing what was actually sent. We add 3 redundant bits to the 2-bit dataword to make 5-bit codewords. Table 10.2 shows the datawords and codewords. Assume the dataword is 01. The sender creates the codeword 01011. The codeword is corrupted during transmission, and 01001 is received. First, the receiver finds that the received codeword is not in the table. This means an error has occurred. The receiver, assuming that there is only 1 bit corrupted, uses the following strategy to guess the correct dataword.
Example 10.3
10.484
1. Comparing the received codeword with the first codeword in the table (01001 versus 00000), the receiver decides that the first codeword is not the one that was sent because there are two different bits.
2. By the same reasoning, the original codeword cannot be the third or fourth one in the table.
3. The original codeword must be the second one in the table because this is the only one that differs from the received codeword by 1 bit. The receiver replaces 01001 with 01011 and consults the table to find the dataword 01.
Example 10.3 (continued)
10.485
Table 10.2 A code for error correction (Example 10.3)
10.
Week: 13
Chapter 10
Error Detection �and �Correction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.
The Hamming distance between two words is the number of differences between corresponding bits.
Note
10.
Let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because �
Example 10.4
2. The Hamming distance d(10101, 11110) is 3 because
10.
The minimum Hamming distance is the smallest Hamming distance between� all possible pairs in a set of words.
Note
10.
Find the minimum Hamming distance of the coding scheme in Table 10.1.
Solution
We first find all Hamming distances.
Example 10.5
The dmin in this case is 2.
10.
Find the minimum Hamming distance of the coding scheme in Table 10.2.
Solution
We first find all the Hamming distances.
The dmin in this case is 3.
Example 10.6
10.
To guarantee the detection of up to s errors in all cases, the minimum
Hamming distance in a block �code must be dmin = s + 1.
Note
10.
The minimum Hamming distance for our first code scheme (Table 10.1) is 2. This code guarantees detection of only a single error. For example, if the third codeword (101) is sent and one error occurs, the received codeword does not match any valid codeword. If two errors occur, however, the received codeword may match a valid codeword and the errors are not detected.
Example 10.7
10.
Our second block code scheme (Table 10.2) has dmin = 3. This code can detect up to two errors. Again, we see that when any of the valid codewords is sent, two errors create a codeword which is not in the table of valid codewords. The receiver cannot be fooled.
However, some combinations of three errors change a valid codeword to another valid codeword. The receiver accepts the received codeword and the errors are undetected.
Example 10.8
10.
Figure 10.8 Geometric concept for finding dmin in error detection
10.
Figure 10.9 Geometric concept for finding dmin in error correction
10.
To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block code �must be dmin = 2t + 1.
Note
10.
A code scheme has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme?
Solution
This code guarantees the detection of up to three errors�(s = 3), but it can correct up to one error. In other words, �if this code is used for error correction, part of its capability is wasted. Error correction codes need to have an odd minimum distance (3, 5, 7, . . . ).
Example 10.9
10.
10-3 LINEAR BLOCK CODES
Almost all block codes used today belong to a subset called linear block codes. A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid codewords creates another valid codeword.
Minimum Distance for Linear Block Codes�Some Linear Block Codes
Topics discussed in this section:
10.
In a linear block code, the exclusive OR (XOR) of any two valid codewords creates another valid codeword.
Note
10.
Let us see if the two codes we defined in Table 10.1 and Table 10.2 belong to the class of linear block codes.
1. The scheme in Table 10.1 is a linear block code� because the result of XORing any codeword with any� other codeword is a valid codeword. For example, the� XORing of the second and third codewords creates the� fourth one.
2. The scheme in Table 10.2 is also a linear block code.� We can create all four codewords by XORing two� other codewords.
Example 10.10
10.
In our first code (Table 10.1), the numbers of 1s in the nonzero codewords are 2, 2, and 2. So the minimum Hamming distance is dmin = 2. In our second code (Table 10.2), the numbers of 1s in the nonzero codewords are 3, 3, and 4. So in this code we have dmin = 3.
Example 10.11
10.
A simple parity-check code is a �single-bit error-detecting �code in which �n = k + 1 with dmin = 2.
Even parity (ensures that a codeword has an even number of 1’s) and odd parity (ensures that there are an odd number of 1’s in the codeword)
Note
10.
Table 10.3 Simple parity-check code C(5, 4)
10.
Figure 10.10 Encoder and decoder for simple parity-check code
10.
Let us look at some transmission scenarios. Assume the sender sends the dataword 1011. The codeword created from this dataword is 10111, which is sent to the receiver. We examine five cases:
1. No error occurs; the received codeword is 10111. The� syndrome is 0. The dataword 1011 is created.
2. One single-bit error changes a1 . The received� codeword is 10011. The syndrome is 1. No dataword� is created.
3. One single-bit error changes r0 . The received codeword� is 10110. The syndrome is 1. No dataword is created.
Example 10.12
10.
4. An error changes r0 and a second error changes a3 .
The received codeword is 00110. The syndrome is 0.� The dataword 0011 is created at the receiver. Note that
here the dataword is wrongly created due to the
syndrome value.
5. Three bits—a3, a2, and a1—are changed by errors.� The received codeword is 01011. The syndrome is 1.� The dataword is not created. This shows that the simple� parity check, guaranteed to detect one single error, can� also find any odd number of errors.
Example 10.12 (continued)
10.
A simple parity-check code can detect an odd number of errors.
Note
10.
All Hamming codes discussed in this book have dmin = 3 (2 bit error detection and single bit error correction).
A codeword consists of n bits of which k are data bits and r are check bits.
Let m = r, then we have: n = 2m -1
and k = n-m�
Note
10.
Figure 10.11 Two-dimensional parity-check code
10.
Figure 10.11 Two-dimensional parity-check code
10.
Figure 10.11 Two-dimensional parity-check code
10.
Table 10.4 Hamming code C(7, 4) - n=7, k = 4
10.
Modulo 2 arithmetic:
r0 = a2 + a1 + a0
r1 = a3 + a2 + a1
r2 = a1 + a0 + a3
Calculating the parity bits at the transmitter
:
Calculating the syndrome at the receiver:
s0 = b2 + b1 + b0
s1 = b3 + b2 + b1
s2 = b1 + b0 + b3
10.
Figure 10.12 The structure of the encoder and decoder for a Hamming code
10.
Table 10.5 Logical decision made by the correction logic analyzer
10.
Let us trace the path of three datawords from the sender to the destination:
1. The dataword 0100 becomes the codeword 0100011.� The codeword 0100011 is received. The syndrome is� 000, the final dataword is 0100.
2. The dataword 0111 becomes the codeword 0111001.� The received codeword is: 0011001. The syndrome is 011. After flipping b2 (changing the 1 to 0), the final dataword is 0111.
3. The dataword 1101 becomes the codeword 1101000.� The syndrome is 101. After flipping b0, we get 0000,� the wrong dataword. This shows that our code cannot� correct two errors.
Example 10.13
10.
We need a dataword of at least 7 bits. Calculate values of k and n that satisfy this requirement.
Solution
We need to make k = n − m greater than or equal to 7, or 2m − 1 − m ≥ 7.
1. If we set m = 3, the result is n = 23 − 1=7 and k = 7 − 3,� or 4, which is < 7.
2. If we set m = 4, then n = 24 − 1 = 15 and k = 15 − 4 =� 11, which satisfies the condition k>7. So the code is
Example 10.14
C(15, 11)
Burst Errors
10.
Figure 10.13 Burst error correction using Hamming code
10.
10-4 CYCLIC CODES
Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codeword.
Cyclic Redundancy Check�Hardware Implementation�Polynomials�Cyclic Code Analysis
Advantages of Cyclic Codes�Other Cyclic Codes
Topics discussed in this section:
10.
Table 10.6 A CRC code with C(7, 4)
10.
Figure 10.14 CRC encoder and decoder
10.
Figure 10.15 Division in CRC encoder
10.
Figure 10.16 Division in the CRC decoder for two cases
10.
Figure 10.17 Hardwired design of the divisor in CRC
10.
Figure 10.18 Simulation of division in CRC encoder
10.
Figure 10.19 The CRC encoder design using shift registers
10.
Figure 10.20 General design of encoder and decoder of a CRC code
Using Polynomials
10.
Figure 10.21 A polynomial to represent a binary word
10.
Figure 10.22 CRC division using polynomials
10.
The divisor in a cyclic code is normally called the generator polynomial
or simply the generator.
Note
10.
In a cyclic code,
If s(x) ≠ 0, one or more bits is corrupted.
If s(x) = 0, either�
a. No bit is corrupted. or
b. Some bits are corrupted, but the� decoder failed to detect them.
Note
10.
In a cyclic code, those e(x) errors that are divisible by g(x) are not caught.
Received codeword (c(x) + e(x))/g(x) =
c(x)/g(x) + e(x)/gx
The first part is by definition divisible the second part will determine the error. If “0” conclusion -> no error occurred. Note: that could mean that an error went undetected.
Note
10.
If the generator has more than one term and the coefficient of x0 is 1, �all single errors can be caught.
Note
10.
Which of the following g(x) values guarantees that a single-bit error is caught? For each case, what is the error that cannot be caught?
a. x + 1 b. x3 c. 1
Solution
a. No xi can be divisible by x + 1. Any single-bit error can� be caught.
b. If i is equal to or greater than 3, xi is divisible by g(x).� All single-bit errors in positions 1 to 3 are caught.
c. All values of i make xi divisible by g(x). No single-bit� error can be caught. This g(x) is useless.
Example 10.15
10.
Figure 10.23 Representation of two isolated single-bit errors using polynomials
10.
If a generator cannot divide xt + 1 �(t between 0 and n – 1),
then all isolated double errors �can be detected.
Note
10.
Find the status of the following generators related to two isolated, single-bit errors.
a. x + 1 b. x4 + 1 c. x7 + x6 + 1 d. x15 + x14 + 1
Solution
a. This is a very poor choice for a generator. Any two� errors next to each other cannot be detected.
b. This generator cannot detect two errors that are four� positions apart.
c. This is a good choice for this purpose.
d. This polynomial cannot divide xt + 1 if t is less than� 32,768. A codeword with two isolated errors up to� 32,768 bits apart can be detected by this generator.
Example 10.16
10.
A generator that contains a factor of �x + 1 can detect all odd-numbered errors.
Note
10.
❏ All burst errors with L ≤ r will be� detected.
❏ All burst errors with L = r + 1 will be� detected with probability 1 – (1/2)r–1.
❏ All burst errors with L > r + 1 will be� detected with probability 1 – (1/2)r.
Note
10.
Find the suitability of the following generators in relation to burst errors of different lengths.
a. x6 + 1 b. x18 + x7 + x + 1 c. x32 + x23 + x7 + 1
Solution
a. This generator can detect all burst errors with a length� less than or equal to 6 bits; 3 out of 100 burst errors� with length 7 will slip by; 16 out of 1000 burst errors of� length 8 or more will slip by.
Example 10.17
10.
b. This generator can detect all burst errors with a length� less than or equal to 18 bits; 8 out of 1 million burst� errors with length 19 will slip by; 4 out of 1 million� burst errors of length 20 or more will slip by.
c. This generator can detect all burst errors with a length� less than or equal to 32 bits; 5 out of 10 billion burst� errors with length 33 will slip by; 3 out of 10 billion� burst errors of length 34 or more will slip by.
Example 10.17 (continued)
10.
A good polynomial generator needs to have the following characteristics:
1. It should have at least two terms.
2. The coefficient of the term x0 should� be 1.
3. It should not divide xt + 1, for t� between 2 and n − 1.
4. It should have the factor x + 1.
Note
10.
Table 10.7 Standard polynomials
10.
10-5 CHECKSUM
The last error detection method we discuss here is called the checksum. The checksum is used in the Internet by several protocols although not at the data link layer. However, we briefly discuss it here to complete our discussion on error checking
Idea�One’s Complement�Internet Checksum
Topics discussed in this section:
10.
Suppose our data is a list of five 4-bit numbers that we want to send to a destination. In addition to sending these numbers, we send the sum of the numbers. For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0, 6, 36), where 36 is the sum of the original numbers. The receiver adds the five numbers and compares the result with the sum. If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum. Otherwise, there is an error somewhere and the data are not accepted.
Example 10.18
10.
We can make the job of the receiver easier if we send the negative (complement) of the sum, called the checksum. In this case, we send (7, 11, 12, 0, 6, −36). The receiver can add all the numbers received (including the checksum). If the result is 0, it assumes no error; otherwise, there is an error.
Example 10.19
10.
How can we represent the number 21 in one’s complement arithmetic using only four bits?
Solution
The number 21 in binary is 10101 (it needs five bits). We can wrap the leftmost bit and add it to the four rightmost bits. We have (0101 + 1) = 0110 or 6.
Example 10.20
10.
How can we represent the number −6 in one’s complement arithmetic using only four bits?
Solution
In one’s complement arithmetic, the negative or complement of a number is found by inverting all bits. Positive 6 is 0110; negative 6 is 1001. If we consider only unsigned numbers, this is 9. In other words, the complement of 6 is 9. Another way to find the complement of a number in one’s complement arithmetic is to subtract the number from 2n − 1 (16 − 1 in this case).
Example 10.21
10.
Let us redo Exercise 10.19 using one’s complement arithmetic. Figure 10.24 shows the process at the sender and at the receiver. The sender initializes the checksum to 0 and adds all data items and the checksum (the checksum is considered as one data item and is shown in color). The result is 36. However, 36 cannot be expressed in 4 bits. The extra two bits are wrapped and added with the sum to create the wrapped sum value 6. In the figure, we have shown the details in binary. The sum is then complemented, resulting in the checksum value 9 (15 − 6 = 9). The sender now sends six data items to the receiver including the checksum 9.
Example 10.22
10.
The receiver follows the same procedure as the sender. It adds all data items (including the checksum); the result is 45. The sum is wrapped and becomes 15. The wrapped sum is complemented and becomes 0. Since the value of the checksum is 0, this means that the data is not corrupted. The receiver drops the checksum and keeps the other data items. If the checksum is not zero, the entire packet is dropped.
Example 10.22 (continued)
10.
Figure 10.24 Example 10.22
10.
Sender site:
1. The message is divided into 16-bit words.
2. The value of the checksum word is set to 0.
3. All words including the checksum are� added using one’s complement addition.
4. The sum is complemented and becomes the� checksum.
5. The checksum is sent with the data.
Note
10.
Receiver site:
1. The message (including checksum) is� divided into 16-bit words.
2. All words are added using one’s� complement addition.
3. The sum is complemented and becomes the� new checksum.
4. If the value of checksum is 0, the message� is accepted; otherwise, it is rejected.
Note
10.
Let us calculate the checksum for a text of 8 characters (“Forouzan”). The text needs to be divided into 2-byte (16-bit) words. We use ASCII (see Appendix A) to change each byte to a 2-digit hexadecimal number. For example, F is represented as 0x46 and o is represented as 0x6F. Figure 10.25 shows how the checksum is calculated at the sender and receiver sites. In part a of the figure, the value of partial sum for the first column is 0x36. We keep the rightmost digit (6) and insert the leftmost digit (3) as the carry in the second column. The process is repeated for each column. Note that if there is any corruption, the checksum recalculated by the receiver is not all 0s. We leave this an exercise.
Example 10.23
10.
Figure 10.25 Example 10.23