Skip to content

Instantly share code, notes, and snippets.

@enricobottazzi
Created September 13, 2023 10:27
Show Gist options
  • Save enricobottazzi/e5bf1d674a5458c1d950e79c5a140a69 to your computer and use it in GitHub Desktop.
Save enricobottazzi/e5bf1d674a5458c1d950e79c5a140a69 to your computer and use it in GitHub Desktop.

Open this in zkREPL →

This file can be included into other zkREPLs with include "gist:e5bf1d674a5458c1d950e79c5a140a69";

pragma circom 2.1.4;
include "circomlib/bitify.circom";
template Example () {
signal input a;
component is_in_range = Num2Bits(8);
is_in_range.in <== a;
}
component main { public [ a ] } = Example();
/* INPUT = {
"a": "256"
} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment