-
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.
- Loading branch information
1 parent
fa24186
commit 2ec3cf7
Showing
1 changed file
with
4 additions
and
4 deletions.
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
// calculates bitwise 'AND' of given two inputs x and y | ||
function BITWISE_AND(x: bigint, y: bigint) { | ||
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) { | ||
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) { | ||
function BITWISE_XOR(x: bigint, y: bigint): bigint { | ||
return x ^ y; | ||
} | ||
|
||
// calculates bitwise 'AND', 'XOR' and 'OR' of given two inputs x and y | ||
function BITWISE_OPERATIONS(x: bigint, y: bigint) { | ||
function BITWISE_OPERATIONS(x: bigint, y: bigint): [bigint, bigint, bigint] { | ||
return [BITWISE_AND(x, y), BITWISE_XOR(x, y), BITWISE_OR(x, y)]; | ||
} |