It does rely on negative numbers. Let’s see
(0-0+2) remainder 2 = 0
(1-0+2) remainder 2 = 1 + 2 remainder 2 = 3 remainder 2 = 1
(0-1+2) remainder 2 = -1 + 2 remainder 2 = 1 remainder 2 = 1
(1-1+2) remainder 2 = 0 + 2 remainder 2 = 2 remainder 2 = 0
Hmm. Yeah I could’ve added two and not dealt with negative numbers.
or(x,y) = (x+y+xy) remainder 2
or(0,0) = (0+0+0) remainder 2 = 0
or(1,0) = (1+0+0) remainder 2 = 1
or(0,1) = (0+1+0) remainder 2 = 1
or(1,1) = (1+1+1) remainder 2 = 3 remainder 2 = 1