Tuesday, November 20, 2012

Boolean Logic : Activity 4

Activity 4 : Build OR from primitive NAND

// This file is part of the materials accompanying the book
// "The Elements of Computing Systems" by Nisan and Schocken,
// MIT Press. Book site: www.idc.ac.il/tecs
// File name: projects/01/Or.hdl

 * Or gate: out = 1 if {a==1 or b==1}, 0 otherwise

    IN a, b;
    OUT out;

    // Put your code here.
    Nand(a=a, b=a, out=w1);
    Nand(a=b, b=b, out=w2);
    Nand(a=w1, b=w2, out=out);

Well, I just made truth tables for basic gates and saw that Nand of nota and notb matched that of or.
So this solution was out of observation. Please share if this can be done logically.

Downloads :

No comments:

Post a Comment