Inside of the X-OR(RED) and X-NOR(BLUE) using RTL(Resistor Transistor Logic). The "X-OR" is the invert of the "X-NOR", so it inverts from the PNP transistors for amplifying.
X-OR((+)) X-NOR(ยน/(+))
(-)(-)=(-) (-)(-)=(+)
(-)(+)=(+) (-)(+)=(-)
(+)(-)=(+) (+)(-)=(-)
(+)(+)=(-) (+)(+)=(+)