2.2 Logic gates of a bit subtractor

Let us define R(x,y) as the result (difference) of subtracting bit y from bit x. Likewise, B(x,y) is the borrow from the next digit as the result of subtracting bit y from bit x.

The rules states in the previous section can be captured by logical operations. For R(x,y), the result is a 1 iff xy. As a result, R(x,y) = xy + xy (logical operators), which is the same as R(x,y) for addition.

B(x,y) is a 1 iff x = 0,y = 1. This can be coded by B(x,y) = xy.