Computer Network Tutorial

Introduction of Computer Network Types of Computer Network Network Topology Computer Networking Architecture Transmission Modes (Data Flow) Basic Networking Devices Integrate Services Digital Network (ISDN)

Model

OSI Model TCP/IP Model

Physical Layer

Digital Transmission Analog Transmission Transmission Media Switching

Data Link Layer

Error detection and Error correction Data Link Control Multiple Access Aloha

Network Layer

Network Layer - Logical Address Address Mapping Unicast Routing Protocol

Transport Layer

Process to Process Delivery User Datagram Protocol Transmission Control Protocol Stream Control Transmission Protocol Session Layer and Presentation Layer

Application Layer

Domain Name System Application Protocol E-mail Cryptography

Misc

Classes of Routing Protocols Classification of Routing Algorithms Controlled Access Protocols in Computer Networks Differences between IPv4 and IPv6 Fixed and Flooding Routing Algorithms Advantages and Disadvantages of Fibre Optics Cable APIPA Difference between Active and Passive FTP Fiber Optics and its Types Method of Joining and Fusion of Fiber Optic Cable Define Framing in Computer Network Disadvantages of Computer Network Mesh Topology Diagram in Computer Network Ring Topology in Computer Network Star Topology in Computer Networks 4G Mobile Communication Technology Advantages and Disadvantages of LAN Advantages and Disadvantages of MAN Advantages and Disadvantages of WAN Application Layer in OSI Model Cyclic Redundancy Check Example Data link layer in OSI model Difference between Transport and Network Layer Hamming Code Example Network Layer in OSI Model Session Layer in OSI Model Transport Layer in OSI Model Two Port Network in Computer Networks Uses of Computer Networks What is Computer Network What is Framing in a Computer Network Advantages and Disadvantages of Bus Topology Difference between Star Topology and Bus Topology Subnetting in Computer Network Subnetting Questions and Answers What is Bus Topology What is Network Topology and Types in Computer Networks Access Control in Networking Basic Characteristics of Computer Network Benefits of SOCKS5 Proxy in Computer Networks Computer Network viva Questions Difference between BOOTP and RARP Difference Between Network Topologies and Network Protocols Difference between NFC and RFID Difference Between Point-to-Point Link and star Topology Network Differences Between MSS and MTU Differences Between Trunk Port and Access Port Different Modes of Communication in Computer Networks MIME Protocol in Computer Networks Modes of Communication in Computer Networks Network Attack in Computer Network Port Address in Networking Simplest Protocol in Computer Network Sliding Window Protocol in Computer Network Stop And Wait Protocol in Computer Networks TCP 3-Way Handshake Process in Computer Networks What is a Proxy Server What is APPN What is ICMP Protocol What is Point-to-Point Protocol What is Port Address in Networking What is the HDLC Protocol What is VRRP Protocol Difference Between Analog and Digital Signals Difference Between Hub and Repeater Difference between Repeater and Switch Difference Between Transparent Bridge and Source Routing Bridge Source Routing Bridge in Computer Networks Transparent Bridge in Computer Networks Transport Protocol in Computer Networks Types of CSMA in Computer Networks What is Wired and Wireless Networking Network Security in Computer Network Disadvantages of Extranet Difference Between TELNET and FTP Define Protocol in Computer Networks Guided Transmission Media in Computer Network What is a Gateway in a Computer Network IGMP in Computer Networks LAN Protocols in Computer Networks MAN Meaning in Computer Modulation Techniques in Computer Networks Switching in DCN TCP/IP Applications What is IGMP? What is Modem in Networking What is Non-Persistent CSMA Difference between Cell Splitting and Cell Sectoring Forouzen Computer Network Open Loop and Closed Loop Congestion Control Types of Cluster Computing WAP-Wireless Access Point What are the elements of the Transport Protocol Difference between Gateway and Switch Flow Control in Data Link Layer Body Area Network Flooding in Computer Network Token Ring in Computer Networks VoIP in Computer Networks What is Infrared Transmission Congestion Control Techniques Forward Error Correction (FEC) Switching Techniques What is Telnet in Computer Network What are the Types of IPv4 Addresses IEEE 802.6 (DQDB) IEEE 802.15.4 Technology What is HDLC (High-level Data Link Control)? What is SMS Hubbing in Telecom? Circuit Switching in Computer Networks Communication Satellites in Computer Networks Features of HTTP Protocol IMAP4 (Internet Message Access Protocol) Internet Services How to Set up a Wireless Router Internetwork Routing in Computer Networks Distributed Computing System Features of GSM The 802.11 MAC Sublayer Protocol What is IEEE 802.3? What are Hubs and Switches in Computer Networks? What is Modem in a Computer Network? What is multicasting in Computer Networks? GSM -The Mobile Station What is Network Server? Slotted Aloha in Computer Network What is Ethernet in Computer Networks What is Arpanet? Radio Access Network (RAN) TCP 3-Way Handshake Process PING SWEEP (ICMP SWEEP) Print Server Private IP Address Security Services in Computer Networks Protocol Data Unit (PDU) CSMA with Collision Avoidance (CSMA/CA) What is Gateway in Computer Network? Advantages of Networking Data Link Layer Design Issues DHCP in Computer Networks Internet Security Association and Key Management Protocol (ISAKMP) What is Switch Hub? Telnet Full form in Networking Multimedia Systems Quality of Service in Computer Networks What is Carrier Sense Multiple Access (CSMA)? What is Circuit Switching What is Duplex Network? What is Web Protocol Network LAN Technologies Classes in Computer Network Low-Density Parity Check (LDPC) Wireless Internet Service Providers(Wisps) What is Handshaking?

Hamming Code Example

What is Hamming Code?

Hamming code is an error-detecting and error-correcting code used in computer data storage and transmission to detect and correct errors caused by noise, interference, or data corruption. It works by adding redundant bits (known as "parity bits") to a binary message, which can be used to determine if errors have occurred and correct them.

The number of parity bits depends on the length of the message and the desired error detection and correction capability.

Uses of Hamming Code

Hamming code is used in the following applications:

  • Data storage systems: To ensure the integrity of data stored on disks or tapes.
  • Data transmission systems: To detect and correct errors that may occur during data transmission over a network or other communication channels.
  • Computer memory: To detect and correct errors in RAM or other forms of computer memory.
  • Wireless communication: To detect and correct errors that may occur in wireless communication due to interference or fading of the signal.
  • Barcode scanning: To ensure the accuracy of barcode scanning in retail and other applications.
  • Digital communications: To improve the reliability of digital communications systems.
  • Error control coding in general: Hamming code is widely used in error control coding, where the goal is to detect and correct errors in a transmitted or stored message.

General Algorithm of Hamming Code

The general algorithm for Hamming code involves the following steps:

  • Message encoding: The original message is transformed into a codeword by adding redundant bits (parity bits) to it. The number of parity bits depends on the length of the message and the desired error correction capability.
  • Transmission: The codeword is transmitted over a communication channel, where errors may occur.
  • Error detection: At the receiver end, the received codeword is checked for errors using the parity bits. If an error is detected, the receiver can determine the location of the error using the parity bits.
  • Error correction: If the number of errors is within the correction capability of the Hamming code, the receiver can correct the errors and recover the original message.
  • Message decoding: Finally, the receiver decodes the corrected message to obtain the original message.

Example of Hamming Code

Here is a simple example of how Hamming code can be used to detect and correct errors in a binary message:

Suppose we have a binary message of 4 bits (1001). To use Hamming code, we add 3 extra bits to the message, making it a 7-bit codeword. These extra bits are used as parity bits, which helps detecting and correcting errors.

The 7-bit codeword is calculated as follows:

  • Parity bit 1 covers the 1st, 2nd, 4th, and 8th bits (bits 1, 2, 4, and 8 in the codeword). If the number of 1's in these bits is odd, the parity bit is set to 1, otherwise, it's set to 0.
  • Parity bit 2 covers the 2nd, 3rd, 5th, and 9th bits (bits 2, 3, 5, and 9 in the codeword). If the number of 1's in these bits is odd, the parity bit is set to 1, otherwise, it's set to 0.
  • Parity bit 3 covers the 4th, 5th, 6th, and 10th bits (bits 4, 5, 6, and 10 in the codeword). If the number of 1's in these bits is odd, the parity bit is set to 1, otherwise, it's set to 0.
  • The resulting 7-bit codeword is: 1000110

If the codeword is transmitted and an error occurs, the receiver can use the parity bits to detect and correct the error. For example, if the received codeword is 1000111 (with one bit flipped), the receiver can determine that an error has occurred by checking the parity bits. By using the parity bits, the receiver can then determine which bit is in error and correct it, recovering the original message (1001).

Application of Hamming Code

Hamming code is widely used in various applications due to its ability to detect and correct errors in data storage and transmission.

Some of the common applications of Hamming code are as follows:

  1. Data storage: To detect and correct errors in data stored on magnetic disks, tapes, or other storage media.
  2. Data transmission: To detect and correct errors in data transmitted over a network, such as Ethernet or the Internet.
  3. Computer memory: To detect and correct errors in random-access memory (RAM) or other forms of computer memory.
  4. Wireless communication: To detect and correct errors in wireless communication due to fading, interference, or other factors.
  5. Barcode scanning: To improve the accuracy of barcode scanning in retail and other applications.
  6. Error control coding: To improve the reliability of digital communication systems, Hamming code is widely used in error control coding, where the goal is to detect and correct errors in a transmitted or stored message.
  7. Digital signal processing: Hamming code is used in digital signal processing to detect and correct errors in signals, such as audio or video signals.