A binary checksum is a one-byte error-detection value computed from a sequence of raw bytes using a transparent, reversible formula such as XOR-8 BCC or Modbus ASCII LRC. To calculate a binary checksum you choose the input representation your protocol uses (UTF-8 text or hexadecimal bytes), enter exactly the payload the checksum is meant to cover, run the calculation, and copy the labeled result that matches your device documentation. The Checksum Calculator does this locally in the browser and exposes three named eight-bit values — XOR-8 BCC, the Modbus ASCII longitudinal redundancy check (the two's complement of the byte sum), and the raw byte sum modulo 256 — over the same byte sequence, so you can compare every candidate against the vendor's specification before transmitting a frame. Unlike cryptographic hashes, these one-byte checks are tiny, easy to compute on a microcontroller, and easy to verify by hand, but they only detect accidental changes, not deliberate tampering.

What "binary checksum" actually means for a byte stream
The word "binary" in this context means "operated on raw bytes" rather than "expressed in the binary numeral system". A binary checksum is therefore a short value derived from a buffer of bytes — eight bits per byte, no text interpretation, no signed arithmetic beyond what the formula needs. The qualifier matters because engineers searching for a binary checksum are usually looking at a hexadecimal dump of a serial frame, a Modbus request, or a vendor-supplied payload, and they want a specific small number they can paste into the trailing byte of that frame.
The word "checksum" is also overloaded across the industry. Different devices use it to mean an additive sum, an XOR block check character, a longitudinal redundancy check, a CRC of some width, or a cryptographic hash. Many vendor manuals never name the algorithm they use, and several reserve the acronyms BCC or LRC for formulas that other vendors reserve for different formulas. Treating "checksum" as a single universal algorithm is the single most common source of mismatched frames. The safe move is to identify the input byte representation, the checksum width, the initial value, the included fields, any final complement, and the transmitted byte order from the documentation before choosing a tool.
The three eight-bit formulas the calculator exposes
The Checksum Calculator always reports three explicit values over the same byte sequence. Knowing the formula behind each value lets you decide which one matches your target before you copy anything into a frame.
- XOR-8 BCC: an eight-bit accumulator starts at 0x00 and XORs every selected byte in turn. XOR is commutative, so the order of bytes does not matter, and there are no carries to track. The final accumulator value is the result.
- Modbus ASCII LRC: every message byte is added into an eight-bit field, any carry out of bit 8 is discarded, and the result is the two's complement of that sum. Equivalently, the result equals the negative of the byte sum taken modulo 256. The official Modbus over Serial Line guide excludes the starting colon and the trailing CRLF from the bytes supplied to this formula.
- Sum modulo 256: the raw low eight bits of the ordinary byte sum, before the Modbus two's-complement step. It is shown as a diagnostic intermediate; the sum and the LRC always add up to zero modulo 256.
| Formula | Initial value | Operation | Final transform | Frame scope |
|---|---|---|---|---|
| XOR-8 BCC | 0x00 | XOR each byte | none | vendor-defined payload bytes |
| Modbus ASCII LRC | 0x00 | add each byte, discard carry | two's complement | message body, no colon or CRLF |
| Sum modulo 256 | 0x00 | add each byte, discard carry | none | same as the additive input |
This table is qualitative — the exact figures inside the tool's three result fields are produced by the page itself from the bytes you enter. Treat the formulas as the contract and the table as a quick reference for which one fits which framing.
How to calculate a binary checksum from hex bytes or text
- Decide whether your protocol sends the checksum over a UTF-8 string or over raw hexadecimal bytes. Most device frames and Modbus payloads use raw bytes, so hexadecimal input is the most common choice. If you are pasting a human-readable string, switch to text mode and remember that the browser encodes it as UTF-8 first; non-ASCII characters can contribute several bytes.
- Open the Checksum Calculator and select the input mode that matches your frame. The page rejects prefixes such as 0x, commas, colons, dashes, odd nibbles, and comments rather than silently guessing what you meant.
- Enter exactly the bytes the target specification says to cover. For standard Modbus ASCII LRC this means the message body without the starting colon and without the trailing carriage-return/line-feed pair. For an XOR-8 BCC check this means the bytes the vendor names — no more, no less.
- Run the calculation. The page displays two lowercase hex digits for each of the three values and the exact number of bytes processed, so you can verify that the byte count matches the length of the field you typed.
- Compare the three labeled results with the device documentation. Copy the one that matches, then paste the labeled value (XOR-8 BCC, Modbus ASCII LRC, or sum modulo 256) into the trailing position of your frame or test record.
- If the result is rejected by the device, re-check the byte range first, then re-check whether the protocol uses a different name for the same formula, a different formula under the same name, or a wider checksum such as CRC-16 or CRC-32.
Identifying which formula your device or protocol expects
Before trusting any output, answer six questions from the vendor documentation:
- Input representation: is the payload UTF-8 text or raw bytes?
- Checksum width: is it one byte, two bytes, or four bytes?
- Initial value: does the accumulator start at zero, at 0xFF, or at a named constant?
- Included fields: does the checksum cover just the data bytes, or also a length field, an address field, and a function code?
- Final transform: is the result sent as-is, complemented, reflected, or byte-swapped?
- Transmitted byte order: are the high and low bytes swapped before the checksum is placed on the wire?
If any answer is unclear, prefer the tool that prints its formula in plain text. The Checksum Calculator declares its three formulas on the page, so you can map each output to the documented algorithm without guessing. For a deeper walk-through of the two simple eight-bit formulas, the guide how to calculate XOR-8 BCC and Modbus LRC covers the same algorithms step by step and reproduces the arithmetic in long form.
A worked example over a small byte sequence
To make the three formulas concrete, take the six bytes 01 03 00 00 00 0A — a typical Modbus "read holding registers" request body.
- Sum modulo 256: 0x01 + 0x03 + 0x00 + 0x00 + 0x00 + 0x0A = 0x0E = 14 decimal. The low eight bits are 0x0E.
- Modbus ASCII LRC: the two's complement of 0x0E. Invert 0x0E to get 0xF1 and add one to get 0xF2. So the LRC is 0xF2.
- XOR-8 BCC: 0x01 XOR 0x03 = 0x02, XOR 0x00 = 0x02, XOR 0x00 = 0x02, XOR 0x00 = 0x02, XOR 0x0A = 0x08. So the BCC is 0x08.
Quick check: 0x0E + 0xF2 = 0x100, and 0x100 modulo 256 = 0, which confirms that the additive sum and the LRC always add up to zero modulo 256. Paste those same six bytes into the Checksum Calculator in hexadecimal mode and the page reports 0E, F2, and 08 with a six-byte count, matching the hand calculation above.
Limits and what one-byte checksums cannot do
One-byte checksums are short on purpose. They are fast on tiny microcontrollers, easy to verify by eye, and good enough to catch many accidental bit flips on a quiet serial line. They are not cryptographic hashes, message authentication codes, digital signatures, or proof of origin. XOR and additive checksums have many collisions — different byte sequences that produce the same value — and an attacker who can modify the message can usually adjust one or two bytes to keep the checksum unchanged.
Do not use them to protect credentials, to authorize commands, to verify software downloads, or to authenticate hostile network traffic. Use the security mechanism the actual protocol requires, such as HMAC for message authentication, a signature for software, or TLS for hostile networks.
The Checksum Calculator caps input at 500,000 bytes, refuses to silently truncate, and reports malformed hex without producing a partial value. If your frame is much larger than that, or if you need a 16-bit or 32-bit value, the right tool is a CRC-32 calculator or an HMAC generator, not a different formula entered into the same page. For the eight-bit XOR-8 BCC formula this tool implements, the vendor reference describes the algorithm explicitly and the page matches that description, so a copied result can be cross-checked against the BALTECH XOR-8 BCC reference without ambiguity.
If you're weighing options, How to Find CRC32: Pick the Right Variant and Bytes covers this in detail.