2:4 DECODER
(5TH SEM ECE HDL)
A decoder is a circuit that changes a code into a set of signals. It is called a decoder because it does the reverse of encoding, but we will begin our study of encoders and decoders with decoders because they are simpler to design.
A common type of decoder is the line decoder which takes an n-digit binary number and decodes it into 2ndata lines. The simplest is the 1-to-2 line decoder.
VERILOG CODE (ECE HDL )
module (input a,b,
output p,q,r,s);
assign p=(~a)&(~b);
assign q=(~a)&(b);
assign r=(a)&(~b);
assign s=(a)&(b);
endmodule
TRUTH TABLE
video link for explantion===https://youtu.be/6hXhdhNNtc8
Another code for 2:4 Decoder
Simulation Graph





No comments:
Post a Comment