Ashley wrote I understood that X - Y equals X + (-Y), where (-Y) is represented as two's compliment, which is toggle all the bits in Y and then plus 1. But I can't see any equality in adding (-Y)'s two's compliment and ~(~X + Y).

But I can't see any equality in adding (-Y)'s two's compliment and ~(~X + Y).

--Mark