✔️ Add16

This commit is contained in:
Nemo 2020-05-20 16:57:20 +05:30
parent a6a26b6026
commit a4cd0114c3
3 changed files with 25 additions and 3 deletions

View File

@ -31,6 +31,6 @@ Build order as per the website. Cost for each gate in NAND in brackets.
- [x] HalfAdder (Xor+And)
- [x] FullAdder (2 x HalfAdder, 1 Or)
- [x] Add16 (1 x HalfAdder, 15 x FullAdder)
- [ ] Inc16
- [x] Inc16 (1 x Add16)
- [ ] ALU (nostat)
- [ ] ALU (complete)

View File

@ -13,5 +13,22 @@ CHIP Inc16 {
OUT out[16];
PARTS:
// Put you code here:
}
Add16(a=in,
b[0]=true,
b[1]=false,
b[2]=false,
b[3]=false,
b[4]=false,
b[5]=false,
b[6]=false,
b[7]=false,
b[8]=false,
b[9]=false,
b[10]=false,
b[11]=false,
b[12]=false,
b[13]=false,
b[14]=false,
b[15]=false,
out=out);
}

5
projects/02/Inc16.out Normal file
View File

@ -0,0 +1,5 @@
| in | out |
| 0000000000000000 | 0000000000000001 |
| 1111111111111111 | 0000000000000000 |
| 0000000000000101 | 0000000000000110 |
| 1111111111111011 | 1111111111111100 |