mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 11:16:42 +01:00
All Bit and logical operators working
This commit is contained in:
18
test/circuits/opsbit.circom
Normal file
18
test/circuits/opsbit.circom
Normal file
@@ -0,0 +1,18 @@
|
||||
template OpsBit() {
|
||||
signal input in[2];
|
||||
signal output and;
|
||||
signal output or;
|
||||
signal output xor;
|
||||
signal output not1;
|
||||
signal output shl;
|
||||
signal output shr;
|
||||
|
||||
and <-- in[0] & in[1];
|
||||
or <-- in[0] | in[1];
|
||||
xor <-- in[0] ^ in[1];
|
||||
not1 <-- ~in[0];
|
||||
shl <-- in[0] << in[1];
|
||||
shr <-- in[0] >> in[1];
|
||||
}
|
||||
|
||||
component main = OpsBit();
|
||||
Reference in New Issue
Block a user