What Two Checksum Bytes Actually Cost

Ada re-derives this chapter’s own numbers step by step, at full precision

foundations
math-foundations
calculation-audit
networking-core
Ada ADA · CALCULATION AUDIT

What Two Checksum Bytes Actually Cost

This packet-simulator lab weighs a 2-byte checksum against a 10-byte reading behind a 4-byte header, sent over a 250 kbps link by a 10 mW radio. Adding the checksum grows transmit energy by only 14.3% yet lets the receiver reject nearly every corrupted packet. This audit prices both sides of that trade to ask what those two checksum bytes actually cost.

Companion to the chapter Lab: Network Packet Simulator — every number here comes from that chapter.

Ada: The lab makes a trade-off claim: a 2-byte checksum adds only about 14% to transmit energy while catching nearly every corrupted packet. Let me price both sides with the lab’s own 10-byte reading, 4-byte header, 250 kbps link, and 10 mW radio.

First the size. With no checksum the frame is 4 + 10 = 14 bytes; adding the 2-byte checksum makes it 4 + 10 + 2 = 16 bytes.

  • Airtime per byte: 8 bits / 250000 bps = 0.000032 s = 0.032 ms.
  • 14-byte energy: 0.010 W x (14 x 8 / 250000) s = 0.010 x 0.000448 = 4.48e-6 J, which is 4.48e-6 / 3600 x 1e6 = 0.001244 uWh.
  • 16-byte energy: 0.010 x (16 x 8 / 250000) = 0.010 x 0.000512 = 5.12e-6 J = 0.001422 uWh.
  • Cost of the two extra bytes: 16 / 14 - 1 = 0.142857, i.e. +14.3%.

Now the benefit. A 2-byte checksum has 2^16 = 65536 possible values, so a random corruption slips through only about 1 / 65536 = 0.00001526; detection is 1 - 0.00001526 = 0.99998474, i.e. 99.998%. (A 4-byte CRC32 drives the miss rate to 1 / 2^32 = 1 / 4294967296, roughly one in four billion.)

The design meaning is the lopsided exchange rate: 14.3% more airtime buys the difference between accepting every silent corruption and rejecting all but 1 in 65,536 of them. For context, that same 2-byte cost is 23.1% of a fully-loaded 26-byte packet (6 / 26) once the payload is 20 bytes — so error detection is cheap in energy but not free in the overhead budget, which is why the choice still belongs in the packet design record rather than being switched on by reflex.

Every number above is taken from the chapter’s own material and re-derived step by step.