Files
nand2tetris/projects/03/a/Bit.hdl
T
QkoSad 7894b48931 .
2025-07-16 13:00:37 +03:00

20 lines
452 B
Plaintext
Executable File

// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/03/a/Bit.hdl
/**
* 1-bit register:
* If load[t] == 1 then out[t+1] = in[t]
* else out does not change (out[t+1] = out[t])
*/
CHIP Bit {
IN in, load;
OUT out;
PARTS:
Mux(a=out2,b=in,sel=load,out=out1);
DFF(in=out1,out=out2,out=out);
}