das XOR2 funktioniert lokal, aber das konnte ich nicht einreichen
This commit is contained in:
19
projects/01/abgabe/Or16.hdl
Normal file
19
projects/01/abgabe/Or16.hdl
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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/01/Or16.hdl
|
||||
|
||||
/**
|
||||
* 16-bit bitwise Or:
|
||||
* for i = 0..15 out[i] = (a[i] or b[i])
|
||||
*/
|
||||
|
||||
CHIP Or16 {
|
||||
IN a[16], b[16];
|
||||
OUT out[16];
|
||||
|
||||
PARTS:
|
||||
Not16(in=a,out=nota);
|
||||
Not16(in=b,out=notb);
|
||||
Nand16(a=nota,b=notb,out=out);
|
||||
}
|
||||
Reference in New Issue
Block a user