Skip to content

Commit

Permalink
made builtins usable and added tests (#63)
Browse files Browse the repository at this point in the history
* made all buitlins operational (except ecsda and output) and added individual tests for each one of them

* added number of output cells for builtins with multiple outputs

* updated test file

* fixed TO_SIGNED_INTEGER naming coherence
  • Loading branch information
AntoineFONDEUR authored Dec 12, 2024
1 parent c3cc029 commit 59ffa4c
Show file tree
Hide file tree
Showing 26 changed files with 7,525 additions and 358 deletions.
15 changes: 15 additions & 0 deletions cairo0/builtins/bitwise_builtin.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%builtins bitwise

from starkware.cairo.common.cairo_builtins import BitwiseBuiltin

func main{bitwise_ptr: BitwiseBuiltin*}() {
assert bitwise_ptr.x = 12; // Binary 1100
assert bitwise_ptr.y = 10; // Binary 1010
assert bitwise_ptr.x_and_y = 8; // Binary 1000
assert bitwise_ptr.x_xor_y = 6; // Binary 0110
assert bitwise_ptr.x_or_y = 14; // Binary 1110

let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;

return ();
}
Loading

0 comments on commit 59ffa4c

Please sign in to comment.