PadhaikoAll subjects

Introduction

Data Communication (ENCT 253)

Open in the Padhaiko app

1.1 Analog Data Communication, Data Representation, and Data Flows

Data communication is the exchange of data between two or more devices across a transmission medium (wired or wireless) governed by an agreed set of rules called a protocol. Five components form any data communication link: message (information to send), sender, receiver, transmission medium, and protocol.

Definition

Data, Information, Signal, and Communication

Data Representation

Modern networks encode heterogeneous media into binary bit streams so that a single digital infrastructure can store, route, and process all information types uniformly.

Standard Data Representation Formats
Data TypeUnderlying RepresentationTypical Encoding / Standards
TextSequence of bit patterns (code points) mapping characters to integersASCII (-bit / -bit), UTF-8, UTF-16 (Unicode)
NumbersDirect binary positional conversion (not character-by-character ASCII)Unsigned/Two's complement integers, IEEE 754 floating-point
ImagesMatrix of picture elements (pixels) or geometric primitives (vector)Monochrome (), Grayscale (), RGB (); PNG, JPEG
AudioContinuous acoustic wave sampled at discrete intervals and quantizedPCM ( voice, CD), MP3, AAC
VideoRapid sequence of image frames (–) synchronized with audioH.264/AVC, H.265/HEVC, MPEG-4

Analog vs. Digital Communication

In analog communication, information is transmitted as a continuous waveform whose amplitude, frequency, or phase varies smoothly with the message. In digital communication, information is mapped to discrete symbols (typically binary bits) before transmission.

AspectAnalog CommunicationDigital Communication
Signal NatureContinuous amplitude and continuous time (e.g., sinusoidal carriers)Discrete states/levels representing bits ( and )
Noise & Distortion ImmunityPoor; noise adds cumulatively and cannot be separated from the signal at repeatersHigh; regenerative repeaters reconstruct clean pulses and eliminate accumulated noise
Error ControlNo built-in error detection or correctionSupports parity, CRC, Hamming, and forward error correction (FEC)
Bandwidth RequirementRelatively low for raw voice/videoHigher raw bandwidth, offset by source compression and TDM
Power & HardwareHigher transmit power; precision analog filters and linear amplifiersLower transmit power; inexpensive, reliable VLSI digital hardware
Security & StorageDifficult to encrypt or store without degradationEasy encryption, multiplexing, multimedia integration, and lossless storage

Data Flows (Transmission Modes)

The directionality of signal flow between two connected stations determines the transmission mode.

Data Flow Modes Between Two Stations
ModeDirectionalityChannel AllocationPractical Examples
SimplexUnidirectional only; one station always transmits, the other always receivesEntire channel capacity dedicated to one directionKeyboard-to-CPU, commercial FM radio, television broadcast
Half-DuplexBidirectional, but only one station transmits at a timeFull channel capacity alternates between the two directionsWalkie-talkie (push-to-talk), citizen-band radio, early Ethernet hubs
Full-DuplexBidirectional simultaneouslyCapacity is split into two sub-channels or uses two separate physical pathsTelephone voice call, switched Gigabit Ethernet, cellular LTE/5G links

1.2 Evolution of Data Communication

Data communication evolved from mechanical signaling over single copper wires to global, packet-switched optical and wireless networks.

Key Milestones in the Evolution of Data Communication
EraMilestone / TechnologySignificance
1830s–1840sElectrical Telegraph (Samuel Morse)First practical electrical transmission of discrete text symbols (dots and dashes) over wire.
1876Telephone (Alexander Graham Bell)Enabled real-time analog voice transmission over the Public Switched Telephone Network (PSTN).
1890s–1920sWireless Radio & BroadcastGuglielmo Marconi demonstrated long-distance radio telegraphy; AM/FM broadcasting followed.
1950s–1960sMainframes, Modems & SAGEEarly digital terminals communicated with central computers over voice lines using modems.
1969ARPANET & Packet SwitchingIntroduced store-and-forward packet switching; evolved into the global Internet with TCP/IP ().
1970s–1980sEthernet LAN & OSI StandardizationBob Metcalfe's Ethernet enabled local office networking; ISO published the -layer OSI model ().
1990s–2000sWorld Wide Web, Fiber Optics & BroadbandSingle-mode optical fiber, ADSL, and IEEE Wi-Fi brought megabit speeds to homes and offices.
2010s–Present, Cloud & IoTMulti-gigabit mobile broadband, software-defined networking (SDN), cloud data centers, and billions of IoT endpoints.

1.3 Communication Model and Data Communication Model

Generic Communication Model

Every communication system—analog or digital—can be abstracted into five functional stages:

Generic Five-Stage Communication ModelText
[Source] ---> [Transmitter] ---> [Transmission System / Channel] ---> [Receiver] ---> [Destination]
  (Data)      (Signal Encoder/        (Guided or Unguided Medium;         (Decoder/       (Recovered
                Modulator)             adds Noise & Attenuation)          Demodulator)      Data)

Data Communication System Models

In practice, digital and analog transmitters differ in how they condition the signal before launching it onto the channel.

Definition

Functional Blocks of a Digital Communication System

  1. Input Transducer: Converts a non-electrical physical quantity (sound, light, temperature) into an electrical analog signal (e.g., a microphone).
  2. Analog-to-Digital Converter (ADC): Samples the electrical analog signal at discrete time intervals and quantizes amplitudes into binary digits.
  3. Source Encoder: Compresses the binary stream by removing statistical redundancy to save bandwidth and storage (e.g., JPEG for images, MP3 for audio).
  4. Channel Encoder: Adds controlled redundancy (parity bits, CRC, Hamming, or block codes) so the receiver can detect or correct channel errors.
  5. Line Encoder: Maps binary data to baseband voltage pulses suited to the physical cable (e.g., NRZ, AMI, Manchester).
  6. Multiplexer (MUX): Combines multiple independent streams onto one shared physical channel (e.g., TDM, FDM, WDM).
  7. Modulator: Impresses the signal onto a high-frequency sinusoidal carrier by varying amplitude, frequency, or phase (ASK, FSK, PSK, QAM) for bandpass or wireless transmission.

At the receiving side of a half-duplex link, each stage is reversed in exact mirror order (Demodulator Demultiplexer Line Decoder Channel Decoder Source Decoder DAC Output Transducer). In a full-duplex system, each endpoint contains both a complete transmit chain and a complete receive chain operating simultaneously.

Half-Duplex Digital Communication System Block DiagramText
Physical   +------------+   +-----+   +--------+   +---------+   +------+   +-----+   +---------+
Input  --> |   Input    |-->| ADC |-->| Source |-->| Channel |-->| Line |-->| MUX |-->|Modulator|
           | Transducer |   +-----+   |Encoder |   | Encoder |   |Encod.|   +-----+   +---------+
           +------------+             +--------+   +---------+   +------+                  |
                                                                                           v
                                                                                   [Channel + Noise]
                                                                                           |
Physical   +------------+   +-----+   +--------+   +---------+   +------+   +-----+   +---------+
Output <-- |   Output   |<--| DAC |<--| Source |<--| Channel |<--| Line |<--|DEMUX|<--|Demodul. |
           | Transducer |   +-----+   |Decoder |   | Decoder |   |Decod.|   +-----+   +---------+
           +------------+             +--------+   +---------+   +------+

An analog communication system omits ADC, source coding, channel coding, and line coding. Its transmitter consists of Input Transducer Multiplexer (FDM) Modulator (AM, FM, or PM), and its receiver reverses those three blocks (Demodulator Demultiplexer Output Transducer).


1.4 Networks, Simplified Network Architecture, and the OSI Model

Network Classifications (LAN, MAN, WAN)

Computer networks are classified primarily by geographic span, ownership, and underlying transmission technology.

Comparison of LAN, MAN, and WAN
CharacteristicLocal Area Network (LAN)Metropolitan Area Network (MAN)Wide Area Network (WAN)
Geographic SpanSingle room, building, or campus ()City or metropolitan area ()Region, country, or globe ()
OwnershipPrivate (organization, university, home)Telecom operator, municipality, or consortiumPublic telecom carriers, ISPs, or leased enterprise backbones
Data Rate & DelayVery high ( to ); ultra-low latencyHigh ( to ); moderate latencyLower per-user bandwidth; higher propagation & queuing delay
TechnologiesSwitched Ethernet (IEEE ), Wi-Fi (IEEE )Metro Ethernet, FDDI, DOCSIS cable, fiber ringsMPLS, optical DWDM backbones, submarine cables, satellite

Simplified Network Architecture and Protocol Layering

Because end-to-end communication involves physical signaling, framing, routing across intermediate hops, and application formatting simultaneously, networks use a layered architecture. Each layer provides well-defined services to the layer above it while hiding implementation details of the layers below. As data moves down the sender's stack, each layer attaches its own control header (encapsulation); the receiver strips those headers layer by layer (decapsulation).

The Seven-Layer OSI Model

Developed by the International Organization for Standardization (ISO), the Open Systems Interconnection (OSI) model partitions network communication into seven standardized layers.

The Seven Layers of the OSI Reference Model
LayerNamePDUCore ResponsibilitiesExample Protocols / Devices
7ApplicationDataUser-facing network services (file transfer, web, email)HTTP, HTTPS, FTP, SMTP, DNS
6PresentationDataSyntax translation, character encoding, encryption, compressionSSL/TLS, JPEG, MPEG, ASCII
5SessionDataDialog control (half/full-duplex), session establishment, checkpointsNetBIOS, RPC, SQL sessions
4TransportSegmentProcess-to-process delivery, port addressing, flow & error controlTCP, UDP
3NetworkPacketLogical addressing (IP), path determination (routing) across networksIPv4, IPv6, ICMP, Routers
2Data LinkFrameNode-to-node framing, physical (MAC) addressing, error detection, media accessEthernet, PPP, Switches
1PhysicalBitsRaw bit transmission as electrical, optical, or radio signals; connectors, bit rateUTP, Fiber, Hubs, Repeaters

Connection-Oriented vs. Connectionless Protocols (TCP vs. UDP)

At the Transport layer (Layer 4), applications choose between reliable connection-oriented delivery and lightweight connectionless delivery.

AspectConnection-Oriented (TCP)Connectionless (UDP)
Connection SetupRequires -way handshake (SYN, SYN-ACK, ACK) before data transferNo handshake; sends datagrams immediately
Reliability & OrderingGuarantees in-order, error-free delivery via ACKs and retransmissionsBest-effort delivery; packets may arrive out of order or be dropped
Flow & Congestion ControlBuilt-in sliding window and congestion controlNone at transport layer
Header Overhead & Latency-byte minimum header; higher latency-byte header; minimal latency
Typical ApplicationsWeb browsing (HTTP/HTTPS), file transfer (FTP), email (SMTP)Live video/VoIP, online gaming, DNS queries, DHCP

1.5 Data Communication and Networking for Today's Enterprise

Modern enterprises integrate high-speed wired backbones, dense wireless access, IoT telemetry, and distributed computing platforms into a unified communication fabric.

  1. Wired and Wireless Enterprise Frameworks: Campus backbones rely on Gigabit/ switched Ethernet with Virtual LANs (VLANs) for traffic segmentation, paired with enterprise Wi-Fi ( / Wi-Fi 6) and Software-Defined WAN (SD-WAN) over fiber/MPLS to connect branch offices securely via VPNs.
  2. Internet of Things (IoT) Communication: Billions of embedded sensors, smart meters, and industrial controllers transmit periodic telemetry over low-power wireless links (BLE, Zigbee, LoRaWAN, NB-IoT, Wi-Fi) through edge gateways using lightweight protocols such as MQTT and CoAP.
  3. Enterprise Data Computing Models: Enterprises match computing placement to latency, bandwidth, and scalability requirements.
Data Computing Models in Modern Enterprises
Computing ModelArchitecturePrimary AdvantageRepresentative Use Case
Centralized / On-PremisesSingle corporate data center hosts servers and storageFull physical control over hardware and sensitive recordsInternal banking core, local ERP databases
Cloud ComputingElastic virtualized compute and storage over WAN (IaaS, PaaS, SaaS)On-demand scalability, pay-per-use, global availabilityEnterprise SaaS apps, large-scale data analytics
Edge & Fog ComputingCompute nodes placed near data sources (factory floor, cell tower, gateway)Ultra-low latency, reduced WAN backhaul bandwidthAutonomous vehicles, real-time industrial robotics, smart cameras
Distributed / HybridWorkloads split across on-premises servers, edge nodes, and public cloudsBalances regulatory compliance, latency, and cloud elasticityMulti-branch retail POS synced with cloud inventory

Worked Examples

Example 1

1

A microphone captures human speech and feeds a Digital Communication System. The ADC samples the speech at with bits per sample, and the source encoder achieves an compression ratio. If a channel encoder then adds redundancy (rate ), determine:

  1. The raw digital bit rate leaving the ADC.
  2. The compressed bit rate leaving the source encoder.
  3. The final coded bit rate entering the line encoder.

Raw bit rate leaving the ADC: Each second produces samples, and each sample is quantized into bits:

Compressed bit rate leaving the source encoder: With an lossless/lossy compression ratio, the source encoder reduces the bit rate by a factor of :

Coded bit rate entering the line encoder: Adding parity/FEC redundancy (coding rate ) multiplies the compressed bit rate by :

Answer:
  1. ADC output rate:
  2. Source encoder output rate:
  3. Channel encoder output rate:
Example 2

2

Classify each communication scenario by (a) data flow mode, (b) network type (LAN/MAN/WAN), and (c) preferred transport protocol (TCP or UDP), justifying each choice briefly:

  1. Live multicast video monitoring from IP cameras inside a university campus building to the security server room.
  2. Two-way voice dispatch between field engineers using push-to-talk radios across a city.
  3. Automated nightly encrypted backup of patient records from a Kathmandu clinic to a cloud data center in Singapore.

Scenario 1 (Campus IP camera streaming):

  • Data flow mode: Primarily Simplex (video flows one way from camera to NVR server, though control commands use separate half/full-duplex channels).
  • Network type: LAN (confined within a single campus building).
  • Transport protocol: UDP (real-time video tolerates occasional packet loss better than TCP retransmission delays).

Scenario 2 (City-wide push-to-talk dispatch):

  • Data flow mode: Half-Duplex (both stations can transmit and receive, but only one speaks while holding the PTT button).
  • Network type: MAN (spans an entire city/metropolitan area).
  • Transport protocol: UDP (if carried over IP/VoIP dispatch, real-time voice demands minimal latency without TCP handshake or retransmission stalls).

Scenario 3 (Kathmandu-to-Singapore encrypted database backup):

  • Data flow mode: Full-Duplex (data chunks stream to Singapore while TLS handshakes and TCP acknowledgments return simultaneously).
  • Network type: WAN (cross-continental link spanning thousands of kilometers).
  • Transport protocol: TCP (database backups require bit-accurate, in-order delivery).
Answer:
  1. Simplex · LAN · UDP
  2. Half-Duplex · MAN · UDP
  3. Full-Duplex · WAN · TCP
Example 3

3

An application generates a message and sends it over a TCP/IP-over-Ethernet stack. Suppose the Transport layer adds a TCP header, the Network layer adds a IPv4 header, and the Data Link layer adds an Ethernet header and trailer ( header FCS). Calculate the total frame size at Layer 2 and the protocol transmission efficiency.

Encapsulate the payload down the stack:

  • Transport Layer (Segment):
  • Network Layer (Packet):
  • Data Link Layer (Frame):

Compute protocol efficiency:

Answer:

Total Layer-2 frame size is , and protocol transmission efficiency is .


Exercises

Exercises

Question 1

Distinguish between analog data and digital data, and explain the three data flow modes (simplex, half-duplex, and full-duplex) with one real-world example of each.

Analog vs. digital data:

  • Analog data varies continuously over time and can take an infinite number of intermediate values (e.g., human speech acoustic pressure or an analog thermometer reading).
  • Digital data consists of discrete states or symbols drawn from a finite alphabet (e.g., text characters stored as ASCII bytes or binary bits and ).

Data flow modes:

  1. Simplex: Data travels in only one fixed direction; one device is strictly a transmitter and the other is strictly a receiver (e.g., a keyboard sending keystrokes to a computer, or FM radio broadcasting).
  2. Half-Duplex: Both devices can transmit and receive, but not simultaneously; the channel alternates direction (e.g., walkie-talkies).
  3. Full-Duplex: Both devices transmit and receive simultaneously over shared or separate paths (e.g., a telephone conversation or switched Ethernet).
Answer:

Analog data is continuous whereas digital data is discrete. Data flows are simplex (one-way, e.g., TV broadcast), half-duplex (two-way alternating, e.g., walkie-talkie), and full-duplex (two-way simultaneous, e.g., telephone call).

Question 2

Draw a clean functional block diagram of a full-duplex digital communication system and explain the specific roles of the ADC, Source Encoder, Channel Encoder, and Line Encoder.

Block diagram of a full-duplex digital communication system: Each transceiver contains both an independent transmit path and an independent receive path:

Full-Duplex Digital Transceiver PairText
Station A                                                                            Station B
[Mic/Sensor] -> [ADC -> Src Enc -> Ch Enc -> Line Enc -> MUX -> Mod] ==(Tx A->B)==> [Demod -> DEMUX -> Line Dec -> Ch Dec -> Src Dec -> DAC] -> [Speaker]
[Speaker]    <- [DAC <- Src Dec <- Ch Dec <- Line Dec <- DEMUX <- Demod] <==(Tx B->A)== [Mod <- MUX <- Line Enc <- Ch Enc <- Src Enc <- ADC] <- [Mic/Sensor]

Roles of the four specified blocks:

  • ADC (Analog-to-Digital Converter): Samples continuous electrical signals from the input transducer and quantizes each sample into binary bits.
  • Source Encoder: Removes statistical redundancy (data compression) to minimize the number of bits required per unit time (e.g., MP3, JPEG).
  • Channel Encoder: Introduces controlled redundant bits (parity, CRC, or FEC) so the receiver can detect and/or correct bit errors caused by channel noise.
  • Line Encoder: Converts abstract binary s and s into physical voltage waveforms (e.g., NRZ, Manchester, AMI) suitable for baseband transmission.
Answer:

A full-duplex digital transceiver pairs complete transmit and receive chains at each end; the ADC digitizes analog inputs, the Source Encoder compresses redundancy, the Channel Encoder adds error-control redundancy, and the Line Encoder formats bits into physical line waveforms.

Question 3

Why has digital communication largely replaced analog communication in modern enterprise and telecom networks? List any five advantages of digital over analog communication.

Key advantages of digital communication:

  1. Superior Noise Immunity: Threshold detection distinguishes and accurately even in moderate noise, and regenerative repeaters remove accumulated noise at each hop.
  2. Error Detection and Correction: Channel coding (CRC, Hamming, FEC) enables reliable recovery from channel bit errors.
  3. Bandwidth Efficiency via Compression & Multiplexing: Digital data supports lossless/lossy source compression and tight Time Division Multiplexing (TDM).
  4. Built-in Security: Cryptographic algorithms (AES, TLS) and authentication apply directly to bit streams.
  5. Hardware Integration & Lossless Storage: Compatible with VLSI processors, software-defined switches, and error-free disk/memory archiving.
Answer:

Digital communication provides higher noise immunity with regenerative repeaters, built-in error detection/correction, efficient compression and multiplexing, straightforward encryption, and seamless integration with digital computers and storage.

Question 4

List the seven layers of the OSI reference model in order from Layer 1 to Layer 7, stating the Protocol Data Unit (PDU) and primary responsibility of each layer.

OSI layers from bottom (Layer 1) to top (Layer 7):

  1. Layer 1 — Physical (PDU: Bits): Electrical/optical/radio signaling, bit synchronization, connectors, and physical topology.
  2. Layer 2 — Data Link (PDU: Frame): Framing, MAC addressing, error detection (FCS/CRC), and media access control.
  3. Layer 3 — Network (PDU: Packet): Logical addressing (IP) and routing packets across interconnected networks.
  4. Layer 4 — Transport (PDU: Segment): End-to-end process delivery via port numbers, segmentation, flow control, and reliability (TCP/UDP).
  5. Layer 5 — Session (PDU: Data): Establishing, managing, synchronizing, and terminating communication sessions.
  6. Layer 6 — Presentation (PDU: Data): Data syntax conversion, character encoding, compression, and encryption/decryption.
  7. Layer 7 — Application (PDU: Data): Providing network interfaces and services directly to user applications (HTTP, DNS, SMTP, FTP).
Answer:

From Layer 1 to Layer 7: Physical (Bits), Data Link (Frame), Network (Packet), Transport (Segment), Session (Data), Presentation (Data), and Application (Data).

Question 5

A real-time VoIP application sends audio payloads using UDP ( header) over IPv4 ( header) and Ethernet ( total framing overhead). Why is UDP chosen instead of TCP for VoIP, and what is the resulting Layer-2 frame size and payload efficiency?

Why UDP is preferred over TCP for VoIP: Real-time voice cannot wait for TCP's -way handshake or retransmission of lost packets, which would cause audible stalls and jitter. UDP offers minimal overhead and immediate transmission; an occasional dropped voice packet is less disruptive than delayed audio.

Layer-2 frame size and efficiency calculation:

Answer:

UDP avoids handshake and retransmission delays critical to real-time voice; the Layer-2 frame size is with payload efficiency.

Question 6

Distinguish between LAN, MAN, and WAN, and explain how Cloud Computing and Edge Computing work together in an enterprise IoT deployment.

LAN vs. MAN vs. WAN:

  • LAN: Covers a local room, building, or campus (), privately owned, offering high speeds (–) with Ethernet/Wi-Fi.
  • MAN: Spans a city or metropolitan region (–), interconnecting multiple LANs via metro fiber rings or cable infrastructure.
  • WAN: Covers countries or continents (), interconnecting LANs/MANs over ISP backbones, MPLS, optical fiber, or satellite links.

Cloud vs. Edge Computing in enterprise IoT:

  • Edge Computing processes time-critical sensor data locally at gateways or on-site servers (yielding millisecond latency and filtering redundant raw telemetry before sending it over the WAN).
  • Cloud Computing aggregates historical and multi-site summaries in scalable data centers for long-term storage, enterprise dashboards, and machine-learning model training.
Answer:

LAN, MAN, and WAN differ by geographic scale (building, city, global). In enterprise IoT, Edge Computing handles low-latency local control and filtering while Cloud Computing provides scalable long-term analytics and centralized management.

Past exam questions for Data Communication

Data Communication Fundamentals →