Physics — 2-to-4 Line Decoder
Two inputs select one of four outputs.
Make it your own.
title "2-to-4 line decoder"
type gates
input A at (0,1)
input B at (0,5)
gate NOT NA at (2,2)
gate NOT NB at (2,6)
gate AND G0 at (5,0.5)
gate AND G1 at (5,2.5)
gate AND G2 at (5,4.5)
gate AND G3 at (5,6.5)
output Y0 at (8,0.5)
output Y1 at (8,2.5)
output Y2 at (8,4.5)
output Y3 at (8,6.5)
wire A NA
wire B NB
wire NA G0
wire NB G0
wire A G1
wire NB G1
wire NA G2
wire B G2
wire A G3
wire B G3
wire G0 Y0
wire G1 Y1
wire G2 Y2
wire G3 Y3