Skip to content

Instantly share code, notes, and snippets.

View khemtwt11's full-sized avatar

khemchand khemtwt11

View GitHub Profile

Pipelining in Go-Back-N ARQ

Pipelining in Go-Back-N Automatic Repeat reQuest (ARQ) is a technique used in data communication to improve efficiency by sending multiple frames before waiting for an acknowledgment (ACK). Unlike Stop-and-Wait ARQ, where the sender waits for an ACK after each frame, Go-Back-N allows the sender to transmit several frames in a sequence, making better use of the channel.

How Pipelining Works in Go-Back-N ARQ

  1. Window Size: The sender has a "window" of frames (e.g., size N) it can send without waiting for an ACK.
  2. Send Frames: The sender sends frames up to the window size and waits for ACKs.
  3. Acknowledgments: The receiver sends ACKs for correctly received frames in sequence. If a frame is lost or corrupted, the receiver discards it and all subsequent frames.
  4. Go-Back-N: If an error occurs (e.g., frame loss), the sender retransmits the lost frame and all frames sent after it, as the receiver expects frames in order.
  5. Sliding Window: After receiv
@khemtwt11
khemtwt11 / analogToanalog.md
Created July 3, 2025 09:41
analog to analog communication

Analog-to-Analog Modulation and Encoding Methods

Analog-to-Analog Modulation is the process of changing one analog signal (like sound or radio waves) into another analog signal to make it suitable for transmission over a medium, like radio or telephone lines. It adjusts the signal’s properties (like amplitude or frequency) to carry information.

Process of Analog-to-Analog Modulation

  1. Input Signal: Take an analog signal (e.g., voice or music) called the message signal.
  2. Carrier Signal: Use a high-frequency analog signal (carrier) to carry the message.
  3. Modulation: Combine the message signal with the carrier by changing the carrier’s amplitude, frequency, or phase based on the message.
  4. Transmission: Send the modulated signal through the medium (e.g., air for radio, cables for phones).
  5. Demodulation: At the receiver, extract the original message signal from the carrier.
@khemtwt11
khemtwt11 / transmssionmedia.md
Created July 3, 2025 09:39
Importance of Transmission media

Importance of Transmission Media

Transmission media is the path through which data travels from one device to another in a network, like cables or air for wireless signals. It is very important for communication systems. Here’s why:

  1. Enables Data Transfer: Transmission media carries signals (data, voice, or video) between devices, making communication possible in networks like the internet or telephone systems.

  2. Affects Speed and Quality: The type of media (e.g., fiber optic, copper cable, or wireless) decides how fast and clear the data transfer is. Good media reduces errors and improves performance.

  3. Supports Different Distances: Media like fiber optics can send data over long distances without losing quality, while others like Wi-Fi work better for short ranges.

@khemtwt11
khemtwt11 / noseinaSignal.md
Created July 3, 2025 09:37
Noise in a signal

Noise in a Signal and Its Types

Noise in a signal is any unwanted disturbance that mixes with the original signal during transmission, making it harder to understand or process. It affects the quality of data in communication systems like phones, radios, or the internet.

Types of Noise

  1. Thermal Noise:
    • Caused by the random movement of electrons in conductors due to heat.
    • Present in all electronic devices and increases with temperature.
    • Example: Hiss sound in radios.
@khemtwt11
khemtwt11 / framegenerator.md
Created July 3, 2025 09:34
frame generator

CRC Calculation for Frame 1101011011 with Generator Polynomial x^3 + 1

The Cyclic Redundancy Check (CRC) is used to detect errors in data transmission. Given the frame 1101011011 and generator polynomial ( x^3 + 1 ), we calculate the CRC as follows:

Step-by-Step Process

  1. Frame and Generator:

    • Frame: 1101011011 (10 bits, polynomial: ( x^9 + x^8 + x^6 + x^4 + x^3 + x )).
    • Generator polynomial: ( x^3 + 1 ) = ( x^3 + x^0 ) = 1001 (4 bits).
  2. Append Zeros:

@khemtwt11
khemtwt11 / singaltonose.md
Created July 3, 2025 09:32
signaltonose.md

Signal-to-Noise Ratio (SNR) and Its Importance in Data Transmission

Signal-to-Noise Ratio (SNR) is a measure that compares the strength of a signal (the useful data) to the background noise (unwanted interference) in a communication system. It is usually expressed in decibels (dB) and calculated as:

SNR = 10 * log10 (Signal Power / Noise Power)

Concept of SNR

  • Signal: This is the actual information being sent, like voice, video, or data.
  • Noise: This is unwanted disturbance, like static, electrical interference, or crosstalk, that mixes with the signal.
  • A higher SNR means the signal is stronger compared to noise, making the data clearer. A lower SNR means more noise, which can make the data hard to understand.
@khemtwt11
khemtwt11 / standardInternetProtocols.md
Created July 3, 2025 09:30
standard internet protocols

Standard Internet Protocols and Their Roles

Internet protocols are standardized rules that enable communication and data transfer across networks. Below are key protocols and their roles:

Protocol Full Form Role
TCP Transmission Control Protocol Ensures reliable, ordered, and error-checked data delivery between applications. It breaks data into packets, retransmits lost packets, and reassembles them at the destination. Used in applications like web browsing and email.
IP Internet Protocol Handles addressing and routing of packets across networks. IPv4 and IPv6 assign unique addresses to devices and route packets to their destinations. Core protocol for Internet connectivity.
HTTP/HTTPS Hypertext Transfer Protocol / Secure Facilitates data exchange on the World Wide Web. HTTP transfers web pages; HTTPS adds encryption for secure communication. Used for browsing websites.
FTP File Transfer Protocol
@khemtwt11
khemtwt11 / strcture-and-functionallity-of-UDP.md
Created July 3, 2025 09:19
structure and functioanllity of UDP.

Structure and Functionality of UDP (User Datagram Protocol)

Structure of UDP: UDP is a lightweight, connectionless transport layer protocol in the TCP/IP suite. Its header is simple, consisting of 8 bytes (64 bits) with four fields:

  1. Source Port (16 bits): Identifies the sending application's port number. Optional and can be set to zero if not used.
  2. Destination Port (16 bits): Specifies the port number of the receiving application.
  3. Length (16 bits): Indicates the total length of the UDP datagram (header + data) in bytes, with a minimum of 8 bytes (header only).
  4. Checksum (16 bits): Used for error-checking the header and data. Optional in IPv4 but mandatory in IPv6. If not used, set to zero.

The UDP header is followed by the data (payload) from the application layer. Its simplicity (no additional fields for sequencing or flow control) makes it efficient but less reliable than TCP.

Ad-hoc networks are wireless networks where nodes communicate directly without a centralized access point, like in MANETs (Mobile Ad-Hoc Networks). Below is a comprehensive list of challenges faced by ad-hoc networks, based on their inherent characteristics and operational constraints:

  1. Dynamic Topology: Nodes in ad-hoc networks are mobile, leading to frequent changes in network topology. This makes routing and maintaining stable connections difficult, as links between nodes may break or form unpredictably.

  2. Limited Bandwidth: Wireless links typically have lower bandwidth compared to wired networks. The shared medium and interference further reduce effective bandwidth, impacting data transfer rates.

  3. Energy Constraints: Nodes (e.g., mobile devices, sensors) often rely on limited battery power. Energy-efficient protocols are needed to prolong network lifetime, as nodes may deplete their energy and drop out.

  4. Scalability: As the number of nodes increases, managing routing, addressing

@khemtwt11
khemtwt11 / MalwareType.md
Last active July 3, 2025 09:16
Malware Types 2(a)

Below are the different types of Malware:

  1. Viruses: Viruses are malicious programs that attach themselves to legitimate files or programs and execute their code when the infected file is opened. They spread from one computer to another by replicating themselves and infecting other files.

  2. Worms: Worms are self-replicating malware that spread across networks by exploiting vulnerabilities in operating systems and network protocols. Unlike viruses, worms don't need to attach to other files to spread; they can replicate and spread independently.