Longitudinal Redundancy Check (LRC)

In Longitudnal Redundancy Check (LRC), also called 2-dimensional parity, a block of bits is organized in rows and columns. A parity bit is then calculated for each column.

How does Longitudinal Redundancy Check work?

To understand better, let’s take an example. Suppose we want to transmit:

11101001011001011010100111100110
Data to be sent

Let’s see how the Longitudinal Redundancy Check (LRC) would handle it:

Sender’s Side

  • Organize the data bits in rows and columns. In this case:
11101001
01100101
10101001
11100110
Table 1: Original data organized into rows and columns
  • Calculate the parity bit for each column

Each column is checked for parity. The total number of ‘1’s is counted in each column. If the total is odd, bit 1 is added. If it is even bit 0 is added. In this case the original data is:

11101001
01100101
10101001
11100110
Table 2: Original data organized into rows and columns

Calculating parity column wise gives us:

11101001
01100101
10101001
11100110
11000011
Table 3: Last row is the parity block
  • A new block of parity bits is made. This block is called the parity block or the LRC code. In this case the parity block is 11000011:
11000011
Parity block for the original data.
  • This block is transmitted along with the data. In this case, the original data to be transmitted was:
11101001011001011010100111100110
Original data

Now the parity block is added and the data to be transmitted becomes:

1100001111101001011001011010100111100110
Parity BlockOriginal Data
Data to be transmitted. This includes the original data along with the parity block

NOTE: The data transmission in Longitudinal Redundancy Check (LRC) occurs in such a way that the last block to be transmitted is the parity block.

Direction of Data Transmission in Longitudinal Redundancy Check (LRC).

Receiver’s Side

  • The receiving device, receives the following data:
1100001111101001011001011010100111100110
Parity BlockOriginal Data
Data received after transmission. This includes the original data along with the parity block
  • Receiver seperates the transmitted LRC code or parity block and the original data.
Data received is split and the parity block is kept aside by the receiver.
  • The receiver organizes the remaining data bits into rows and columns. It then calculates the parity block. The calculation is done in the same manner as it was done by the sender (Table 1, Table 2 and Table 3). This gives the receiver the calculated LRC code.
  • The receiver compares the transmitted LRC code and the calculated LRC code. If they are identical, this indicated that there was no error during network transmission. If however, they aren’t identical, an error has occured.

Advantages:

  • Comprehensive error detection: LRC can detect errors across multiple positions within a data block, including both single-bit and multiple-bit errors.
  • Relatively simple implementation: While LRC requires XOR operations, it can be implemented efficiently with minimal computational overhead.

Limitations:

Inefficiency for burst errors: The biggest drawback of LRC is that if 2 bits in one data unit are damaged and two bits in exactly the same position in another data unit are also damaged, no error would be detected. Let’s take an example:

Suppose the sender is transmitting:

11000101
Original Data

The sender organizes the data into rows and columns and calculates the parity:

1100
0101
1001
Parity block is calculated by the sender

Thus, the partity block or the LRC code is 1001.

Thus, the sender transmits 1001 1100 0101 to the receiver:

100111000101
Parity BlockData unit 2Data unit 1
Original Data transmitted by sender.

Now, during transmission, error occurs such that the 1st and last bit of Data unit 1 AND the 1st and last bit of Data unit 2 both are flipped. The data now becomes: 0101 1100 (Bold bits are the erroneous ones).

Thus the data received is :

100101011100
Parity BlockData unit 2Data unit 1
Original Data transmitted by sender.

The receiver removes the received or transmitted LRC code and calculates the LRC code

0101
1100
1001
Parity block of the errorneous data calculated by the receiver

The calculated LRC code is 1001. This code is compared with the transmitted LRC code. As the two codes are identical, the receiver concludes that there was no error in transmission. This, however, is untrue.

Applications of Longitudinal Redundancy Check:

LRC finds applications in various communication systems and storage devices where comprehensive error detection is required. It is commonly used in protocols such as asynchronous transmission protocols (e.g., asynchronous serial communication) and in some disk storage systems.

2 thoughts on “Longitudinal Redundancy Check (LRC)”

  1. I know this if ᧐ff topіc but I’m looking into starting my own blog and was
    wondering what all is required to get set up?
    I’m assuming having a bⅼog like yours would cost a pretty penny?
    I’m not very internet savvy so I’m not 100% sure. Any suggestions or
    adviϲе would be greatlʏ appreciated. Appreciate it

Leave a Comment

Your email address will not be published. Required fields are marked *