1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/sha256/binary/fulladd.zok
2019-09-24 12:05:43 +02:00

10 lines
No EOL
233 B
Text

// FULLADD
import "./halfadd" as HALFADD
import "utils/binary/or" as OR
def main(field a, field b, field car) -> (field, field):
out1, car1 = HALFADD(a, b)
out2, car2 = HALFADD(out1, car)
car3 = OR(car1, car2)
return out2, car3