Lecture 5 - Signal Encoding Techniques

Updated 4 Oct 2026

Signal Encoding Techniques

คือแปลงเพื่อให้ Data travel through that signal system ได้

Digital Data, Digital Signal

Digital Signal Characteristics

  • Digital signal: discrete, discontinuous voltage pulses
  • Each pulse is a signal element
  • Binary data encoded into signal elements

ไม่จำเป็น 1 ต้องเป็น +5 Volts มันแล้วแต่เราเลยล่ะ

อย่างที่เคย Discuss ใน Lecture 3 - Data Transmission มั้ง ว่าถ้าอยากให้ส่งข้อมูลมากขึ้นก็แค่ ส่งข้อมูลใน 1 signal มากขึ้น 11 01 ไรงี้??

Interpreting Signals

Need to know:

  • Timing of bits - when they start and end
  • Signal levels

Factors affecting signal interpretation:

  • Signal to noise ratio
  • Data rate
  • Bandwidth
  • Encoding scheme

Encoding and Modulating Types

Four Main Conversion Types

  • Digital-to-digital conversion: encoding digital data into digital signal
  • Analog-to-digital conversion: digitizing analog signal
  • Digital-to-analog conversion: modulating a digital signal
  • Analog-to-analog conversion: modulating analog signal

Encoding Process

Definition

  • Coding: process of embedding clocks into a given data stream and producing a signal that can be transmitted over a selected medium

Coding = Insert extra information into data signal (with some technique)

Responsibilities

  • Transmitter: responsible for "encoding"
    • Inserting clocks into data according to a selected coding scheme
  • Receiver: responsible for "decoding"
    • Separating clocks and data from the incoming embedded stream

Key Points

  • Systems that use coding are synchronous systems
  • Must encode data into signals to send them from one place to another
  • Signal needs identifiable changes recognizable to sender and receiver
  • Information must be translated into agreed patterns of 0s and 1s
    • Text translated into ASCII or EBCDIC character codes

Digital-to-Digital Encoding

Overview

  • Binary signals created by computer are translated into voltage pulses
  • Binary signals have two basic parameters: amplitude and duration
  • As bits sent per unit time increases, bit duration decreases

Three Common Methods

  1. Unipolar
  2. Polar
  3. Bipolar

Unipolar Encoding

Characteristics

  • Simplest and most primitive type of encoding
  • One voltage level stands for binary 0, another for binary 1
  • Polarity: refers to positive or negative pulse
  • Uses only one polarity, usually encoding only the 1

ก็คือเรา define ว่าสัญญาณแบบนี้เป็น 1 นะ แล้วเดี๋ยวอะไรที่ไม่ใช่ ไม่ตรง มันก็จะเป็น 0 เอง
Unipolar encoding uses only one voltage level. → To either represent bit zero or one

Problems with Unipolar

  1. DC Component
    • Average amplitude of unipolar encoded signal is nonzero
    • Creates direct current (DC component) that shifts zero level
    • Cannot travel through some media (e.g., microwave)
  2. Synchronization
    • Change in voltage for each bit indicates changes in bit type
    • Long strings of zeros and ones produce no transitions
    • May create problems in error detection and recovery

Polar Encoding

Characteristics

  • Uses two levels (positive and negative) of amplitude
  • Eliminates some DC residual problem
  • Average voltage level on line is reduced
  • Power to transmit is half that of unipolar signal

Types of Polar Encoding

Non-return to Zero (NRZ)

General Properties
  • Signal never returns to zero voltage
  • Value during bit time is a level voltage
  • Good for short and well-shielded transmission paths
NRZ-Level (NRZ-L)
  • Level of signal is dependent upon state of the bit
  • Signal is always positive or negative

In NRZ-L the level of the signal is dependent upon the state of the bit.

NRZ-Inverted (NRZ-I)
  • "Invert on ones"
  • Transition between positive and negative voltage represents a 1 bit
  • Provides more synchronization than NRZ-L
  • Signal is inverted if a 1 is encountered

In NRZ-I the signal is inverted if a 1 is encountered. — ก็คือจะเปลี่ยนสัญญาณต่อเมื่อเจอ 1 แค่นั้น ถ้า 0 ก็คือ No changes

Return to Zero (RZ) Encoding

Characteristics
  • Solves problem of losing synchronization due to long strings of consecutive 1s or 0s
  • Signal change during each bit promotes synchronization
    • Positive voltage = 1
    • Negative voltage = 0
    • Signal returns to zero halfway through bit interval

Biphase Encoding

General Properties
  • Signal changes at middle of bit interval
  • Does not return to zero, goes to opposite pole
  • Good solution to synchronization problem
Two Types
  1. Manchester
  2. Differential Manchester
Manchester Encoding
Characteristics
  • Self-clocking code
  • Provides transition for every bit in middle of bit cell
  • Transition used only for clocking
  • +ve to -ve transition = "0" bit
  • -ve to +ve transition = "1" bit
  • Residual DC component eliminated by having both polarities for every bit
  • Used in Ethernet and IEEE 802.3 compliant LANs

อันนี้เปลี่ยนใหม่บ้าง เช่น เปลี่ยนจาก + ไป - อันนี้จะ represent ด้วย 0 ไรงี้

Differential Manchester Encoding
Characteristics
  • Self-clocking code
  • Transition for every bit in middle of bit cell
  • Transition at beginning of bit cell if next bit is "0"
  • NO transition at beginning of bit cell if next bit is "1"
  • Used in Token Ring or IEEE 802.5 compliant LANs
  • Transition at middle used only for synchronization
  • Bit representation defined by inversion or non-inversion at beginning of bit

Read This & Got It


ก็คือตรงหน้าสัญญาณก็ต้องมีการเปลี่ยนแปลงของสัญญาณด้วย แต่การเปลี่ยนแปลงก็จะเหมือนข้างบน Manchester ธรรมดา ๆ +

Homework Exercise

Given binary data: 0101 1101 0011 1010

Encode using following techniques:

  1. Unipolar Encoding (+5 volt represent value 1)
  2. Polar Encoding:
    • NRZ-L
    • NRZ-I
    • Manchester
    • Differential Manchester

Analog-to-Digital Encoding

Challenge

  • Transform potentially infinite values in analog message to digital without losing data
  • Example: voice on CD

Pulse Amplitude Modulation (PAM)

Reread the value of the voltage at some discrete point, then it’ll changes to digital (0s or 1s) based on the amplitude ไงล่ะ

  • Samples the analog message and generates pulses based on sampling
  • Sampling: measures amplitude of signal at equal intervals

Pulse Code Modulation (PCM)

ในการจะ Convert เป็น Digital ได้ ต้องใช้ PAM + PCM ด้วยนะ

  • Uses 3-4 processes to create digital signal:
    1. PAM (sampling)
    2. Quantization (discrete amplitudes +/- value)
    3. Binary encoding
    4. Digital-to-digital encoding

Key Points about PCM

  • Sampling method used to digitize voice in T-line transmission
  • Used in North American telecommunications system (codecs)
  • PCM sampling rate: twice the highest frequency of original signal
  • Ensures accurate reproduction of original analog signal using PAM
  • Based on Nyquist Theorem


Digital-to-Analog Encoding

  • Used in transmitting data from computer to computer across public access phone line

Bit Rate and Baud Rate

  • Bit rate: number of bits transmitted per second
    • always ≥ baud rate
  • Baud rate: number of signal units per second required to send those bits

Formula

Bit rate=Baud rate×No. of bits per signal element\boxed{\text{Bit rate} = \text{Baud rate} \times \text{No. of bits per signal element}}

Carrier Signal

  • High-frequency signal that acts as basis for information signal (by sender)
  • Digital information encoded by modulating signal's:
    • Amplitude
    • Frequency
    • Phase

Examples

Example 1

Problem: Analog signal carries 4 bits in each signal unit. If 1000 signal units are sent per second, find baud rate and bit rate.

Solution:

  • Baud rate = 1000 bauds per second (baud/s)
  • Bit rate = 1000×4=40001000 \times 4 = 4000 bps

Example 2

Problem: Bit rate of signal is 3000. If each signal unit carries 6 bits, what is baud rate?

Solution:

  • Baud rate = 3000 ÷ 6 = 500 baud/s

Amplitude Shift Keying (ASK)

Characteristics

  • Amplitude is varied to represent binary signals (1 or 0)
  • Keying: means turning transmitter on and off
  • Highly susceptible to noise interference
  • Noise: random electrical signals (voltages) that generate transmission errors
    • Introduced by heat from circuit components or natural disturbances

Bandwidth Relationship

  • Minimum bandwidth for ASK signal equals its baud rate
  • In ASK: baud rate = bit rate = bandwidth

Examples

Example 3

Problem: Find minimum bandwidth for ASK signal transmitting at 2000 bps. Transmission mode is half-duplex.

Solution:

  • In ASK: baud rate = bit rate = 2000
  • Minimum bandwidth = 2000 Hz

Example 4

Problem: Given bandwidth of 5000 Hz for ASK signal, what are baud rate and bit rate?

Solution:

  • Baud rate = bandwidth = 5000
  • Bit rate = 5000 bps

Frequency Shift Keying (FSK)

Characteristics

  • Frequency is varied to represent binary 1 or 0
  • Noise interference not a problem
  • Looks for frequency changes, doesn't care about voltage spikes

Phase Shift Keying (PSK)

Characteristics

  • Phase is varied to represent binary 1 or 0
  • Limited by equipment's ability to detect small phase differences
  • This limits its potential bit rate

Quadrature Amplitude Modulation (QAM)

Characteristics

  • Combines ASK and PSK for maximum contrast between bits
  • Works with: bit, dibit (one-pair), quadbit (two-pair), etc.
  • Theoretically: any measurable amplitude changes can combine with any measurable phase changes
  • Uses more phase shifts than amplitude shifts to reduce noise susceptibility


Bit and Baud


Analog-to-Analog Encoding

Three Methods

  1. Amplitude Modulation (AM)
  2. Frequency Modulation (FM)
  3. Phase Modulation (PM)

Amplitude Modulation (AM)

Characteristics

  • Carrier signal modulated so amplitude varies with changing amplitude of signal
  • Bandwidth: equal to twice the bandwidth of modulating signal

  • Covers range centered around carrier frequency
  • AM radio stations: need minimum bandwidth of 10 KHz

Example

Problem: Audio signal with bandwidth of 4 KHz. What bandwidth needed for AM modulation? (Ignore FCC regulations)

Solution:

  • AM signal requires twice the bandwidth of original signal
  • BW = 2×42\times 4 KHz = 8 KHz

Frequency Modulation (FM)

Characteristics

  • Frequency of carrier signal modulated to follow changing voltage level of modulating signal
  • Bandwidth: equal to 10 times the bandwidth of modulating signal

  • FM station: needs bandwidth of 200 KHz (0.2 MHz)

Note

  • Bandwidth of stereo audio signal usually 15 KHz
  • FM station needs at least 150 KHz bandwidth
  • FCC requires minimum bandwidth of at least 200 KHz (0.2 MHz)

Example

Problem: Audio signal with bandwidth of 4 MHz. What bandwidth needed for FM modulation? (Ignore FCC regulations)

Solution:

  • FM signal requires 10 times bandwidth of original signal
  • BW = 10 × 4 MHz = 40 MHz

Phase Modulation (PM)

Characteristics

  • Phase of carrier signal modulated to follow changing voltage level of modulating signal
  • Used as alternative to frequency modulation

Additional Exercises

Exercise 1

Problem: Analog signal carries 16 bits in each signal unit and each signal unit takes 0.2 second for transmission time. Find baud rate and bit rate.

Answer:

  • 5 signal units can be sent in 1 second
  • Baud rate = 5
  • Bit rate = 16 × 5 = 80 bps

Exercise 2

Problem: Given bandwidth of 2000 Hz for ASK signal, what are baud rate and bit rate?

Answer:

  • For ASK: Bandwidth = Baud rate = Bit rate = 2000 bps

Exercise 3

Problem: Given original audio signal with 25 MHz, what is total bandwidth for FM signal transmission?

Answer:

  • Bandwidth of FM signal is 10 times the original signal
  • Therefore, requires 250 MHz for FM transmission