Readme, License Fixes and another test added

This commit is contained in:
Jordi Baylina
2018-09-05 19:46:24 +02:00
parent 276a28c73e
commit 296defda85
22 changed files with 18 additions and 79 deletions

20
circuits/tobin.circom Normal file
View File

@@ -0,0 +1,20 @@
template toBin(n) {
signal input inp;
signal output out[n];
var lc1=0;
for (var i = 0; i<n; i++) {
out[i] <-- (inp >> i) & 1;
out[i] * (out[i] -1 ) === 0;
lc1 += out[i] * 2**i;
}
lc1 === inp;
}
component toBin(3) main;