summaryrefslogtreecommitdiff
path: root/tools/builtInChips/Mux.hdl
blob: a0eefbc5f964d7199d88e20675048d44b64d1486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: tools/builtIn/Mux.hdl

/** 
 * Multiplexor. If sel == 1 then out = b else out = a.
 */

CHIP Mux {

    IN  a, b, sel;
    OUT out;

    BUILTIN Mux;
}