SUM-8
Add every byte and keep the low 8 bits.
- HEX
- 0x0A
- Decimal
- 10
- Binary
- 00001010
Other Tools
Calculate SUM-8, SUM-16, XOR-8 and LRC-8 together from HEX bytes or UTF-8 text.
All calculations run in your browser. Your input is not uploaded.
Use continuous HEX or complete byte groups separated by spaces, commas or semicolons. Optional 0x prefixes are supported. Maximum data size: 64 KiB.
Input: 4 bytes
Input bytes (HEX preview)
01 02 03 04Add every byte and keep the low 8 bits.
Add every byte and keep the low 16 bits.
XOR every byte, starting from 0.
Two’s complement of SUM-8: (256 − SUM-8) mod 256.
LRC-8 uses the Modbus ASCII two’s-complement sum definition. Only the supplied bytes are calculated; frame headers and trailers are not detected or removed.
Choose HEX bytes or UTF-8 text and enter your data. All four results update automatically. HEX accepts complete bytes such as 01020304, 01 02 03 04 or 0x01, 0x02. Half-bytes, minus signs, colons and complete Modbus ASCII frames are not accepted. Switching input format reinterprets the current content; it does not convert it.
For HEX 01 02 03 04:
| SUM-8 | SUM-16 | XOR-8 | LRC-8 |
|---|---|---|---|
| 0x0A | 0x000A | 0x04 | 0xF6 |
Load the Modbus example: 01 03 00 00 00 0A produces LRC-8 0xF2. These are six HEX bytes, not the UTF-8 codes of the displayed hexadecimal characters.
To generate an LRC, enter the address, function and data bytes only. Exclude the opening colon, an existing LRC and the trailing CR/LF. Append F2 to obtain :01030000000AF2, followed by CR/LF. See the Modbus Serial Line Guide, §6.2.1.
To check an existing LRC, enter the data plus LRC in HEX mode, such as 01 03 00 00 00 0A F2. SUM-8 should be 0x00. This checks the sum relationship, not the entire frame structure.
Text 01 becomes UTF-8 bytes 30 31; HEX 01 is a single byte. Spaces and line breaks are preserved in text mode, and non-ASCII characters can use multiple bytes. Check the byte preview when results differ. The limit is 64 KiB. Only the first 32 bytes are previewed, but every input byte is calculated.
Simple checksums detect some transmission errors; they do not protect against tampering. Use the linked CRC or file checksum tools for CRC, MD5 or SHA algorithms.