Wednesday, May 8, 2013

Or Gate

Truth Table
a b | f(a,b)
------------
0 0 | 0
0 1 | 1
1 0 | 1
1 1 | 1

Boolean Expresions
a+b

---------------------------------------------
CHIP Or
{
    IN a, b;
    OUT out;

    PARTS:
    Not(in=a, out=aNot);
    Not(in=b, out=bNot);
    Nand(a=aNot, b=bNot, out=out);
}
---------------------------------------------

At first this one might seem difficult but since we have the NAND gate the opposite of what we want we just take the opposite of each in and then NAND the results.

No comments:

Post a Comment