LRC Online Checker
Online LRC checker with hex, ASCII and decimal input modes, providing real-time checksum calculation and verification for Modbus ASCII debugging and serial communication troubleshooting.
Input Data
Sample Data
Calculation Results
LRC Guide and Use Cases
LRC (Longitudinal Redundancy Check) is a lightweight checksum method widely used in industrial communication to detect common byte-level transmission errors.
What is LRC?
LRC (Longitudinal Redundancy Check) is an error detection method based on byte summation and two's complement, often used in Modbus ASCII and serial protocols.
How It Works
Sum all data bytes, keep the low 8 bits, then take two's complement: LRC = (256 - (sum & 0xFF)) & 0xFF.
Use Cases
Useful for Modbus ASCII debugging, serial communication testing, and basic message integrity checks.
LRC vs CRC
LRC is simpler and faster but less robust; CRC is more complex and provides stronger error detection.
Calculation Examples
| Data | Calculation | LRC Result |
|---|---|---|
01 03 00 00 00 0A | 01+03+00+00+00+0A = 0E, two's complement: 100-0E = F2 | F2 |
01 04 00 01 00 01 | 01+04+00+01+00+01 = 07, two's complement: 100-07 = F9 | F9 |
48 65 6C 6C 6F (Hello) | 48+65+6C+6C+6F = 1F4, low byte F4, two's complement: 100-F4 = 0C | 0C |
Modbus ASCII Frame Format
Frame Structure
:[Address][Function][Data][LRC][CR][LF], e.g. :01030000000AF2CR LF
Notes
LRC calculation excludes the start colon (:) and ending CR LF, and only uses the payload bytes.