Skip to content

Commit

Permalink
elementary logic gates
Browse files Browse the repository at this point in the history
  • Loading branch information
syhner committed May 29, 2022
1 parent 90fce5d commit 98bcc97
Show file tree
Hide file tree
Showing 46 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.out
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ CHIP Not {
OUT out;

PARTS:
// Put your code here:
Nand(a=in, b=in, out=out);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ CHIP And {
OUT out;

PARTS:
// Put your code here:
Nand(a=a, b=b, out=aNandb);
Not(in=aNandb, out=out);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ CHIP Or {
OUT out;

PARTS:
// Put your code here:
Not(in=a, out=Nota);
Not(in=b, out=Notb);
And(a=Nota, b=Notb, out=NotaAndNotb);
Not(in=NotaAndNotb, out=out);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ CHIP Xor {
OUT out;

PARTS:
// Put your code here:
Not(in=a, out=Nota);
Not(in=b, out=Notb);
And(a=a, b=Notb, out=aAndNotb);
And(a=Nota, b=b, out=NotaAndb);
Or(a=aAndNotb, b=NotaAndb, out=out);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ CHIP Mux {
OUT out;

PARTS:
// Put your code here:
Not(in=sel, out=Notsel);
And(a=a, b=Notsel, out=sela);
And(a=sel, b=b, out=selb);
Or(a=sela, b=selb, out=out);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ CHIP DMux {
OUT a, b;

PARTS:
// Put your code here:
}
Not(in=sel, out=Notsel);
And(a=in, b=Notsel, out=a);
And(a=in, b=sel, out=b);
}
File renamed without changes.

0 comments on commit 98bcc97

Please sign in to comment.