Question

In: Computer Science

Show the gate level implementation of a decoder as well as an encoder, then explain the...

Show the gate level implementation of a decoder as well as an encoder, then explain the functionality of each one, and show what happens if you connect them together.

Solutions

Expert Solution

Answer : Given data

  • DECODER :-

1. Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines.

2. One of these outputs will be active High based on the combination of inputs present, when the decoder is enabled.

3. That means decoder detects a particular code. The outputs of the decoder are nothing but the min terms of ‘n’ input variables lineslines, when it is enabled.

4. Lets consider 2 to 4 decoder, which has 2 inputs and 4 outputs.

fig. 2:4 Decoder

5. As shown in above fig. A1 & A2 are two inputs and Y1, Y2, Y3 & Y4 are output lines.

Enable Inputs Outputs
E A0 A1 Y0 Y1 Y2 Y3
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0

6. From given Truth table of decoder, we can write the Boolean expression for each output as follows

Y3 = E.A1.A0Y3 = E.A1.A0

Y2 = E.A1.A0′Y2 = E.A1.A0′

Y1 = E.A1′.A0Y1 = E.A1′.A0

Y0=E.A1′.A0′

7. In each of above equation there is product of inputs or there complement, so we will use AND gate for product and NOT gate to obtain the complement.

     

fig. Implementation using logic gate

9. Figure shows the decoder circuit using AND and NOT gate. Output will be proper only if enable is high, else when enable is zero output will be zero for each input combination.

  • ENCODER :-

1. An Encoder is a combinational circuit that has maximum of 2n input lines and ‘n’ output lines.

2. It performs the reverse operation of Decoder.

3. It will produce a binary code equivalent to the input, which is active High. Therefore, the encoder encodes 2n input lines with ‘n’ bits. It is optional to represent the enable signal in encoders.

4. Lets consider 4 to 2 encoder, which has 4 inputs and 2 outputs.

fig. 4:2 Encoder

5. As shown in above fig. A1 & A2 are two outputs and Y1, Y2, Y3 & Y4 are input lines.

Inputs Outputs
Y0 Y1 Y2 Y3 A0 A1
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1

6. From given Truth table of encoder, we can write the Boolean expression for each output as follows

A1 = Y3+Y2

A0 = Y3+Y1

7. We can implement the above two Boolean functions by using two input OR gates.

   fig. Implementation using logic gate

8. Fig. shows the implementation of encoder using two OR gates.

9.

When we connect encoder output to the inputs of decoder , at decoder output we will get original output. This happens because encoding and decoding of same input is done. Similarly, when we connect encoder output to the input of decoder , at decoder output we get original input.

_______________THE END________________


Related Solutions

Show the gate level implementation of a decoder as well as an encoder, then explain the...
Show the gate level implementation of a decoder as well as an encoder, then explain the functionality of each one, and show what happens if you connect them together.
explain a hamming encoder (7,4) hamming decoder (7,4) scan test.
explain a hamming encoder (7,4) hamming decoder (7,4) scan test.
By using Logisim A) Show that the NAND gate implementation of the AND function is equivalent...
By using Logisim A) Show that the NAND gate implementation of the AND function is equivalent to the AND gate. B) Show how that the NAND gate implementation of the OR function is equivalent to the OR gate. C) Show that the Associative Law holds. D) Show that the Distributive law holds.
introduction: C PROGRAMMING For this assignment you will write an encoder and a decoder for a...
introduction: C PROGRAMMING For this assignment you will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the...
**Use C** You will write an encoder and a decoder for a modified "book cipher." A...
**Use C** You will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number...
**Use C** You will write an encoder and a decoder for a modified "book cipher." A...
**Use C** You will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number...
Digital System Design Write the verilog HDL code for 2-4 decoder (Gate level modeling) along with...
Digital System Design Write the verilog HDL code for 2-4 decoder (Gate level modeling) along with the testbench and simulate using ModelSim. Upload the assignment (i) code (ii) testbench (iii) simulation in single pdf file.
If you only had 4:16 One Hot Decoder and an OR gate with the number of...
If you only had 4:16 One Hot Decoder and an OR gate with the number of inputs of your choosing, fill in the blanks to explain how you would implement the function with the hardware you were provided. There are 4 inputs for this function, 1) I would choose an OR gate with (2, 3, 4, ..., 16) inputs 2) For input  , I would connect it to input (0, 1, 2, 3) of the decoder 3) For input , I...
If you only had 4:16 One Hot Decoder and an OR gate with the number of...
If you only had 4:16 One Hot Decoder and an OR gate with the number of inputs of your choosing, fill in the blanks to explain how you would implement the function x 3 x 2 x 1 ¯ + x 3 ¯ x 2 ¯ x 0 with the hardware you were provided. There are 4 inputs for this function, x 3 − x 0 1) I would choose an OR gate with (2, 3, 4, ..., 16) inputs...
Create a message encoder/decoder. PLEASE USE BASIC PYTHON METHODS/FUNCTIONS. The user enters a message that could...
Create a message encoder/decoder. PLEASE USE BASIC PYTHON METHODS/FUNCTIONS. The user enters a message that could only include alphabetic letters and space. There are 26 alphabetic letters. Consider space the 27th letter. The user then enters a shift code that should be an integer between -26 and 26. The application will show the encoded/decoded message based on the shift code entered. If you encode a message, each letter in the message will be moved forward through the alphabet according to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT