๐Ÿ–ผ๏ธChapter 5 cover
Nepal Engineering Council ยท Registration ExaminationAItE ยท Ch 5
โ† Back to AItE Syllabus
5

Chapter 5

Data Communication, Computer Network and Organization

AITE05ยท6 Sub-topicsยท60 MCQs
๐ŸŽฏ Read MCQs Mode
5.1

Computer Networks, Physical and Data Link Layer

AItE0501
1
The OSI Model has 7 layers: Physical (bits, cables) โ†’ Data Link (frames, MAC) โ†’ Network (packets, IP) โ†’ Transport (segments, TCP/UDP) โ†’ Session โ†’ Presentation โ†’ Application.
2
The TCP/IP Model has 4 layers: Network Access (Physical + Data Link), Internet (Network), Transport, Application (Session + Presentation + Application).
3
Network devices by OSI layer: Hub = Layer 1 (Physical โ€” broadcasts to all ports), Switch/Bridge = Layer 2 (Data Link โ€” forwards by MAC address), Router = Layer 3 (Network โ€” routes by IP address).
4
MAC Address (Media Access Control) is a 48-bit hardware address burned into NIC. Format: AA:BB:CC:DD:EE:FF. Layer 2 switches forward frames based on MAC address tables.
5
ARP (Address Resolution Protocol) resolves IP addresses to MAC addresses on a local network. Host broadcasts an ARP request; the target responds with its MAC. ARP is a Layer 2/3 boundary protocol.
6
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is used in wired Ethernet (IEEE 802.3). Detects collisions after transmission begins, stops, and retransmits after a random backoff.
7
CSMA/CA (Collision Avoidance) is used in wireless networks (IEEE 802.11 Wi-Fi). Avoids collisions by waiting for channel to be clear and using RTS/CTS handshake. Collisions cannot be detected in wireless.
8
IEEE Standards: 802.3 = Ethernet (wired), 802.11 = Wi-Fi (wireless), 802.15 = Bluetooth, 802.16 = WiMAX.
9
Framing (Data Link Layer): adds header (destination MAC, source MAC) and trailer (CRC for error detection) to form a frame. CRC (Cyclic Redundancy Check) detects transmission errors.
10
Ethernet frame structure: Preamble (7B) | Start Frame Delimiter (1B) | Destination MAC (6B) | Source MAC (6B) | EtherType/Length (2B) | Data (46-1500B) | FCS/CRC (4B).
5.2

Network Layer and Transport Layer

AItE0502
1
IPv4 uses 32-bit addresses (e.g., 192.168.1.1), supporting ~4.3 billion addresses. IPv6 uses 128-bit addresses (e.g., 2001:db8::1), with a virtually unlimited address space.
2
IP Address Classes (classful): Class A: 1.0.0.0โ€“126.255.255.255 (first octet 1-126, /8 default), Class B: 128.0.0.0โ€“191.255.255.255 (128-191, /16), Class C: 192.0.0.0โ€“223.255.255.255 (192-223, /24), Class D: 224โ€“239 (multicast), Class E: 240โ€“255 (reserved/experimental).
3
Loopback address: 127.0.0.1 (localhost) โ€” used for testing local network stack. Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
4
Subnetting divides a network into smaller subnets using a subnet mask. CIDR notation: 192.168.1.0/24 means first 24 bits are network. Number of hosts = 2^(32-prefix) - 2.
5
Routing Protocols: RIP (Routing Information Protocol) โ€” distance-vector, metric = hop count, max 15 hops (16 = unreachable), uses Bellman-Ford. OSPF (Open Shortest Path First) โ€” link-state, uses Dijkstra's algorithm, no hop limit, scales better. BGP โ€” inter-AS (internet backbone).
6
TCP (Transmission Control Protocol): connection-oriented, reliable delivery, ordered segments, flow control (sliding window), congestion control. Used for HTTP, FTP, email.
7
UDP (User Datagram Protocol): connectionless, unreliable, no ordering guarantee, low overhead. Used for DNS, video streaming, VoIP, online gaming.
8
TCP 3-Way Handshake: SYN โ†’ SYN-ACK โ†’ ACK. Client sends SYN; server responds SYN-ACK; client confirms with ACK. Connection established. 4-way termination: FIN โ†’ ACK โ†’ FIN โ†’ ACK.
9
ICMP (Internet Control Message Protocol): used for error reporting and diagnostics. ping uses ICMP Echo Request/Reply. traceroute uses ICMP TTL Exceeded messages.
10
A socket is the combination of IP address + Port number, uniquely identifying a network endpoint. A connection is identified by (source IP, source port, destination IP, destination port) โ€” a 4-tuple.
5.3

Application Layer and Network Security

AItE0503
1
Well-known port numbers: HTTP=80, HTTPS=443, FTP=20 (data) / 21 (control), SSH=22, Telnet=23, SMTP=25, DNS=53, DHCP=67/68, POP3=110, IMAP=143.
2
DNS (Domain Name System) resolves domain names to IP addresses. Hierarchical: Root โ†’ TLD (.com, .np) โ†’ Authoritative name server. DNS uses UDP port 53 (TCP for zone transfers).
3
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP address, subnet mask, default gateway, and DNS server to hosts. DORA process: Discover โ†’ Offer โ†’ Request โ†’ Acknowledge.
4
Symmetric encryption uses the same key for encryption and decryption. Fast but key distribution is a problem. Examples: AES (Advanced Encryption Standard โ€” 128/192/256-bit keys), DES (56-bit, obsolete), 3DES.
5
Asymmetric encryption uses a public-private key pair. Encrypt with public key, decrypt with private key (or vice versa for signatures). Slow but solves key distribution. Examples: RSA, ECC, Diffie-Hellman (key exchange).
6
Digital Signature: sender encrypts message hash with private key; receiver verifies with sender's public key. Provides authentication + integrity + non-repudiation. If signature verifies, message is authentic.
7
PGP (Pretty Good Privacy) uses a combination of symmetric and asymmetric encryption for secure email. Uses the 'web of trust' model instead of a central CA.
8
VPN (Virtual Private Network) creates an encrypted tunnel over a public network. Protocols: IPsec (Network layer), SSL/TLS (Application layer), PPTP (deprecated). Provides confidentiality and integrity.
9
Firewall controls traffic based on rules (IP, port, protocol). Types: Packet filter (stateless, examines headers), Stateful inspection (tracks connection state), Application-layer firewall (deep packet inspection).
10
Common attacks: DDoS (Distributed Denial of Service โ€” overwhelm with traffic), Man-in-the-Middle (intercept communications), SQL Injection (malicious SQL in input), Phishing (fake websites/emails), ARP Spoofing (fake ARP replies).
5.4

Synchronization, Network Management and Socket Programming

AItE0504
1
Synchronous transmission sends data in continuous blocks with a shared clock. Efficient for large data transfers โ€” no per-character overhead. The sender and receiver clocks are synchronized.
2
Asynchronous transmission sends one character at a time framed by start and stop bits. No shared clock needed. Start bit (0) signals beginning; stop bit(s) (1) mark the end. Simple but adds per-character overhead.
3
ATM (Asynchronous Transfer Mode) uses fixed-size 53-byte cells (5-byte header + 48-byte payload). Designed for real-time traffic โ€” fixed cell size guarantees bounded latency. Used in WAN backbones.
4
Network evolution: X.25 (packet-switched, 1970s, low speed) โ†’ Frame Relay (faster, variable frames, 1980s) โ†’ ATM (fixed cells, QoS, 1990s) โ†’ MPLS (label switching, modern WAN).
5
Socket Programming: A socket is an endpoint for communication. In TCP: socket() โ†’ bind() โ†’ listen() โ†’ accept() (server); socket() โ†’ connect() (client). Both then use send()/recv(). close() terminates.
6
Server daemon is a background process that listens continuously for client connections on a well-known port. Examples: Apache httpd (port 80), sshd (port 22), mysqld (port 3306).
7
`select()` / `poll()` system calls enable I/O multiplexing โ€” monitoring multiple socket file descriptors simultaneously for readability/writability. Allows a single thread to handle multiple connections.
8
Network Management SNMP (Simple Network Management Protocol): manages network devices. Components: Manager (collects data), Agent (runs on device), MIB (Management Information Base โ€” database of device info). Uses UDP port 161/162.
9
Quality of Service (QoS) mechanisms prioritize traffic. Differentiated Services (DiffServ) marks packets; IntServ reserves bandwidth (RSVP). Important for real-time traffic like VoIP.
10
Network Address Translation (NAT) maps private IP addresses to a public IP. Allows multiple devices to share one public IP. Types: Static NAT (1:1), Dynamic NAT (pool), PAT/NAT Overload (many:1, most common in home routers).
5.5

Control Unit and Central Processing Unit

AItE0505
1
The CPU (Central Processing Unit) consists of: CU (Control Unit โ€” fetches and decodes instructions), ALU (Arithmetic Logic Unit โ€” performs arithmetic and logical operations), Registers (fast on-chip storage).
2
Instruction Cycle (fetch-decode-execute): Fetch (PC โ†’ MAR โ†’ memory โ†’ MDR โ†’ IR), Decode (CU decodes IR), Execute (ALU performs operation, result to register or memory).
3
Key CPU registers: PC (Program Counter โ€” address of next instruction), IR (Instruction Register โ€” current instruction), MAR (Memory Address Register), MDR (Memory Data Register), ACC (Accumulator).
4
Hardwired Control Unit: control signals generated by combinational logic circuits. Fast but inflexible โ€” changing instruction set requires redesigning hardware. Used in RISC processors.
5
Microprogrammed Control Unit: each machine instruction decoded into micro-operations stored in a control memory (microprogram store). Flexible โ€” can modify instruction set by changing microcode. Used in CISC processors.
6
RISC (Reduced Instruction Set Computer): simple, fixed-length instructions, large register set, load-store architecture (only load/store accesses memory), hardwired control. Examples: ARM, MIPS, RISC-V.
7
CISC (Complex Instruction Set Computer): complex, variable-length instructions, few registers, memory operands allowed, microprogrammed control. Examples: x86, x86-64 (Intel/AMD).
8
Pipelining overlaps execution of multiple instructions. Stages: IF โ†’ ID โ†’ EX โ†’ MEM โ†’ WB. Increases throughput. Pipeline hazards: Structural (resource conflict), Data (RAW, WAW, WAR dependencies), Control (branches).
9
Flynn's Taxonomy classifies computers by instruction and data streams: SISD (single CPU), SIMD (GPU, vector processing), MISD (rare), MIMD (multiprocessors, multicore, distributed).
10
System buses: Address bus (unidirectional โ€” CPU to memory), Data bus (bidirectional โ€” data transfer), Control bus (control signals โ€” read/write/interrupt). Bus width determines addressable memory and data transfer width.
5.6

Memory System and Input/Output Organization

AItE0506
1
Memory Hierarchy (fastest/smallest to slowest/largest): Registers โ†’ Cache (L1/L2/L3) โ†’ RAM (Main Memory) โ†’ Secondary Storage (SSD/HDD) โ†’ Tertiary (tape). Speed decreases, size and cost-per-bit decrease as you go down.
2
Cache Memory exploits temporal and spatial locality. Temporal: recently used data likely reused soon. Spatial: nearby memory locations likely accessed together. Cache hit = data found; cache miss = fetch from lower memory.
3
Cache Mapping techniques: Direct mapping (each RAM block maps to ONE cache line โ€” simple, but conflicts), Fully associative (block maps to ANY cache line โ€” flexible, expensive), Set-associative (compromise โ€” block maps to a set of lines).
4
Cache replacement policies: LRU (Least Recently Used โ€” evict oldest unused), FIFO (First In First Out), Random, LFU (Least Frequently Used). LRU is most commonly used for its effectiveness.
5
DMA (Direct Memory Access): allows I/O devices to transfer data directly to/from RAM without CPU intervention. CPU initializes the DMA controller (source, destination, count), then continues other work. DMA controller raises interrupt when done.
6
Programmed I/O (Polling): CPU repeatedly checks the device status register (busy-wait). Simple but wastes CPU cycles.
7
Interrupt-driven I/O: device raises an interrupt when ready; CPU handles it via the Interrupt Service Routine (ISR). More efficient than polling โ€” CPU does useful work between I/O events.
8
Memory-mapped I/O: I/O device registers are mapped into the CPU's address space. Same instructions (load/store) used for both memory and I/O. Example: modern x86 systems.
9
Isolated (Port-mapped) I/O: I/O devices use a separate address space with special instructions (IN/OUT in x86). Older approach, requires separate I/O bus.
10
Virtual Memory: extends RAM using secondary storage (swap space). OS manages page table mapping virtual to physical addresses. Page fault = requested page not in RAM, must load from disk. TLB (Translation Lookaside Buffer) caches recent page table entries.