--- id: bitwise-reference title: Bitwise description: Operations on bytes hide_table_of_contents: true --- import Syntax from '@theme/Syntax'; import SyntaxTitle from '@theme/SyntaxTitle'; function and : nat -> nat -> nat val and : nat -> nat -> nat let and: (nat, nat) -> nat A bitwise `and` operation. function or : nat -> nat -> nat val or : nat -> nat -> nat let or: (nat, nat) -> nat A bitwise `or` operation. function xor : nat -> nat -> nat val xor : nat -> nat -> nat let xor: (nat, nat) -> nat A bitwise `xor` operation. function shift_left : nat -> nat -> nat val shift_left : nat -> nat -> nat let shift_left: (nat, nat) -> nat A bitwise shift left operation. function shift_right : nat -> nat -> nat val shift_right : nat -> nat -> nat let shift_right: (nat, nat) -> nat A bitwise shift right operation.