3 To 8 Decoder

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

3 TO 8 DECODER

module decoder(c0,c1,c2,c3,c4,c5,c6,c7,a,b,c,d);
input a,b,c,d;
output c0,c1,c2,c3,c4,c5,c6,c7;
wire na,nb,nc,nd;
not n1(na,a);
not n2(nb,b);
not n3(nc,c);
not n4(nd,d);
nand n5(c0,na,nb,nc,nd);
nand n6(c1,na,nb,c,nd);
nand n7(c2,na,b,nc,nd);
nand n8(c3,na,b,c,nd);
nand n9(c4,a,nb,nc,nd);
nand n10(c5,a,nb,c,nd);
nand n11(c6,a,b,nc,nd);
nand n12(c7,a,b,c,nd);
endmodule

You might also like