PageRenderTime 17ms CodeModel.GetById 15ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/1/And.hdl

http://github.com/happy4crazy/elements_of_computing_systems
Unknown | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | f475dd4f0b15f182cee2956b9fdd851d MD5 | raw file
 1// This file is part of the materials accompanying the book 
 2// "The Elements of Computing Systems" by Nisan and Schocken, 
 3// MIT Press. Book site: www.idc.ac.il/tecs
 4// File name: projects/01/And.hdl
 5
 6/**
 7 * And gate: out = a and b.
 8 */
 9
10CHIP And {
11
12    IN  a, b;
13    OUT out;
14
15    PARTS:
16    Nand(a=a, b=b, out=left);
17    Nand(a=a, b=b, out=right);
18    Nand(a=left, b=right, out=out);
19}