# Struggling with the OR implementation

5 messages
Open this post in threaded view
|

## Struggling with the OR implementation

 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 ?
Open this post in threaded view
|

## Re: Struggling with the OR implementation

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

## Re: Struggling with the OR implementation

 Can you post an example ?
 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