专门处理 AND OR XOR BYTE 这些按位运算的指令的子电路。在此电路内,位数长的整数被拆成字节,以字节为单位进行逻辑运算。
设计
Witness、Column设计
见代码
pub struct Row {
/// The operation tag, one of AND, OR, XOR
pub tag: Tag,
/// The byte value of operand 0
pub byte_0: U256,
/// The byte value of operand 1
pub byte_1: U256,
/// The byte value of operand 2
pub byte_2: U256,
/// The accumulation of bytes in one operation of operand 0
pub acc_0: U256,
/// The accumulation of bytes in one operation of operand 1
pub acc_1: U256,
/// The accumulation of bytes in one operation of operand 2
pub acc_2: U256,
/// The sum of bytes in one operation of operand 2, used to compute byte opcode
pub sum_2: U256,
/// The counter for one operation
pub cnt: U256,
}