-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added bitwise builtin functions * added function output types * updated bitwise, introduced custom functions * updated custom function to take two inputs * Update src/builtins/bitwise/bitwise.ts --------- Co-authored-by: Clément Walter <clement0walter@gmail.com>
- Loading branch information
1 parent
14657ff
commit f8f9ef7
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// calculates bitwise 'AND' of given two inputs x and y | ||
function bitwise_and(x: bigint, y: bigint): bigint { | ||
return x & y; | ||
} | ||
|
||
// calculates bitwise 'OR' of given two inputs x and y | ||
function bitwise_or(x: bigint, y: bigint): bigint { | ||
return x | y; | ||
} | ||
|
||
// calculates bitwise 'XOR' of given two inputs x and y | ||
function bitwise_xor(x: bigint, y: bigint): bigint { | ||
return x ^ y; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters