Boolean Logic - Conversion from AND to OR and OR to AND

1.5k Views Asked by At

is there a simple boolean equation that :

Given Equals
A+B AB
AB A+B
!A+!B !A!B
!A!B !A+!B

I figured that it would require to flip the sign, but then it lead me to this

Given Flip Equals
AB A !AB
A+B B A+!B
A!B AB !AB
A+!B BA !A+B

I do not understand how to necesarily word it, so I figured that the table would work better. Would the first one be considerd "flipping the function"?

When it comes to gates, AND, OR, NOT, NOR, NAND,XOR,XNOR are able to be used, so pretty much anything is on the table.

Closest i have been would be to simply run the equation through NOT, and it flips froms DeMorgan's Theorem.

1

There are 1 best solutions below

0
On

The up arrow is the Sheffer stroke symbol ($\uparrow$) represents the NAND. The down arrow is the Peirce's arrow symbol ($\downarrow$) and represents the NOR. Both of these are universal gates. This means that using one of them you can create any gate or operation you want. They can do any form of computation. But for the sake of this example, we just show AND versus OR.

$$(A \uparrow B) \uparrow (A \uparrow B) = A \land B$$

$$(A \downarrow B) \downarrow (A \downarrow B) = A \lor B$$

If you are able to swap the universal gates on the fly you have changed the two operations. Otherwise you would have to make some more complicated circuit that can swap signals based on an IF-statement and reroute the signals to one of these gates based on your input.

There is not just one way to to this; If you read the OR- and AND-constructions you can also swap the signals $A$ with $B$:

$$(A \downarrow A) \downarrow (B \downarrow B) = A \land B$$

into:

$$(A \downarrow B) \downarrow (A \downarrow B) = A \lor B$$ using only NOR-gates.

So what this last example shows is that if we swap the second and third signal we swap the entire operation from AND to OR. Swap it back to get from OR to AND etc.

Here's the entire list of swapping AND to OR and OR to AND using NOR or NAND:

Using NOR gates:

A OR B  = (A NOR B) NOR (A NOR B)
A AND B = (A NOR A) NOR (B NOR B)

Using NAND gates:

A AND B = (A NAND B) NAND (A NAND B)
A OR B  = (A NAND A) NAND (B NAND B)

Conclusion

There are two ways to turn AND into OR or OR into AND. Either swap the logical gate (logic operator) or reroute the signal going into two of the lines inside the circuit.