2-input OR gate using 2x1 mux: Figure 5 below shows the truth table for a 2-input OR gate. If we observe carefully, OUT equals B when A is '0'. Similarly, OUT is '1' (or A), when A is '1'. So, we can make a 2:1 mux act like a 2-input OR gate, if we connect D0 pin to B and D1 pin to A, with select connected to A.
Figure 5: Truth table of 2-input OR gate |
Figure 6 below shows the implementation of 2-input OR gate using a 2:1 multilpexer:
Figure 6: Implementation of 2-input OR gate using 2:1 mux |