What Two Checksum Bytes Actually Cost
What Two Checksum Bytes Actually Cost
Ada re-derives this chapter’s own numbers step by step, at full precision
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.
See the relationship before changing it
The figure reads from left to right. The blue card is checksum size. The middle card applies the page rule. The green card is airtime increase. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 2 bytes.
- 2
Name the relationship. increase = ((14 + checksum bytes) / 14 - 1) x 100
- 3
Substitute with units. ((14 + 2) / 14 - 1) x 100 = 14.29%
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change checksum size
Try Predict the direction of increase = ((14 + checksum bytes) / 14 - 1) x 100. Test another checksum size, then compare airtime increase.
Observe The checksum buys strong detection with a small but visible airtime cost. Reset checksum size to 2 and compare airtime increase.
Explain The checksum buys strong detection with a small but visible airtime cost.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
Ready: use the stated baseline inputs, then compare each displayed result.
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 is4.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.