Each node is a three-terminal p-bit: Vi = sgn[ tanh(I0νi) + rand(−1,+1) ] with input νi = Σj JijVj + hi. With JAB=−1, JAC=JBC=2 and h=(1,1,−2) the network spends its time in the four rows of the AND truth table (C = A AND B). Clamp C = 1 and the inputs are forced to A = B = 1: inversion.