Physics — Logic: parity (XOR tree)
A tree of XOR gates computes 3-input parity.
Make it your own.
title "3-input parity (XOR tree)"
type gates
input A at (0,0)
input B at (0,2)
input C at (0,4)
gate XOR G1 at (3,1)
gate XOR G2 at (6,2)
output P at (9,2)
wire A G1
wire B G1
wire G1 G2
wire C G2
wire G2 P