A collection of utilities for working with a Byte.
Converts an Int to a Byte.
fromInt 3 : ByteConverts a Byte to an Int.
(fromInt 3 |> toInt) == 3Guaranteed to be in the range: 10 <= n < 2^8.
Adds two Bytes.
Increment a Byte.
Subtracts the second Byte from the first.
Decrement a Byte.
Returns True if the Byte is zero.
Bitwise and (&) two Bytes.
Bitwise or (|) two Bytes.
Bitwise xor two Bytes.
Shifts a Byte left.
Shifts Byte right, preserving sign.
Shifts Byte right, filling with zeroes.
Rotate a Byte left.
Rotate a Byte right.
Bitwise complement (flips each bit).
Returns a Bool indicating whether or not the bit is set.
Returns a Bool indicating whether or not the least significant
bit is set.
Returns a Bool indicating whether or not the most significant
bit is set.
Sets the nth bit of the Byte.
Resets the nth bit of the Byte.
Sets or resets the nth bit of the Byte.
Returns an Int respresenting the higher 4 bits.
Returns an Int respresenting the lower 4 bits.
Swaps the high and low nibbles of the Byte.
Carry.These functions return a Carry instead of a Byte to check whether or not
the operation overflowed the Byte. You can get the resulting byte using
Carry.unwrap.
A type alias for Carry result of a Byte operation.
Adds two Bytes, returning a Carry.
Increment a Byte, returning a Carry.
Subtracts the second Byte from the first, returning a carry.
Decrement a Byte, returning a Carry.
Shifts a Byte left.
Shifts Byte right, preserving sign.
Shifts Byte right, filling with zeroes.
An opaque type respresenting an 8-bit unsigned integer.