Here is nand, nor, and xor. I got xor on my first attempt (and the others, but they were easier after knowing negation). My solution to xor reminds me of this equivalent logical expression I made earlier:
nand(x, y): 1 - (x * y)
nand(1, 1): 1 - (1) = 0
nand(1, 0): 1 - (0) = 1
nand(0, 1): 1 - (0) = 1
nand(0, 0): 1 - (0) = 1
nor:(x, y): 1 - ceil(x/2 + y/2)
nor(1, 1): 1 - ceil(0.5 + 0.5) = 0
nor(1, 0): 1 - ceil(0.5 + 0) = 0
nor(0, 1): 1 - ceil(0 + 0.5) = 0
nor(0, 0): 1 - ceil(0 + 0) = 1
xor(x, y) = ceil(x/2 + y/2) - xy
xor(1, 1) = ceil(0.5 + 0.5) - 1 = 0
xor(1, 0) = ceil(0.5 + 0) - 0 = 1
xor(0, 1) = ceil(0 + 0.5) - 0 = 1
xor(0, 0) = ceil(0 + 0) - 0 = 0