Wednesday, April 29, 2020

[hiykzdfz] Sensitivity of binary addition

Consider computing the sum of 2 given binary numbers.  For each bit of both addends, determine which bits of the sum that would change if the addend bit were flipped.  Label each addend bit with the number of output bits it affects.

This should be easy.  Not sure what this is useful for, because it requires the inputs to be given.

A single flipped bit, causing or preventing a carry, can affect many bits of the sum if it is adjacent to a long consecutive run of bits adding 0+1 or 1+0.  This long-range data dependence of addition gives ARX ciphers their security, and a potential side-channel vulnerability.

It might be interesting to illustrate this in base 10 in the evaluation of the 196 problem (Lychrel numbers).  There are some details that would need to be worked out.

This exercise could also be extended to adding more than 2 numbers.

No comments :