1 of 558

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

2 of 558

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

3 of 558

Recommended Books:

  1. Kurose and Ross, “Computer Networking: A Top-Down Approach”, Fifth Edition, Pearson(ISBN: 9788131790540)
  2. Trivedi, “Computer Networks”, Oxford University Press(ISBN: 9780198066774)
  3. Black, “Computer Networks: Protocols, Standards and Interface”, PHI (ISBN: 9788120310414)
  4. Gupta, “Data Communications and Computer Networks”, PHI (ISBN: 9788120328464)
  5. Halsall and Kulkarni, “Computer Networking and The Internet” Fifth Edition, Pearson (ISBN: 97881775847

4 of 558

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)

5 of 558

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

6 of 558

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

7 of 558

1.7

Week: 01

Chapter 1

Introduction

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

8 of 558

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.

  • Components of a data communications system
  • Data Flow

Topics discussed in this section:

9 of 558

1.9

Figure 1.1 Components of a data communication system

10 of 558

1.10

Figure 1.2 Data flow (simplex, half-duplex, and full-duplex)

11 of 558

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.

  • Network Criteria
  • Physical Structures
  • Categories of Networks

Topics discussed in this section:

12 of 558

  • Performance
    • Depends on Network Elements
    • Measured in terms of Delay and Throughput
  • Reliability
    • Failure rate of network components
    • Measured in terms of availability/robustness
  • Security
    • Data protection against corruption/loss of data due to:
        • Errors
        • Malicious users

1.12

Network Criteria

13 of 558

  • Type of Connection
    • Point to Point - single transmitter and receiver
    • Multipoint - multiple recipients of single transmission
  • Physical Topology
    • Connection of devices
    • Type of transmission - unicast, mulitcast, broadcast

1.13

Physical Structures

14 of 558

1.14

Figure 1.3 Types of connections: point-to-point and multipoint

15 of 558

1.15

Figure 1.4 Categories of topology

16 of 558

1.16

Figure 1.5 A fully connected mesh topology (five devices)

17 of 558

1.17

Figure 1.6 A star topology connecting four stations

18 of 558

1.18

Figure 1.7 A bus topology connecting three stations

19 of 558

1.19

Figure 1.8 A ring topology connecting six stations

20 of 558

1.20

Figure 1.9 A hybrid topology: a star backbone with three bus networks

21 of 558

  • Local Area Networks (LANs)
    • Short distances
    • Designed to provide local interconnectivity
  • Wide Area Networks (WANs)
    • Long distances
    • Provide connectivity over large areas
  • Metropolitan Area Networks (MANs)
    • Provide connectivity over areas such as a city, a campus

1.21

Categories of Networks

22 of 558

1.22

Figure 1.10 An isolated LAN connecting 12 computers to a hub in a closet

23 of 558

1.23

Figure 1.11 WANs: a switched WAN and a point-to-point WAN

24 of 558

1.24

Figure 1.12 A heterogeneous network made of four WANs and two LANs

25 of 558

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:

26 of 558

1.26

Figure 1.13 Hierarchical organization of the Internet

27 of 558

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

  • Syntax
  • Semantics
  • Timing

Topics discussed in this section:

28 of 558

  • Syntax
    • Structure or format of the data
    • Indicates how to read the bits - field delineation
  • Semantics
    • Interprets the meaning of the bits
    • Knows which fields define what action
  • Timing
    • When data should be sent and what
    • Speed at which data should be sent or speed at which it is being received.

1.28

Elements of a Protocol

29 of 558

2.29

Week: 02

Chapter 2

Network Models

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

30 of 558

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:

31 of 558

2.31

Figure 2.1 Tasks involved in sending a letter

32 of 558

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:

33 of 558

2.33

ISO is the organization.�OSI is the model.

Note

34 of 558

2.34

Figure 2.2 Seven layers of the OSI model

35 of 558

2.35

Figure 2.3 The interaction between layers in the OSI model

36 of 558

2.36

Figure 2.4 An exchange using the OSI model

37 of 558

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:

38 of 558

2.38

Figure 2.5 Physical layer

39 of 558

2.39

The physical layer is responsible for movements of

individual bits from one hop (node) to the next.

Note

40 of 558

2.40

Figure 2.6 Data link layer

41 of 558

2.41

The data link layer is responsible for moving �frames from one hop (node) to the next.

Note

42 of 558

2.42

Figure 2.7 Hop-to-hop delivery

43 of 558

2.43

Figure 2.8 Network layer

44 of 558

2.44

The network layer is responsible for the �delivery of individual packets from

the source host to the destination host.

Note

45 of 558

2.45

Figure 2.9 Source-to-destination delivery

46 of 558

2.46

Figure 2.10 Transport layer

47 of 558

2.47

The transport layer is responsible for the delivery �of a message from one process to another.

Note

48 of 558

2.48

Figure 2.11 Reliable process-to-process delivery of a message

49 of 558

2.49

Figure 2.12 Session layer

50 of 558

2.50

The session layer is responsible for dialog �control and synchronization.

Note

51 of 558

2.51

Figure 2.13 Presentation layer

52 of 558

2.52

The presentation layer is responsible for translation, compression, and encryption.

Note

53 of 558

2.53

Figure 2.14 Application layer

54 of 558

2.54

The application layer is responsible for �providing services to the user.

Note

55 of 558

2.55

Figure 2.15 Summary of layers

56 of 558

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:

57 of 558

2.57

Figure 2.16 TCP/IP and OSI model

58 of 558

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:

59 of 558

2.59

Figure 2.17 Addresses in TCP/IP

60 of 558

2.60

Figure 2.18 Relationship of layers and addresses in TCP/IP

61 of 558

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

62 of 558

2.62

Figure 2.19 Physical addresses

63 of 558

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.

64 of 558

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

65 of 558

2.65

Figure 2.20 IP addresses

66 of 558

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

67 of 558

2.67

Figure 2.21 Port addresses

68 of 558

2.68

The physical addresses will change from hop to hop,

but the logical addresses usually remain the same.

Note

69 of 558

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.

70 of 558

3.70

Week: 03

Chapter 3

Data and Signals

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

71 of 558

3.71

To be transmitted, data must be transformed to electromagnetic signals.

Note

72 of 558

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.

  • Analog and Digital Data
  • Analog and Digital Signals
  • Periodic and Nonperiodic Signals

Topics discussed in this section:

73 of 558

Analog and Digital Data

  • Data can be analog or digital.
  • Analog data are continuous and take continuous values.
  • Digital data have discrete states and take discrete values.

3.73

74 of 558

Analog and Digital Signals

  • Signals can be analog or digital.
  • Analog signals can have an infinite number of values in a range.
  • Digital signals can have only a limited �number of values.

3.74

75 of 558

3.75

Figure 3.1 Comparison of analog and digital signals

76 of 558

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.

  • Sine Wave
  • Wavelength
  • Time and Frequency Domain
  • Composite Signals
  • Bandwidth

Topics discussed in this section:

77 of 558

3.77

Figure 3.2 A sine wave

78 of 558

3.78

Figure 3.3 Two signals with the same phase and frequency, � but different amplitudes

79 of 558

3.79

Frequency and period are the inverse of each other.

Note

80 of 558

3.80

Figure 3.4 Two signals with the same amplitude and phase,� but different frequencies

81 of 558

3.81

Table 3.1 Units of period and frequency

82 of 558

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

83 of 558

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).

84 of 558

Frequency

  • Frequency is the rate of change with respect to time.
  • Change in a short span of time means high frequency.
  • Change over a long span of �time means low frequency.

3.84

85 of 558

3.85

If a signal does not change at all, its frequency is zero.

If a signal changes instantaneously, its frequency is infinite.

Note

86 of 558

3.86

Phase describes the position of the waveform relative to time 0.

Note

87 of 558

3.87

Figure 3.5 Three sine waves with the same amplitude and frequency,� but different phases

88 of 558

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

89 of 558

3.89

Figure 3.6 Wavelength and period

90 of 558

3.90

Figure 3.7 The time-domain and frequency-domain plots of a sine wave

91 of 558

3.91

A complete sine wave in the time domain can be represented by one single spike in the frequency domain.

Note

92 of 558

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

93 of 558

3.93

Figure 3.8 The time domain and frequency domain of three sine waves

94 of 558

Signals and Communication

  • A single-frequency sine wave is not useful in data communications
  • We need to send a composite signal, a signal made of many simple sine waves.
  • According to Fourier analysis, any composite signal is a combination of simple sine waves with different frequencies, amplitudes, and phases.

3.94

95 of 558

Composite Signals and Periodicity

  • If the composite signal is periodic, the decomposition gives a series of signals with discrete frequencies.
  • If the composite signal is nonperiodic, the decomposition gives a combination of sine waves with continuous frequencies.

3.95

96 of 558

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

97 of 558

3.97

Figure 3.9 A composite periodic signal

98 of 558

3.98

Figure 3.10 Decomposition of a composite periodic signal in the time and� frequency domains

99 of 558

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

100 of 558

3.100

Figure 3.11 The time and frequency domains of a nonperiodic signal

101 of 558

Bandwidth and Signal Frequency

  • The bandwidth of a composite signal is the difference between the highest and the lowest frequencies contained in that signal.

3.101

102 of 558

3.102

Figure 3.12 The bandwidth of periodic and nonperiodic composite signals

103 of 558

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).

104 of 558

3.104

Figure 3.13 The bandwidth for Example 3.6

105 of 558

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).

106 of 558

3.106

Figure 3.14 The bandwidth for Example 3.7

107 of 558

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

108 of 558

3.108

Figure 3.15 The bandwidth for Example 3.8

109 of 558

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

110 of 558

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

111 of 558

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

112 of 558

Fourier Analysis

3.112

Fourier analysis is a tool that changes a time domain signal to a frequency domain signal and vice versa.

Note

113 of 558

Fourier Series

  • Every composite periodic signal can be represented with a series of sine and cosine functions.
  • The functions are integral harmonics of the fundamental frequency “f” of the composite signal.
  • Using the series we can decompose any periodic signal into its harmonics.

3.113

114 of 558

Fourier Series

3.114

115 of 558

Examples of Signals and the Fourier Series Representation

3.115

116 of 558

Sawtooth Signal

3.116

117 of 558

Fourier Transform

  • Fourier Transform gives the frequency domain of a nonperiodic time domain signal.

3.117

118 of 558

Example of a Fourier Transform

3.118

119 of 558

Inverse Fourier Transform

3.119

120 of 558

Time limited and Band limited Signals

  • A time limited signal is a signal for which the amplitude s(t) = 0 for t > T1 and t < T2
  • A band limited signal is a signal for which the amplitude S(f) = 0 for f > F1 and f < F2

3.120

121 of 558

3.121

Week: 04

Chapter 3

Data and Signals

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

122 of 558

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.

  • Bit Rate
  • Bit Length
  • Digital Signal as a Composite Analog Signal
  • Application Layer

Topics discussed in this section:

123 of 558

3.123

Figure 3.16 Two digital signals: one with two signal levels and the other� with four signal levels

124 of 558

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.

125 of 558

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

126 of 558

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

127 of 558

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

128 of 558

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.

129 of 558

3.129

Figure 3.17 The time and frequency domains of periodic and nonperiodic� digital signals

130 of 558

3.130

Figure 3.18 Baseband transmission

131 of 558

3.131

A digital signal is a composite analog signal with an infinite bandwidth.

Note

132 of 558

3.132

Figure 3.19 Bandwidths of two low-pass channels

133 of 558

3.133

Figure 3.20 Baseband transmission using a dedicated medium

134 of 558

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

135 of 558

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

136 of 558

3.136

Figure 3.21 Rough approximation of a digital signal using the first harmonic � for worst case

137 of 558

3.137

Figure 3.22 Simulating a digital signal with first three harmonics

138 of 558

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.

139 of 558

3.139

Table 3.2 Bandwidth requirements

140 of 558

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

141 of 558

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

142 of 558

3.142

Figure 3.23 Bandwidth of a bandpass channel

143 of 558

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

144 of 558

3.144

Figure 3.24 Modulation of a digital signal for transmission on a bandpass � channel

145 of 558

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

146 of 558

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

147 of 558

3.147

Week: 05

Chapter 3

Data and Signals

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

148 of 558

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.

  • Attenuation
  • Distortion
  • Noise

Topics discussed in this section:

149 of 558

3.149

Figure 3.25 Causes of impairment

150 of 558

3.150

151 of 558

Attenuation

  • Means loss of energy -> weaker signal
  • When a signal travels through a medium it loses energy overcoming the resistance of the medium
  • Amplifiers are used to compensate for this loss of energy by amplifying the signal.

3.151

152 of 558

Measurement of Attenuation

  • To show the loss or gain of energy the unit “decibel” is used.

dB = 10log10P2/P1

P1 - input signal

P2 - output signal

3.152

153 of 558

3.153

Figure 3.26 Attenuation

154 of 558

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.

155 of 558

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

156 of 558

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

157 of 558

3.157

Figure 3.27 Decibels for Example 3.28

158 of 558

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

159 of 558

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

160 of 558

3.160

161 of 558

Distortion

  • Means that the signal changes its form or shape
  • Distortion occurs in composite signals
  • Each frequency component has its own propagation speed traveling through a medium.
  • The different components therefore arrive with different delays at the receiver.
  • That means that the signals have different phases at the receiver than they did at the source.

3.161

162 of 558

3.162

Figure 3.28 Distortion

163 of 558

3.163

164 of 558

Noise

  • There are different types of noise
    • Thermal - random noise of electrons in the wire creates an extra signal
    • Induced - from motors and appliances, devices act are transmitter antenna and medium as receiving antenna.
    • Crosstalk - same as above but between two wires.
    • Impulse - Spikes that result from power lines, lighning, etc.

3.164

165 of 558

3.165

Figure 3.29 Noise

166 of 558

Signal to Noise Ratio (SNR)

  • To measure the quality of a system the SNR is often used. It indicates the strength of the signal wrt the noise power in the system.
  • It is the ratio between two powers.
  • It is usually given in dB and referred to as SNRdB.

3.166

167 of 558

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

168 of 558

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.

169 of 558

3.169

Figure 3.30 Two cases of SNR: a high SNR and a low SNR

170 of 558

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)

  • Noiseless Channel: Nyquist Bit Rate
  • Noisy Channel: Shannon Capacity
  • Using Both Limits

Topics discussed in this section:

171 of 558

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

172 of 558

Capacity of a System

  • The bit rate of a system increases with an increase in the number of signal levels we use to denote a symbol.
  • A symbol can consist of a single bit or “n” bits.
  • The number of signal levels = 2n.
  • As the number of levels goes up, the spacing between level decreases -> increasing the probability of an error occurring in the presence of transmission impairments.

3.172

173 of 558

Nyquist Theorem

  • Nyquist gives the upper bound for the bit rate of a transmission system by calculating the bit rate directly from the number of bits in a symbol (or signal levels) and the bandwidth of the system (assuming 2 symbols/per cycle and first harmonic).
  • Nyquist theorem states that for a noiseless channel:

C = 2 B log22n

C= capacity in bps

B = bandwidth in Hz

3.173

174 of 558

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

175 of 558

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

176 of 558

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

177 of 558

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.

178 of 558

Shannon’s Theorem

  • Shannon’s theorem gives the capacity of a system in the presence of noise.

C = B log2(1 + SNR)

3.178

179 of 558

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.

180 of 558

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.

181 of 558

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

182 of 558

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

183 of 558

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

184 of 558

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)

185 of 558

3.185

The Shannon capacity gives us the upper limit; the Nyquist formula tells us how many signal levels we need.

Note

186 of 558

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.

  • Bandwidth - capacity of the system
  • Throughput - no. of bits that can be pushed through
  • Latency (Delay) - delay incurred by a bit from start to finish
  • Bandwidth-Delay Product

Topics discussed in this section:

187 of 558

3.187

In networking, we use the term bandwidth in two contexts.

  • The first, bandwidth in hertz, refers to the range of frequencies in a composite signal or the range of frequencies that a channel can pass.
  • The second, bandwidth in bits per second, refers to the speed of bit transmission in a channel or link. Often referred to as Capacity.

Note

188 of 558

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

189 of 558

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

190 of 558

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.

191 of 558

3.191

192 of 558

Propagation & Transmission delay

  • Propagation speed - speed at which a bit travels though the medium from source to destination.
  • Transmission speed - the speed at which all the bits in a message arrive at the destination. (difference in arrival time of first and last bit)

3.192

193 of 558

Propagation and Transmission Delay

  • Propagation Delay = Distance/Propagation speed

  • Transmission Delay = Message size/bandwidth bps

  • Latency = Propagation delay + Transmission delay + Queueing time + Processing time

3.193

194 of 558

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.

195 of 558

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

196 of 558

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)

197 of 558

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

198 of 558

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)

199 of 558

3.199

Figure 3.31 Filling the link with bits for case 1

200 of 558

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

201 of 558

3.201

Figure 3.32 Filling the link with bits in case 2

202 of 558

3.202

The bandwidth-delay product defines the number of bits that can fill the link.

Note

203 of 558

3.203

Figure 3.33 Concept of bandwidth-delay product

204 of 558

4.204

Week: 06

Chapter 4

Digital Transmission

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

205 of 558

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.

  • Line Coding
  • Line Coding Schemes
  • Block Coding
  • Scrambling

Topics discussed in this section:

206 of 558

Line Coding

  • Converting a string of 1’s and 0’s (digital data) into a sequence of signals that denote the 1’s and 0’s.
  • For example a high voltage level (+V) could represent a “1” and a low voltage level (0 or -V) could represent a “0”.

4.206

207 of 558

4.207

Figure 4.1 Line coding and decoding

208 of 558

Mapping Data symbols onto Signal levels

  • A data symbol (or element) can consist of a number of data bits:
    • 1 , 0 or
    • 11, 10, 01, ……
  • A data symbol can be coded into a single signal element or multiple signal elements
    • 1 -> +V, 0 -> -V
    • 1 -> +V and -V, 0 -> -V and +V
  • The ratio ‘r’ is the number of data elements carried by a signal element.

4.208

209 of 558

Relationship between data rate and signal rate

  • The data rate defines the number of bits sent per sec - bps. It is often referred to the bit rate.
  • The signal rate is the number of signal elements sent in a second and is measured in bauds. It is also referred to as the modulation rate.
  • Goal is to increase the data rate whilst reducing the baud rate.

4.209

210 of 558

4.210

Figure 4.2 Signal element versus data element

211 of 558

Data rate and Baud rate

  • The baud or signal rate can be expressed as:

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

212 of 558

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

213 of 558

4.213

Although the actual bandwidth of a digital signal is infinite, the effective bandwidth is finite.

Note

214 of 558

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

215 of 558

Considerations for choosing a good signal element referred to as line encoding

  • Baseline wandering - a receiver will evaluate the average power of the received signal (called the baseline) and use that to determine the value of the incoming data elements. If the incoming signal does not vary over a long period of time, the baseline will drift and thus cause errors in detection of incoming data elements.
  • A good line encoding scheme will prevent long runs of fixed amplitude.

4.215

216 of 558

Line encoding C/Cs

  • DC components - when the voltage level remains constant for long periods of time, there is an increase in the low frequencies of the signal. Most channels are bandpass and may not support the low frequencies.
  • This will require the removal of the dc component of a transmitted signal.

4.216

217 of 558

Line encoding C/Cs

  • Self synchronization - the clocks at the sender and the receiver must have the same bit interval.
  • If the receiver clock is faster or slower it will misinterpret the incoming bit stream.

4.217

218 of 558

4.218

Figure 4.3 Effect of lack of synchronization

219 of 558

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.

220 of 558

Line encoding C/Cs

  • Error detection - errors occur during transmission due to line impairments.
  • Some codes are constructed such that when an error occurs it can be detected. For example: a particular signal transition is not part of the code. When it occurs, the receiver will know that a symbol error has occurred.

4.220

221 of 558

Line encoding C/Cs

  • Noise and interference - there are line encoding techniques that make the transmitted signal “immune” to noise and interference.
  • This means that the signal cannot be corrupted, it is stronger than error detection.

4.221

222 of 558

Line encoding C/Cs

  • Complexity - the more robust and resilient the code, the more complex it is to implement and the price is often paid in baud rate or required bandwidth.

4.222

223 of 558

4.223

Figure 4.4 Line coding schemes

224 of 558

Unipolar

  • All signal levels are on one side of the time axis - either above or below
  • NRZ - Non Return to Zero scheme is an example of this code. The signal level does not return to zero during a symbol transmission.
  • Scheme is prone to baseline wandering and DC components. It has no synchronization or any error detection. It is simple but costly in power consumption.

4.224

225 of 558

4.225

Figure 4.5 Unipolar NRZ scheme

226 of 558

Polar - NRZ

  • The voltages are on both sides of the time axis.
  • Polar NRZ scheme can be implemented with two voltages. E.g. +V for 1 and -V for 0.
  • There are two versions:
    • NZR - Level (NRZ-L) - positive voltage for one symbol and negative for the other
    • NRZ - Inversion (NRZ-I) - the change or lack of change in polarity determines the value of a symbol. E.g. a “1” symbol inverts the polarity a “0” does not.

4.226

227 of 558

4.227

Figure 4.6 Polar NRZ-L and NRZ-I schemes

228 of 558

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

229 of 558

4.229

NRZ-L and NRZ-I both have an average signal rate of N/2 Bd.

Note

230 of 558

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

231 of 558

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

232 of 558

Polar - RZ

  • The Return to Zero (RZ) scheme uses three voltage values. +, 0, -.
  • Each symbol has a transition in the middle. Either from high to zero or from low to zero.
  • This scheme has more signal transitions (two per symbol) and therefore requires a wider bandwidth.
  • No DC components or baseline wandering.
  • Self synchronization - transition indicates symbol value.
  • More complex as it uses three voltage level. It has no error detection capability.

4.232

233 of 558

4.233

Figure 4.7 Polar RZ scheme

234 of 558

Polar - Biphase: Manchester and Differential Manchester

  • Manchester coding consists of combining the NRZ-L and RZ schemes.
    • Every symbol has a level transition in the middle: from high to low or low to high. Uses only two voltage levels.
  • Differential Manchester coding consists of combining the NRZ-I and RZ schemes.
    • Every symbol has a level transition in the middle. But the level at the beginning of the symbol is determined by the symbol value. One symbol causes a level change the other does not.

4.234

235 of 558

4.235

Figure 4.8 Polar biphase: Manchester and differential Manchester schemes

236 of 558

4.236

In Manchester and differential Manchester encoding, the transition

at the middle of the bit is used for synchronization.

Note

237 of 558

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

238 of 558

Bipolar - AMI and Pseudoternary

  • Code uses 3 voltage levels: - +, 0, -, to represent the symbols (note not transitions to zero as in RZ).
  • Voltage level for one symbol is at “0” and the other alternates between + & -.
  • Bipolar Alternate Mark Inversion (AMI) - the “0” symbol is represented by zero voltage and the “1” symbol alternates between +V and -V.
  • Pseudoternary is the reverse of AMI.

4.238

239 of 558

4.239

Figure 4.9 Bipolar schemes: AMI and pseudoternary

240 of 558

Bipolar C/Cs

  • It is a better alternative to NRZ.
  • Has no DC component or baseline wandering.
  • Has no self synchronization because long runs of “0”s results in no signal transitions.
  • No error detection.

4.240

241 of 558

Multilevel Schemes

  • In these schemes we increase the number of data bits per symbol thereby increasing the bit rate.
  • Since we are dealing with binary data we only have 2 types of data element a 1 or a 0.
  • We can combine the 2 data elements into a pattern of “m” elements to create “2m” symbols.
  • If we have L signal levels, we can use “n” signal elements to create Ln signal elements.

4.241

242 of 558

Code C/Cs

  • Now we have 2m symbols and Ln signals.
  • If 2m > Ln then we cannot represent the data elements, we don’t have enough signals.
  • If 2m = Ln then we have an exact mapping of one symbol on one signal.
  • If 2m < Ln then we have more signals than symbols and we can choose the signals that are more distinct to represent the symbols and therefore have better noise immunity and error detection as some signals are not valid.

4.242

243 of 558

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

244 of 558

Representing Multilevel Codes

  • We use the notation mBnL, where m is the length of the binary pattern, B represents binary data, n represents the length of the signal pattern and L the number of levels.
  • L = B binary, L = T for 3 ternary, L = Q for 4 quaternary.

4.244

245 of 558

4.245

Figure 4.10 Multilevel: 2B1Q scheme

246 of 558

Redundancy

  • In the 2B1Q scheme we have no redundancy and we see that a DC component is present.
  • If we use a code with redundancy we can decide to use only “0” or “+” weighted codes (more +’s than -’s in the signal element) and invert any code that would create a DC component. E.g. ‘+00++-’ -> ‘-00--+’
  • Receiver will know when it receives a “-” weighted code that it should invert it as it doesn’t represent any valid symbol.

4.246

247 of 558

4.247

Figure 4.11 Multilevel: 8B6T scheme

248 of 558

Multilevel using multiple channels

  • In some cases, we split the signal transmission up and distribute it over several links.
  • The separate segments are transmitted simultaneously. This reduces the signalling rate per link -> lower bandwidth.
  • This requires all bits for a code to be stored.
  • xD: means that we use ‘x’ links
  • YYYz: We use ‘z’ levels of modulation where YYY represents the type of modulation (e.g. pulse ampl. mod. PAM).
  • Codes are represented as: xD-YYYz

4.248

249 of 558

4.249

Figure 4.12 Multilevel: 4D-PAM5 scheme

250 of 558

Multitransition Coding

  • Because of synchronization requirements we force transitions. This can result in very high bandwidth requirements -> more transitions than are bits (e.g. mid bit transition with inversion).
  • Codes can be created that are differential at the bit level forcing transitions at bit boundaries. This results in a bandwidth requirement that is equivalent to the bit rate.
  • In some instances, the bandwidth requirement may even be lower, due to repetitive patterns resulting in a periodic signal.

4.250

251 of 558

4.251

Figure 4.13 Multitransition: MLT-3 scheme

252 of 558

MLT-3

  • Signal rate is same as NRZ-I
  • But because of the resulting bit pattern, we have a periodic signal for worst case bit pattern: 1111
  • This can be approximated as an analog signal a frequency 1/4 the bit rate!

4.252

253 of 558

4.253

Table 4.1 Summary of line coding schemes

254 of 558

Block Coding

  • For a code to be capable of error detection, we need to add redundancy, i.e., extra bits to the data bits.
  • Synchronization also requires redundancy - transitions are important in the signal flow and must occur frequently.
  • Block coding is done in three steps: division, substitution and combination.
  • It is distinguished from multilevel coding by use of the slash - xB/yB.
  • The resulting bit stream prevents certain bit combinations that when used with line encoding would result in DC components or poor sync. quality.

4.254

255 of 558

4.255

Block coding is normally referred to as mB/nB coding;

it replaces each m-bit group with an �n-bit group.

Note

256 of 558

4.256

Figure 4.14 Block coding concept

257 of 558

4.257

Figure 4.15 Using block coding 4B/5B with NRZ-I line coding scheme

258 of 558

4.258

Table 4.2 4B/5B mapping codes

259 of 558

4.259

Figure 4.16 Substitution in 4B/5B block coding

260 of 558

Redundancy

  • A 4 bit data word can have 24 combinations.
  • A 5 bit word can have 25=32 combinations.
  • We therefore have 32 - 26 = 16 extra words.
  • Some of the extra words are used for control/signalling purposes.

4.260

261 of 558

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

262 of 558

4.262

Figure 4.17 8B/10B block encoding

263 of 558

More bits - better error detection

  • The 8B10B block code adds more redundant bits and can thereby choose code words that would prevent a long run of a voltage level that would cause DC components.

4.263

264 of 558

Scrambling

  • The best code is one that does not increase the bandwidth for synchronization and has no DC components.
  • Scrambling is a technique used to create a sequence of bits that has the required c/c’s for transmission - self clocking, no low frequencies, no wide bandwidth.
  • It is implemented at the same time as encoding, the bit stream is created on the fly.
  • It replaces ‘unfriendly’ runs of bits with a violation code that is easy to recognize and removes the unfriendly c/c.

4.264

265 of 558

4.265

Figure 4.18 AMI used with scrambling

266 of 558

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

267 of 558

4.267

Figure 4.19 Two cases of B8ZS scrambling technique

268 of 558

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.

269 of 558

4.269

Figure 4.20 Different situations in HDB3 scrambling technique

270 of 558

4.270

Week: 07

Chapter 4

Digital Transmission

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

271 of 558

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.

  • Pulse Code Modulation (PCM)
  • Delta Modulation (DM)

Topics discussed in this section:

272 of 558

PCM

  • PCM consists of three steps to digitize an analog signal:
    1. Sampling
    2. Quantization
    3. Binary encoding
  • Before we sample, we have to filter the signal to limit the maximum frequency of the signal as it affects the sampling rate.
  • Filtering should ensure that we do not distort the signal, ie remove high frequency components that affect the signal shape.

4.272

273 of 558

4.273

Figure 4.21 Components of PCM encoder

274 of 558

Sampling

  • Analog signal is sampled every TS secs.
  • Ts is referred to as the sampling interval.
  • fs = 1/Ts is called the sampling rate or sampling frequency.
  • There are 3 sampling methods:
    • Ideal - an impulse at each sampling instant
    • Natural - a pulse of short width with varying amplitude
    • Flattop - sample and hold, like natural but with single amplitude value
  • The process is referred to as pulse amplitude modulation PAM and the outcome is a signal with analog (non integer) values

4.274

275 of 558

4.275

Figure 4.22 Three different sampling methods for PCM

276 of 558

4.276

According to the Nyquist theorem, the sampling rate must be

at least 2 times the highest frequency contained in the signal.

Note

277 of 558

4.277

Figure 4.23 Nyquist sampling rate for low-pass and bandpass signals

278 of 558

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

279 of 558

4.279

Figure 4.24 Recovery of a sampled sine wave for different sampling rates

280 of 558

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

281 of 558

4.281

Figure 4.25 Sampling of a clock with only one hand

282 of 558

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

283 of 558

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

284 of 558

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

285 of 558

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

286 of 558

Quantization

  • Sampling results in a series of pulses of varying amplitude values ranging between two limits: a min and a max.
  • The amplitude values are infinite between the two limits.
  • We need to map the infinite amplitude values onto a finite set of known values.
  • This is achieved by dividing the distance between min and max into L zones, each of height Δ.

Δ = (max - min)/L

4.286

287 of 558

Quantization Levels

  • The midpoint of each zone is assigned a value from 0 to L-1 (resulting in L values)
  • Each sample falling in a zone is then approximated to the value of the midpoint.

4.287

288 of 558

Quantization Zones

  • Assume we have a voltage signal with amplitutes Vmin=-20V and Vmax=+20V.
  • We want to use L=8 quantization levels.
  • Zone width Δ = (20 - -20)/8 = 5
  • The 8 zones are: -20 to -15, -15 to -10, -10 to -5, -5 to 0, 0 to +5, +5 to +10, +10 to +15, +15 to +20
  • The midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5

4.288

289 of 558

Assigning Codes to Zones

  • Each zone is then assigned a binary code.
  • The number of bits required to encode the zones, or the number of bits per sample as it is commonly referred to, is obtained as follows:

nb = log2 L

  • Given our example, nb = 3
  • The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100, 101, 110, and 111
  • Assigning codes to zones:
    • 000 will refer to zone -20 to -15
    • 001 to zone -15 to -10, etc.

4.289

290 of 558

4.290

Figure 4.26 Quantization and encoding of a sampled signal

291 of 558

Quantization Error

  • When a signal is quantized, we introduce an error - the coded signal is an approximation of the actual amplitude value.
  • The difference between actual and coded value (midpoint) is referred to as the quantization error.
  • The more zones, the smaller Δ which results in smaller errors.
  • BUT, the more zones the more bits required to encode the samples -> higher bit rate

4.291

292 of 558

Quantization Error and SNQR

  • Signals with lower amplitude values will suffer more from quantization error as the error range: Δ/2, is fixed for all signal levels.
  • Non linear quantization is used to alleviate this problem. Goal is to keep SNQR fixed for all sample values.
  • Two approaches:
    • The quantization levels follow a logarithmic curve. Smaller Δ’s at lower amplitudes and larger Δ’s at higher amplitudes.
    • Companding: The sample values are compressed at the sender into logarithmic zones, and then expanded at the receiver. The zones are fixed in height.

4.292

293 of 558

Bit rate and bandwidth requirements of PCM

  • The bit rate of a PCM signal can be calculated form the number of bits per sample x the sampling rate

Bit rate = nb x fs

  • The bandwidth required to transmit this signal depends on the type of line encoding used. Refer to previous section for discussion and formulas.
  • A digitized signal will always need more bandwidth than the original analog signal. Price we pay for robustness and other features of digital transmission.

4.293

294 of 558

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

295 of 558

PCM Decoder

  • To recover an analog signal from a digitized signal we follow the following steps:
    • We use a hold circuit that holds the amplitude value of a pulse till the next pulse arrives.
    • We pass this signal through a low pass filter with a cutoff frequency that is equal to the highest frequency in the pre-sampled signal.
  • The higher the value of L, the less distorted a signal is recovered.

4.295

296 of 558

4.296

Figure 4.27 Components of a PCM decoder

297 of 558

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

298 of 558

Delta Modulation

  • This scheme sends only the difference between pulses, if the pulse at time tn+1 is higher in amplitude value than the pulse at time tn, then a single bit, say a “1”, is used to indicate the positive value.
  • If the pulse is lower in value, resulting in a negative value, a “0” is used.
  • This scheme works well for small changes in signal values between samples.
  • If changes in amplitude are large, this will result in large errors.

4.298

299 of 558

4.299

Figure 4.28 The process of delta modulation

300 of 558

4.300

Figure 4.29 Delta modulation components

301 of 558

4.301

Figure 4.30 Delta demodulation components

302 of 558

Delta PCM (DPCM)

  • Instead of using one bit to indicate positive and negative differences, we can use more bits -> quantization of the difference.
  • Each bit code is used to represent the value of the difference.
  • The more bits the more levels -> the higher the accuracy.

4.302

303 of 558

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.

  • Parallel Transmission
  • Serial Transmission

Topics discussed in this section:

304 of 558

4.304

Figure 4.31 Data transmission and modes

305 of 558

4.305

Figure 4.32 Parallel transmission

306 of 558

4.306

Figure 4.33 Serial transmission

307 of 558

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

308 of 558

4.308

Asynchronous here means “asynchronous at the byte level,”

but the bits are still synchronized; �their durations are the same.

Note

309 of 558

4.309

Figure 4.34 Asynchronous transmission

310 of 558

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

311 of 558

4.311

Figure 4.35 Synchronous transmission

312 of 558

Isochronous

  • In isochronous transmission we cannot have uneven gaps between frames.
  • Transmission of bits is fixed with equal gaps.

4.312

313 of 558

5.313

Chapter 5

Analog Transmission

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

314 of 558

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.

  • Aspects of Digital-to-Analog Conversion
  • Amplitude Shift Keying
  • Frequency Shift Keying
  • Phase Shift Keying
  • Quadrature Amplitude Modulation

Topics discussed in this section:

315 of 558

Digital to Analog Conversion

  • Digital data needs to be carried on an analog signal.
  • A carrier signal (frequency fc) performs the function of transporting the digital data in an analog waveform.
  • The analog carrier signal is manipulated to uniquely identify the digital data being carried.

5.315

316 of 558

5.316

Figure 5.1 Digital-to-analog conversion

317 of 558

5.317

Figure 5.2 Types of digital-to-analog conversion

318 of 558

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

319 of 558

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

320 of 558

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.

321 of 558

Amplitude Shift Keying (ASK)

  • ASK is implemented by changing the amplitude of a carrier signal to reflect amplitude levels in the digital signal.
  • For example: a digital “1” could not affect the signal, whereas a digital “0” would, by making it zero.
  • The line encoding will determine the values of the analog waveform to reflect the digital data being carried.

5.321

322 of 558

Bandwidth of ASK

  • The bandwidth B of ASK is proportional to the signal rate S.

B = (1+d)S

  • “d” is due to modulation and filtering, lies between 0 and 1.

5.322

323 of 558

5.323

Figure 5.3 Binary amplitude shift keying

324 of 558

5.324

Figure 5.4 Implementation of binary ASK

325 of 558

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).

326 of 558

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.

327 of 558

5.327

Figure 5.5 Bandwidth of full-duplex ASK used in Example 5.4

328 of 558

Frequency Shift Keying

  • The digital data stream changes the frequency of the carrier signal, fc.
  • For example, a “1” could be represented by f1=fc +Δf, and a “0” could be represented by f2=fc-Δf.

5.328

329 of 558

5.329

Figure 5.6 Binary frequency shift keying

330 of 558

Bandwidth of FSK

  • If the difference between the two frequencies (f1 and f2) is 2Δf, then the required BW B will be:

B = (1+d)xS +2Δf

5.330

331 of 558

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

332 of 558

Coherent and Non Coherent

  • In a non-coherent FSK scheme, when we change from one frequency to the other, we do not adhere to the current phase of the signal.
  • In coherent FSK, the switch from one frequency signal to the other only occurs at the same phase in the signal.

5.332

333 of 558

Multi level FSK

  • Similarly to ASK, FSK can use multiple bits per signal element.
  • That means we need to provision for multiple frequencies, each one to represent a group of data bits.
  • The bandwidth for FSK can be higher

B = (1+d)xS + (L-1)/2Δf = LxS

5.333

334 of 558

5.334

Figure 5.7 Bandwidth of MFSK used in Example 5.6

335 of 558

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.

336 of 558

5.336

Figure 5.8 Bandwidth of MFSK used in Example 5.6

337 of 558

Phase Shift Keyeing

  • We vary the phase shift of the carrier signal to represent digital data.
  • The bandwidth requirement, B is:

B = (1+d)xS

  • PSK is much more robust than ASK as it is not that vulnerable to noise, which changes amplitude of the signal.

5.337

338 of 558

5.338

Figure 5.9 Binary phase shift keying

339 of 558

5.339

Figure 5.10 Implementation of BASK

340 of 558

Quadrature PSK

  • To increase the bit rate, we can code 2 or more bits onto one signal element.
  • In QPSK, we parallelize the bit stream so that every two incoming bits are split up and PSK a carrier frequency. One carrier frequency is phase shifted 90o from the other - in quadrature.
  • The two PSKed signals are then added to produce one of 4 signal elements. L = 4 here.

5.340

341 of 558

5.341

Figure 5.11 QPSK and its implementation

342 of 558

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.

343 of 558

Constellation Diagrams

  • A constellation diagram helps us to define the amplitude and phase of a signal when we are using two carriers, one in quadrature of the other.
  • The X-axis represents the in-phase carrier and the Y-axis represents quadrature carrier.

5.343

344 of 558

5.344

Figure 5.12 Concept of a constellation diagram

345 of 558

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.

346 of 558

5.346

Figure 5.13 Three constellation diagrams

347 of 558

5.347

Quadrature amplitude modulation is a combination of ASK and PSK.

Note

348 of 558

5.348

Figure 5.14 Constellation diagrams for some QAMs

349 of 558

5.349

Week: 08

Chapter 5

Analog Transmission

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

350 of 558

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.

  • Amplitude Modulation
  • Frequency Modulation
  • Phase Modulation

Topics discussed in this section:

351 of 558

5.351

Figure 5.15 Types of analog-to-analog modulation

352 of 558

Amplitude Modulation

  • A carrier signal is modulated only in amplitude value
  • The modulating signal is the envelope of the carrier
  • The required bandwidth is 2B, where B is the bandwidth of the modulating signal
  • Since on both sides of the carrier freq. fc, the spectrum is identical, we can discard one half, thus requiring a smaller bandwidth for transmission.

5.352

353 of 558

5.353

Figure 5.16 Amplitude modulation

354 of 558

5.354

�The total bandwidth required for AM �can be determined

from the bandwidth of the audio �signal: BAM = 2B.

Note

355 of 558

5.355

Figure 5.17 AM band allocation

356 of 558

Frequency Modulation

  • The modulating signal changes the freq. fc of the carrier signal
  • The bandwidth for FM is high
  • It is approx. 10x the signal frequency

5.356

357 of 558

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

358 of 558

5.358

Figure 5.18 Frequency modulation

359 of 558

5.359

Figure 5.19 FM band allocation

360 of 558

Phase Modulation (PM)

  • The modulating signal only changes the phase of the carrier signal.
  • The phase change manifests itself as a frequency change but the instantaneous frequency change is proportional to the derivative of the amplitude.
  • The bandwidth is higher than for AM.

5.360

361 of 558

5.361

Figure 5.20 Phase modulation

362 of 558

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

363 of 558

6.363

Week: 09

Chapter 6

Bandwidth Utilization:

Multiplexing and Spreading

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

364 of 558

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

365 of 558

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.

  • Frequency-Division Multiplexing
  • Wavelength-Division Multiplexing
  • Synchronous Time-Division Multiplexing
  • Statistical Time-Division Multiplexing

Topics discussed in this section:

366 of 558

6.366

Figure 6.1 Dividing a link into channels

367 of 558

6.367

Figure 6.2 Categories of multiplexing

368 of 558

6.368

Figure 6.3 Frequency-division multiplexing (FDM)

369 of 558

6.369

FDM is an analog multiplexing technique that combines analog signals.

It uses the concept of modulation discussed in Ch 5.

Note

370 of 558

6.370

Figure 6.4 FDM process

371 of 558

FM

6.371

372 of 558

6.372

Figure 6.5 FDM demultiplexing example

373 of 558

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

374 of 558

6.374

Figure 6.6 Example 6.1

375 of 558

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

376 of 558

6.376

Figure 6.7 Example 6.2

377 of 558

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

378 of 558

6.378

Figure 6.8 Example 6.3

379 of 558

6.379

Figure 6.9 Analog hierarchy

380 of 558

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

381 of 558

6.381

Figure 6.10 Wavelength-division multiplexing (WDM)

382 of 558

6.382

WDM is an analog multiplexing technique to combine optical signals.

Note

383 of 558

6.383

Figure 6.11 Prisms in wavelength-division multiplexing and demultiplexing

384 of 558

6.384

Figure 6.12 Time Division Multiplexing (TDM)

385 of 558

6.385

�TDM is a digital multiplexing technique for combining several low-rate digital �channels into one high-rate one.

Note

386 of 558

6.386

Figure 6.13 Synchronous time-division multiplexing

387 of 558

6.387

In synchronous TDM, the data rate �of the link is n times faster, and the unit duration is n times shorter.

Note

388 of 558

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

389 of 558

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)

390 of 558

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

391 of 558

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)

392 of 558

6.392

Figure 6.14 Example 6.6

393 of 558

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

394 of 558

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)

395 of 558

Interleaving

  • The process of taking a group of bits from each input line for multiplexing is called interleaving.
  • We interleave bits (1 - n) from each input onto one output.

6.395

396 of 558

6.396

Figure 6.15 Interleaving

397 of 558

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

398 of 558

6.398

Figure 6.16 Example 6.8

399 of 558

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

400 of 558

6.400

Figure 6.17 Example 6.9

401 of 558

Data Rate Management

  • Not all input links maybe have the same data rate.
  • Some links maybe slower. There maybe several different input link speeds
  • There are three strategies that can be used to overcome the data rate mismatch: multilevel, multislot and pulse stuffing

6.401

402 of 558

Data rate matching

  • Multilevel: used when the data rate of the input links are multiples of each other.
  • Multislot: used when there is a GCD between the data rates. The higher bit rate channels are allocated more slots per frame, and the output frame rate is a multiple of each input link.
  • Pulse Stuffing: used when there is no GCD between the links. The slowest speed link will be brought up to the speed of the other links by bit insertion, this is called pulse stuffing.

6.402

403 of 558

6.403

Figure 6.19 Multilevel multiplexing

404 of 558

6.404

Figure 6.20 Multiple-slot multiplexing

405 of 558

6.405

Figure 6.21 Pulse stuffing

406 of 558

Synchronization

  • To ensure that the receiver correctly reads the incoming bits, i.e., knows the incoming bit boundaries to interpret a “1” and a “0”, a known bit pattern is used between the frames.
  • The receiver looks for the anticipated bit and starts counting bits till the end of the frame.
  • Then it starts over again with the reception of another known bit.
  • These bits (or bit patterns) are called synchronization bit(s).
  • They are part of the overhead of transmission.

6.406

407 of 558

6.407

Figure 6.22 Framing bits

408 of 558

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

409 of 558

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)

410 of 558

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

411 of 558

6.411

Figure 6.23 Digital hierarchy

412 of 558

6.412

Table 6.1 DS and T line rates

413 of 558

6.413

Figure 6.24 T-1 line for multiplexing telephone lines

414 of 558

6.414

Figure 6.25 T-1 frame structure

415 of 558

6.415

Table 6.2 E line rates

416 of 558

Inefficient use of Bandwidth

  • Sometimes an input link may have no data to transmit.
  • When that happens, one or more slots on the output link will go unused.
  • That is wasteful of bandwidth.

6.416

417 of 558

6.417

Figure 6.18 Empty slots

418 of 558

6.418

Figure 6.26 TDM slot comparison

419 of 558

6.419

Week: 10

Chapter 6

Bandwidth Utilization:

Multiplexing and Spreading

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

420 of 558

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.

  • Frequency Hopping Spread Spectrum (FHSS)
  • Direct Sequence Spread Spectrum (DSSS)

Topics discussed in this section:

421 of 558

Spread Spectrum

  • A signal that occupies a bandwidth of B, is spread out to occupy a bandwidth of Bss
  • All signals are spread to occupy the same bandwidth Bss
  • Signals are spread with different codes so that they can be separated at the receivers.
  • Signals can be spread in the frequency domain or in the time domain.

6.421

422 of 558

6.422

Figure 6.27 Spread spectrum

423 of 558

6.423

Figure 6.28 Frequency hopping spread spectrum (FHSS)

424 of 558

6.424

Figure 6.29 Frequency selection in FHSS

425 of 558

6.425

Figure 6.30 FHSS cycles

426 of 558

6.426

Figure 6.31 Bandwidth sharing

427 of 558

6.427

Figure 6.32 DSSS

428 of 558

6.428

Figure 6.33 DSSS example

429 of 558

7.429

Week: 11

Chapter 7

Transmission Media

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

430 of 558

7.430

Figure 7.1 Transmission medium and physical layer

431 of 558

7.431

Figure 7.2 Classes of transmission media

432 of 558

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:

433 of 558

7.433

Figure 7.3 Twisted-pair cable

434 of 558

7.434

Figure 7.4 UTP and STP cables

435 of 558

7.435

Table 7.1 Categories of unshielded twisted-pair cables

436 of 558

7.436

Figure 7.5 UTP connector

437 of 558

7.437

Figure 7.6 UTP performance

438 of 558

7.438

Figure 7.7 Coaxial cable

439 of 558

7.439

Table 7.2 Categories of coaxial cables

440 of 558

7.440

Figure 7.8 BNC connectors

441 of 558

7.441

Figure 7.9 Coaxial cable performance

442 of 558

7.442

Figure 7.10 Fiber optics: Bending of light ray

443 of 558

7.443

Figure 7.11 Optical fiber

444 of 558

7.444

Figure 7.12 Propagation modes

445 of 558

7.445

Figure 7.13 Modes

446 of 558

7.446

Table 7.3 Fiber types

447 of 558

7.447

Figure 7.14 Fiber construction

448 of 558

7.448

Figure 7.15 Fiber-optic cable connectors

449 of 558

7.449

Figure 7.16 Optical fiber performance

450 of 558

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:

451 of 558

7.451

Figure 7.17 Electromagnetic spectrum for wireless communication

452 of 558

7.452

Figure 7.18 Propagation methods

453 of 558

7.453

Table 7.4 Bands

454 of 558

7.454

Figure 7.19 Wireless transmission waves

455 of 558

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

456 of 558

7.456

Figure 7.20 Omnidirectional antenna

457 of 558

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

458 of 558

7.458

Figure 7.21 Unidirectional antennas

459 of 558

7.459

�Infrared signals can be used for short-range communication in a closed area using line-of-sight propagation.

Note

460 of 558

Wireless Channels

  • Are subject to a lot more errors than guided media channels.
  • Interference is one cause for errors, can be circumvented with high SNR.
  • The higher the SNR the less capacity is available for transmission due to the broadcast nature of the channel.
  • Channel also subject to fading and no coverage holes.

7.460

461 of 558

10.461

Week: 12

Chapter 10

Error Detection �and �Correction

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

462 of 558

10.462

Data can be corrupted �during transmission.�

Some applications require that �errors be detected and corrected.

Note

463 of 558

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:

464 of 558

10.464

In a single-bit error, only 1 bit in the data unit has changed.

Note

465 of 558

10.465

Figure 10.1 Single-bit error

466 of 558

10.466

A burst error means that 2 or more bits in the data unit have changed.

Note

467 of 558

10.467

Figure 10.2 Burst error of length 8

468 of 558

10.468

To detect or correct errors, we need to send extra (redundant) bits with data.

Note

469 of 558

10.469

Figure 10.3 The structure of encoder and decoder

470 of 558

10.470

In this book, we concentrate on block codes; we leave convolution codes �to advanced texts.

Note

471 of 558

10.471

In modulo-N arithmetic, we use only the integers in the range 0 to N −1, inclusive.

Note

472 of 558

10.472

Figure 10.4 XORing of two single bits or two words

473 of 558

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:

474 of 558

10.474

Figure 10.5 Datawords and codewords in block coding

475 of 558

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

476 of 558

Error Detection

  • Enough redundancy is added to detect an error.
  • The receiver knows an error occurred but does not know which bit(s) is(are) in error.
  • Has less overhead than error correction.

10.476

477 of 558

10.477

Figure 10.6 Process of error detection in block coding

478 of 558

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

479 of 558

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)

480 of 558

10.480

Table 10.1 A code for error detection (Example 10.2)

481 of 558

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

482 of 558

10.482

Figure 10.7 Structure of encoder and decoder in error correction

483 of 558

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

484 of 558

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)

485 of 558

10.485

Table 10.2 A code for error correction (Example 10.3)

486 of 558

10.

Week: 13

Chapter 10

Error Detection �and �Correction

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

487 of 558

10.

The Hamming distance between two words is the number of differences between corresponding bits.

Note

488 of 558

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

489 of 558

10.

The minimum Hamming distance is the smallest Hamming distance between� all possible pairs in a set of words.

Note

490 of 558

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.

491 of 558

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

492 of 558

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

493 of 558

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

494 of 558

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

495 of 558

10.

Figure 10.8 Geometric concept for finding dmin in error detection

496 of 558

10.

Figure 10.9 Geometric concept for finding dmin in error correction

497 of 558

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

498 of 558

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

499 of 558

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:

500 of 558

10.

In a linear block code, the exclusive OR (XOR) of any two valid codewords creates another valid codeword.

Note

501 of 558

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

502 of 558

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

503 of 558

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

504 of 558

10.

Table 10.3 Simple parity-check code C(5, 4)

505 of 558

10.

Figure 10.10 Encoder and decoder for simple parity-check code

506 of 558

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

507 of 558

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)

508 of 558

10.

A simple parity-check code can detect an odd number of errors.

Note

509 of 558

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

510 of 558

10.

Figure 10.11 Two-dimensional parity-check code

511 of 558

10.

Figure 10.11 Two-dimensional parity-check code

512 of 558

10.

Figure 10.11 Two-dimensional parity-check code

513 of 558

10.

Table 10.4 Hamming code C(7, 4) - n=7, k = 4

514 of 558

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

515 of 558

10.

Figure 10.12 The structure of the encoder and decoder for a Hamming code

516 of 558

10.

Table 10.5 Logical decision made by the correction logic analyzer

517 of 558

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

518 of 558

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)

519 of 558

Burst Errors

  • Burst errors are very common, in particular in wireless environments where a fade will affect a group of bits in transit. The length of the burst is dependent on the duration of the fade.
  • One way to counter burst errors, is to break up a transmission into shorter words and create a block (one word per row), then have a parity check per word.
  • The words are then sent column by column. When a burst error occurs, it will affect 1 bit in several words as the transmission is read back into the block format and each word is checked individually.

520 of 558

10.

Figure 10.13 Burst error correction using Hamming code

521 of 558

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:

522 of 558

10.

Table 10.6 A CRC code with C(7, 4)

523 of 558

10.

Figure 10.14 CRC encoder and decoder

524 of 558

10.

Figure 10.15 Division in CRC encoder

525 of 558

10.

Figure 10.16 Division in the CRC decoder for two cases

526 of 558

10.

Figure 10.17 Hardwired design of the divisor in CRC

527 of 558

10.

Figure 10.18 Simulation of division in CRC encoder

528 of 558

10.

Figure 10.19 The CRC encoder design using shift registers

529 of 558

10.

Figure 10.20 General design of encoder and decoder of a CRC code

530 of 558

Using Polynomials

  • We can use a polynomial to represent a binary word.
  • Each bit from right to left is mapped onto a power term.
  • The rightmost bit represents the “0” power term. The bit next to it the “1” power term, etc.
  • If the bit is of value zero, the power term is deleted from the expression.

531 of 558

10.

Figure 10.21 A polynomial to represent a binary word

532 of 558

10.

Figure 10.22 CRC division using polynomials

533 of 558

10.

The divisor in a cyclic code is normally called the generator polynomial

or simply the generator.

Note

534 of 558

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

535 of 558

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

536 of 558

10.

If the generator has more than one term and the coefficient of x0 is 1, �all single errors can be caught.

Note

537 of 558

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

538 of 558

10.

Figure 10.23 Representation of two isolated single-bit errors using polynomials

539 of 558

10.

If a generator cannot divide xt + 1 �(t between 0 and n – 1),

then all isolated double errors �can be detected.

Note

540 of 558

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

541 of 558

10.

A generator that contains a factor of �x + 1 can detect all odd-numbered errors.

Note

542 of 558

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

543 of 558

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

544 of 558

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)

545 of 558

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

546 of 558

10.

Table 10.7 Standard polynomials

547 of 558

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:

548 of 558

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

549 of 558

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

550 of 558

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

551 of 558

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

552 of 558

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

553 of 558

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)

554 of 558

10.

Figure 10.24 Example 10.22

555 of 558

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

556 of 558

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

557 of 558

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

558 of 558

10.

Figure 10.25 Example 10.23