For background, I'm trying to calculate a checksum for an IP packet which is stored in constant memory (can't modify it in place). Before doing the checksum, I'm supposed to pretend the existing checksum in the packet is 0. Rather than copy all the data to temporary buffer, and store 0, I'd like to do a checksum of the entire packet, and then subtract the existing checksum from the result.

To do this, I was looking for a one's complement version of subtraction which I found [here](https://courses.cs.vt.edu/csonline/NumberSystems/Lessons/SubtractionWithOnesComplement/index.html). Unfortunately, if I use this, and subtract 0 from 0, I get 0x1111 instead of the expected 0:

1. Convert 0 to one's complement: [1111]
2. Next, we add 0: [1111]
3. no overflow bit, so we're done...

I would have expected 0 - 0 to be 0 -- what am I missing?