8 Bit Sum Calculator

8-bit checksum of a byte list: sum mod 256, two's complement checksum, carry and overflow.

  1. Enter valuesUse your own inputs or an example
  2. CalculateApply your selected settings
  3. View resultExplore the answer and explanation

Enter the bytes

Enter your values below to get started.

Examples:
Separate bytes with spaces, commas or colons. In hex mode a run like 48656C6C6F is split into pairs.
Input format
Mode
Reset restores the default values.

Tips for this calculator

Paste an Intel HEX line without the colon to check its checksum in Verify mode.

Decimal mode accepts signed bytes from −128 to 127; −1 is stored as 255 (0xFF).

ASCII text sums the character codes: A = 65 = 0x41.

Open the Table tab to see CF and V for every single addition.

An 8 bit sum calculator adds a list of bytes and keeps only the lowest 8 bits of the total (the sum mod 256), the value used for simple checksums. Enter bytes in hex, decimal or as ASCII text to get the 8-bit sum, the two's complement checksum used by Intel HEX files, the one's complement, the carry (CF) and signed overflow (V) flags, and a byte-by-byte running sum, or switch to Verify to test a record that ends with its checksum.

What is an 8 Bit Sum?

An 8 bit sum is the total of a list of bytes reduced modulo 256, so the result always fits in 1 byte (0 to 255, or 0x00 to 0xFF). The bytes of "Hello" (72, 101, 108, 108, 111) add to 500, and 500 mod 256 = 244 = 0xF4.

S8=(∑i=1nbi) mod 256S_8 = \left(\sum_{i=1}^{n} b_i\right) \bmod 256

An 8-bit register in a microcontroller such as the Intel 8051 or the Atmel AVR computes this sum for free: every carry out of bit 7 is dropped. That is why the 8-bit sum is the oldest and cheapest checksum, used in Intel HEX files, Motorola S-records and many serial protocols.

InteractiveAn 8-bit register adding bytes

How Does the 8 Bit Sum Calculator Work?

The 8 bit sum calculator reads each byte, adds it to an 8-bit accumulator, records the carry and overflow flags of every addition, and then derives the one's and two's complement checksums from the final sum. The full sum is kept as well, so the number of wraparounds equals ⌊total ÷ 256⌋.

InteractiveRunning 8-bit sum, byte by byte
  1. Parse the bytes

    Hex 00–FF, decimal 0–255 (or −128 to 127), or ASCII characters with codes up to 255.

  2. Accumulate

    Running sum = (running sum + byte) mod 256, with CF = 1 when the add passes 255.

  3. Check signed overflow

    Each byte is read a 2nd time as a signed value (−128 to 127); V = 1 when the signed sum leaves that range.

  4. Build the checksums

    One's complement = 255 − S; two's complement = (256 − S) mod 256.

8 Bit Sum and Checksum Formulas

There are 3 formulas behind an 8-bit checksum: the sum S = Σb mod 256, the one's complement 255 − S, and the two's complement (256 − S) mod 256. The two's complement checksum has a useful property: the data bytes plus the checksum always sum to 0x00.

One's Complement Formula

C1=S‾=255−S=0xFF⊕SC_1 = \overline{S} = 255 - S = \text{0xFF} \oplus S

Two's Complement Checksum Formula

C2=(256−S) mod 256=S‾+1,(S+C2) mod 256=0C_2 = (256 - S) \bmod 256 = \overline{S} + 1, \qquad (S + C_2) \bmod 256 = 0

For "Hello", S = 0xF4, so C1 = 0x0B and C2 = 0x0C. Check: 0xF4 + 0x0C = 0x100, whose low byte is 0x00.

InteractiveSum, NOT sum and NOT sum + 1

Types of 8-Bit Checksums

There are 4 common types of 8-bit checks: the plain 8-bit sum, the two's complement checksum, the XOR longitudinal redundancy check (LRC) and the 8-bit cyclic redundancy check (CRC-8). The 2 sum-based checks catch any single-bit error but miss swapped bytes; CRC-8 catches both.

InteractiveInject an error: which 8-bit check catches it?

Plain 8-bit sum

S = Σb mod 256. Sent as-is by simple sensors and serial protocols.

Two's complement checksum

(256 − S) mod 256. Intel HEX and many bootloaders use it; the receiver checks that all bytes sum to 0x00.

XOR LRC

All bytes combined with exclusive OR. Each bit column has even parity; used in Modbus ASCII as an LRC variant and in NMEA 0183 sentences.

CRC-8

Polynomial division (x8 + x2 + x + 1 for poly 0x07). Detects byte swaps and burst errors up to 8 bits; used on SMBus as the Packet Error Code (PEC).

How to Calculate an 8 Bit Sum by Hand

To calculate an 8 bit sum by hand, convert each byte to decimal, add them, divide the total by 256 and keep the remainder; the two's complement checksum is 256 minus that remainder. Here is "Hello":

  1. Bytes: 0x48, 0x65, 0x6C, 0x6C, 0x6F = 72, 101, 108, 108, 111.
  2. Total: 72 + 101 + 108 + 108 + 111 = 500.
  3. 500 = 1 × 256 + 244, so the 8-bit sum is 244 = 0xF4.
  4. Two's complement checksum: 256 − 244 = 12 = 0x0C.
InteractiveStep through 8-bit sums by hand

    8 Bit Sum Flags: Carry, Overflow, Zero and Sign

    Every 8-bit addition sets 4 status flags: carry (CF), overflow (V or OF), zero (ZF) and sign (SF). CF = 1 when the unsigned total passes 255; V = 1 when 2 signed bytes with the same sign give a result with the other sign.

    CF=[a+b>255],V=[ a7=b7≠s7 ]CF = [a + b > 255], \qquad V = [\,a_7 = b_7 \ne s_7\,]

    0x64 + 0x32 (100 + 50 = 150) sets V = 1 and CF = 0: the unsigned result is fine, but 150 is outside the signed range −128 to 127. 0xC8 + 0x64 (200 + 100) sets CF = 1 and V = 0: the signed sum −56 + 100 = 44 is correct.

    InteractiveAdd 2 bytes and watch CF, V, ZF and SF

    Common Mistakes with 8 Bit Sums

    • Mixing up one's and two's complement: 0xF4 gives 0x0B (one's) but 0x0C (two's); Intel HEX expects 0x0C.
    • Treating the carry flag as an error: carries are expected in a checksum; the sum is defined modulo 256.
    • Reading hex bytes as decimal: 10 in a hex dump is 16, not 10.
    • Leaving out header bytes: an Intel HEX checksum covers the byte count, address and record type, not only the data.
    • Assuming a sum catches reordering: 12 34 and 34 12 have the same 8-bit sum.
    InteractiveTrue or false: 8-bit sums
    1. The 8-bit sum of FF and 01 is 00.

    2. The two's complement checksum of a sum of 0xF4 is 0x0B.

    3. Data bytes plus their two's complement checksum sum to 0x00 mod 256.

    4. An 8-bit sum detects 2 bytes that were swapped.

    5. 0x7F + 0x01 sets the signed overflow flag.

    Score: 0 / 5

    How to Use the 8 Bit Sum Calculator

    To use the 8 bit sum calculator, paste the bytes, pick hex, decimal or ASCII text, choose Compute or Verify, and press Calculate. The result card shows the 8-bit sum with both checksums and the flags; the tabs show the steps, a running-sum chart and a byte table.

    InteractiveLoad an 8-bit sum

    Each button fills the calculator and runs it.

    1. Paste the bytes

      From a hex dump, a protocol spec or a text string.

    2. Pick the format

      Hex (00–FF), Decimal (0–255) or ASCII text.

    3. Pick the mode

      Compute returns the checksum; Verify treats the last byte as the checksum and checks that everything sums to 0x00.

    4. Read the flags

      CF and V for the last add, plus totals across all additions.

    Real-Life Uses of 8 Bit Sums

    8-bit sums protect small blocks of data where a full CRC costs too much. There are 5 common uses:

    • Intel HEX firmware files: each line ends with a two's complement checksum of its bytes; programmers reject lines that do not sum to 0x00.
    • Motorola S-records: each record ends with the one's complement of the 8-bit sum.
    • Serial and RS-485 protocols: sensor frames often end with a 1-byte sum for a quick integrity check.
    • PC BIOS option ROMs: all bytes of an option ROM must sum to 0x00 mod 256 before the BIOS runs it.
    • Game cartridges: the Nintendo Game Boy header holds an 8-bit header checksum over bytes 0x134–0x14C.
    InteractiveBuild an Intel HEX record and its checksum

    8 Bit Sum Examples

    Byte lists with their 8-bit sum and two's complement checksum.

    8 Bit Sum Examples
    Bytes8-bit sumTwo's complement checksumCalculator
    48 65 6C 6C 6F ("Hello")0xF4 (244)0x0C
    01 02 030x06 (6)0xFA
    FF FF0xFE (254), CF = 10x02
    03 00 30 00 02 33 7A0xE2 (226)0x1E
    200, 100 (decimal)0x2C (44), CF = 10xD4
    80 800x00 (0), CF = 1, V = 10x00
    Verify 03 00 30 00 02 33 7A 1E0x00 → valid0x1E ✓

    Popular 8 Bit Sum Problems

    Work each one out, then reveal the answer or check it in the calculator.

    1. Find the 8-bit sum and two's complement checksum of 12 34 56 (hex).

      \text{0x12} + \text{0x34} + \text{0x56}
      Show answerS = \text{0x9C},\ C_2 = \text{0x64}
    2. Find the 8-bit checksum of the ASCII text "ABC".

      65 + 66 + 67
      Show answerS = \text{0xC6},\ C_2 = \text{0x3A}
    3. Add the decimal bytes 250 and 10 in an 8-bit register. What is left, and is CF set?

      250 + 10
      Show answer4\ (\text{0x04}),\ CF = 1
    4. Add 7F and 01. Which flag is set?

      \text{0x7F} + \text{0x01}
      Show answer\text{0x80},\ V = 1,\ CF = 0
    5. Is the record 10 20 30 A0 (last byte = checksum) valid?

      \text{0x10} + \text{0x20} + \text{0x30} + \text{0xA0}
      Show answer\text{Yes: sum} = \text{0x100} \equiv \text{0x00}
    6. Find the checksum of the Intel HEX record bytes 10 01 00 00 21 46 01 36 01 21 47 01 36 00 7E FE 09 D2 19 01.

      \text{:10010000…1901}\,??
      Show answerC_2 = \text{0x40}

    Explore More Sum Calculators

    Discover 67 free sum calculators across different categories. Find the right calculator for your needs.

    Browse All 67 Calculators
    Questions and answers

    Frequently Asked Questions

    What is an 8 bit sum calculator?

    An 8 bit sum calculator is an online tool that adds a list of bytes modulo 256 and returns the 1-byte result. This 8 bit sum calculator gives the two's and one's complement checksums, the carry and overflow flags, and can verify a record that ends with its checksum.

    How do you calculate an 8-bit checksum?

    Add all the bytes, keep the remainder after dividing by 256, then subtract that remainder from 256 for the two's complement checksum. For "Hello": 500 mod 256 = 244, and 256 − 244 = 12 = 0x0C.

    What is the difference between one's and two's complement checksums?

    The one's complement checksum is 255 − S (all bits inverted), and the two's complement checksum is 256 − S (inverted plus 1). Data plus a two's complement checksum sums to 0x00; data plus a one's complement checksum sums to 0xFF.

    Does the 8 bit sum calculator verify Intel HEX lines?

    Yes, the 8 bit sum calculator verifies Intel HEX lines. Pick Verify, paste the bytes after the colon, and the calculator checks that all bytes including the checksum sum to 0x00.

    What is 255 + 1 in 8 bits?

    255 + 1 in 8 bits is 0 with the carry flag set. 0xFF + 0x01 = 0x100, and an 8-bit register keeps only the low byte 0x00.

    When does an 8-bit sum set the overflow flag?

    An 8-bit sum sets the overflow flag when 2 bytes with the same sign bit produce a result with the opposite sign bit. 0x7F + 0x01 (127 + 1) gives 0x80, which reads as −128, so V = 1.

    Can an 8-bit checksum detect every error?

    No, an 8-bit checksum cannot detect every error. It catches all single-bit errors but misses swapped bytes and any set of changes that cancel out modulo 256; about 1 in 256 random corruptions passes unnoticed.

    Is an 8-bit sum the same as CRC-8?

    No, an 8-bit sum is not the same as CRC-8. The sum adds bytes; CRC-8 divides the message by a polynomial such as 0x07, which detects reordered bytes and burst errors.

    Conclusion

    An 8 bit sum adds bytes and keeps the total modulo 256, and the 8 bit sum calculator turns that sum into the one's and two's complement checksums with the carry and overflow flags. Use Compute to build a checksum for a record, Verify to test a line from an Intel HEX file, and the flag rows to debug 8-bit arithmetic on a microcontroller.

    Not sure which 8-bit check your format uses? Answer the questions below.

    InteractiveWhich 8-bit checksum does your format need?