Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top