Struggling with the OR implementation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Struggling with the OR implementation

Konstantin
I am having hard time understanding this:

"The Nand function has an interesting theoretical property: Each one of the operations And, Or, and Not can be constructed from it, and it alone (e.g., x Or y= (x Nand x) Nand (y Nand y)."

How do you logically arrive at the conclusion that x Or Y = (x Nand x) Nand (y Nand y) from the canonical form of the Or function. Also I did not have any issues implementing the Not or And functions, but need some pushing in the right direction with implementing the Or function. I just cant see the logic with implementing this one. Is the approach of just brute force try and error the correct way to solve this, or am I missing some fundamentals here ?
Reply | Threaded
Open this post in threaded view
|

Re: Struggling with the OR implementation

ybakos
Take a look at the table of boolean expressions in the relevant book chapter. Notice how you can use substitution in boolean algebra.
Reply | Threaded
Open this post in threaded view
|

Re: Struggling with the OR implementation

Konstantin
Can you post an example ?
Reply | Threaded
Open this post in threaded view
|

Re: Struggling with the OR implementation

cadet1620
Administrator
This is called De Morgan's law and is usually stated
    NOT (a AND b) = (NOT a) OR (NOT b)
    NOT (a OR b) = (NOT a) AND (NOT b)
You can research its algebraic proof on the internet.

Here's a truth table proof
    a  b ~(ab) ~a ~b ~a+~b
    0  0   1    1  1   1
    0  1   1    1  0   1
    1  0   1    0  1   1
    1  1   0    0  0   0
--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Struggling with the OR implementation

Konstantin
Thank you for the De Morgan's law pointer.