4:1 mux as universal gate

A universal gate is a gate which can implement any given logic function. NAND and NOR gates are basically known as universal gates, since you can implement any logic function with these. A multiplexer, in a sense, can also be termed as a universal gate, since, you can realize any function by using a mux as a look-up-table structure. In this post, we discuss how we can utilize a 4:1 mux as a universal gate realizing 2-input gates.

Any two-input gate gives a definite value (either 0 or 1) for all the combinations of its inputs and can be represented in the form of truth table as shown in table below.


Here, A,B,C & D can be either "0" or "1" depending upon the functionality of the gate. For instance, for a 2-input AND gate, A = B = C = 0 and D = 1.

Utilizing a 4-input mux for implementing this generic 2-input gate, we can implement as shown below:


For instance, 2-input AND gate will be implemented as following:


This post was written as a response to a query from one of our readers. You can also post your query at post your query.

2 comments:

  1. This looks like a decoder, not a mux

    ReplyDelete
    Replies
    1. Hi

      This is a mux only. The output is single bit, either "1" or "0". The output of encoder is multi-bit.

      Delete

Thanks for your valuable inputs/feedbacks. :-)