Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Definition of Longitudinal Redundancy Check (LRC)

An LRC is a block error-detection value, commonly the XOR of all data bytes. Learn how it is computed, which errors cancel out, and why protocols differ.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A longitudinal redundancy check (LRC) is a check value calculated from a whole block of data and sent or stored with it, so a receiver can tell whether the block was corrupted. In its most common form, the sender XORs all the data bytes (or other fixed-size chunks) together. The result is a check byte, and the receiver repeats the calculation and compares. “LRC” is also used for some protocol-specific arithmetic checks, so the exact formula depends on the protocol you are working with.

How the XOR form of LRC works

Picture the data bytes stacked as rows, with bit positions as columns. The LRC is the parity of each column: every bit of the check byte is the parity of that bit position across all the data bytes. That is the same as XORing every byte together. The U.S. Federal Aviation Administration’s 2014 technical report puts it this way: an LRC, also known as an XOR checksum, XORs all the chunks of a dataword together to create a check sequence.

As an Amazon Associate I earn from qualifying purchases.

The name “XOR checksum” is a little loose. The FAA material notes that XOR is not integer addition, so the result is not quite a “sum.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A worked example

PxPlus documents its LRC(string) function with these steps: 0x01 XOR 0x02 gives 0x03, and 0x03 XOR 0x05 gives 0x06. Here is the same calculation laid out by column:

Byte Binary
0x01 00000001
0x02 00000010
0x05 00000101
LRC (column parity) 00000110 = 0x06

The rightmost column holds 1, 0, 1, which is an even number of ones, so the check bit is 0. The next column holds 0, 1, 0, so the check bit is 1. The third holds 0, 0, 1, so the check bit is 1.

What the receiver does

The receiver runs the same calculation over the data it received and compares the result with the transmitted check value. A mismatch signals an error. Which bytes are covered, where the check value sits, and whether the algorithm uses XOR or arithmetic are all set by the protocol or software implementation.

What LRC detects and what it misses

  • Single-bit errors: detected. The code has a minimum Hamming distance of 2.
  • Bursts: the FAA report says bursts up to the chunk size are detected.
  • Even numbers of flips in the same bit position: can cancel. If bit 0 flips in two different bytes, that column’s parity is unchanged, so some two-bit errors go undetected.
  • Reordering: changes to the order of the data are not detected, because XOR gives the same result in any order.
  • Correction: an LRC only detects corruption. It does not rebuild damaged data.

The FAA report gives these figures (FAA, 2014). They come from its own analysis and are not guarantees for any real implementation or traffic pattern:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The undetected error fraction at Hamming distance 2 is 3.125% for a 32-bit chunk size. This is the report’s summary figure, not a universal probability.
  • For a 1024-bit dataword, the simulated undetected fraction at Hamming distance 2 is 0.12417 for an 8-bit LRC, 0.06160 for a 16-bit LRC and 0.03032 for a 32-bit LRC.

A wider check sequence leaves fewer bit positions sharing parity, which is why the undetected fraction falls as the width grows.

Do all LRCs use XOR?

No. The FAA report describes the XOR form, but some serial protocols define their own “LRC.” A commonly cited example is an 8-bit LRC made by summing bytes modulo 256 and taking the two’s complement, with framing characters such as a leading colon and trailing CRLF excluded. That description is associated with Modbus over serial line. Confirm the details against the current Modbus specification before you implement it, because an XOR routine will not produce the same value.

When you implement or debug an LRC, find these four things in the protocol document:

Rank #4
Mastering Serial Communications
  • Used Book in Good Condition
  1. The algorithm: XOR, or a sum with complement.
  2. The check width.
  3. Exactly which bytes are covered, and which framing bytes are excluded.
  4. Where the check value is placed and how it is encoded, for example as a raw byte or as text characters.

Formal definition and the VRC combination

The ATIS Telecom Glossary defines LRC as “a system of error control based on the formation of a block check following preset rules,” with the rules applied in the same manner to each character. It lists horizontal redundancy check as a synonym. The glossary also says that combining longitudinal and vertical redundancy checks (a per-character parity bit) allows detection and correction of single-bit errors. That claim is about the combination. The LRC alone does not correct anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

LRC compared with other checks

The FAA report treats LRC, arithmetic checksums, parity and CRCs as distinct algorithms with different properties. To choose between them, compare these things:

  • Which error patterns each one detects.
  • The width of the check sequence and the size of the data chunks.
  • Detection performance under the error model you expect.
  • The computation cost.
  • Compatibility with the protocol you must follow.

LRC is cheap to compute, but its blindness to reordering and to paired flips in one bit position makes it weaker than a well-chosen CRC for noisy links. It remains common where a protocol requires it or where simplicity matters.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.