Fugue.Bits.Byte

Module Members

and

(Function)

Perform bitwise and of two Bytes.

Type Signature

 fun (Byte, Byte) -> Byte
Argument: x
Type: Byte
Argument: y
Type: Byte
Returns:
Type: Byte

eq

(Function)

Compare two Bytes for equality.

Type Signature

 fun (Byte, Byte) -> Bool
Argument: x
Type: Byte
Argument: y
Type: Byte
Returns:

True if x and y are equal. False otherwise.

Type: Bool

fromInt

(Function)

Convert an Int to a Byte.

Type Signature

 fun (Int) -> Byte
Argument: x

The Int to convert. Must be between 0 and 255.

Type: Int

Returns:

The Byte representation of x.

Type: Byte

toString

(Function)

Convert a Byte to a String.

Type Signature

 fun (Byte) -> String
Argument: x

The Byte to convert.

Type: Byte

Returns:

The binary representation of the Byte as a String.

Example:

bits: Byte.toString(Byte.fromInt(255)) # => "11111111"

Type: String

Byte

(Type)

type Byte:
  _0: Bit
  _1: Bit
  _2: Bit
  _3: Bit
  _4: Bit
  _5: Bit
  _6: Bit
  _7: Bit

A Byte is eight Bits.

Record {

Field: _0
Type: Bit
Field: _1
Type: Bit
Field: _2
Type: Bit
Field: _3
Type: Bit
Field: _4
Type: Bit
Field: _5
Type: Bit
Field: _6
Type: Bit
Field: _7
Type: Bit

}