Change Gate from AND to OR (Slectable Logic)

Status
Not open for further replies.

adamey

Member
Is there such a device, or do I have to do this using multiple gates? I have a project where it would be handy to have a pair of inputs, and by using a third input change the gate from an AND to an OR gate.
 
Write out the Boolean equations of your Logic Function, and implement that with gates...

A two input multiplexer along with the AND and OR gates would work; so would a 2bit ALU.

Here is the equation:

O = S'AB + S(A+B) = S'AB + SA + SB = AB + SA + SB, where (A OR B) is selected when S is TRUE, and (A AND B) is selected when S is FALSE.
 
Last edited:
Three 2-input exclusive-OR gates, one placed at each input and one at the output of an AND gate, is another option. An XOR gate acts like a controllable inverter. One input of each XOR is the control input and the other inputs are the signal inputs. When the control input of all XORs are low, the output with be the AND function. When the control input of all XORs are high, the output will be the OR function.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…