Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
pure_bitwise.cpp
Go to the documentation of this file.
2
6
7namespace bb::avm2::simulation {
8
10{
11 try {
12 return a & b;
13 } catch (const std::exception& e) {
14 throw BitwiseException("AND, " + std::string(e.what()));
15 }
16}
18{
19 try {
20 return a | b;
21 } catch (const std::exception& e) {
22 throw BitwiseException("OR, " + std::string(e.what()));
23 }
24}
26{
27 try {
28 return a ^ b;
29 } catch (const std::exception& e) {
30 throw BitwiseException("XOR, " + std::string(e.what()));
31 }
32}
33
34} // namespace bb::avm2::simulation
MemoryValue xor_op(const MemoryValue &a, const MemoryValue &b) override
MemoryValue or_op(const MemoryValue &a, const MemoryValue &b) override
MemoryValue and_op(const MemoryValue &a, const MemoryValue &b) override
FF a
FF b