gleam/bitwise

A set of functions for bitwise operations on integers.

Functions

pub external fn and(Int, Int) -> Int

Calculates the bitwise AND of its arguments.

pub external fn exclusive_or(Int, Int) -> Int

Calculates the bitwise XOR of its arguments.

pub external fn not(Int) -> Int

Calculates the bitwise NOT of its argument.

pub external fn or(Int, Int) -> Int

Calculates the bitwise OR of its arguments.

pub external fn shift_left(Int, Int) -> Int

Calculates the result of an arithmetic left bitshift.

pub external fn shift_right(Int, Int) -> Int

Calculates the result of an arithmetic right bitshift.