mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 19:26:43 +01:00
All Bit and logical operators working
This commit is contained in:
18
test/circuits/opscmp.circom
Normal file
18
test/circuits/opscmp.circom
Normal file
@@ -0,0 +1,18 @@
|
||||
template OpsCmp() {
|
||||
signal input in[2];
|
||||
signal output lt;
|
||||
signal output leq;
|
||||
signal output eq;
|
||||
signal output neq;
|
||||
signal output geq;
|
||||
signal output gt;
|
||||
|
||||
lt <-- in[0] < in[1];
|
||||
leq <-- in[0] <= in[1];
|
||||
eq <-- in[0] == in[1];
|
||||
neq <-- in[0] != in[1];
|
||||
geq <-- in[0] >= in[1];
|
||||
gt <-- in[0] > in[1];
|
||||
}
|
||||
|
||||
component main = OpsCmp();
|
||||
Reference in New Issue
Block a user