Physics — 1-bit Comparator
Outputs for A greater, equal and less than B.
Make it your own.
title "1-bit comparator"
type gates
input A at (0,1)
input B at (0,5)
gate NOT NA at (3,2)
gate NOT NB at (3,4)
gate AND Ggt at (6,1)
gate XNOR Geq at (6,3)
gate AND Glt at (6,5)
output AgtB at (9,1)
output AeqB at (9,3)
output AltB at (9,5)
wire A NA
wire B NB
wire A Ggt
wire NB Ggt
wire A Geq
wire B Geq
wire NA Glt
wire B Glt
wire Ggt AgtB
wire Geq AeqB
wire Glt AltB