Fugue.Bits.Word

Module Members

and

(Function)

Bitwise and of two Words.

Type Signature

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

eq

(Function)

Compare two Words for equality.

Type Signature

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

True if x and y are equal. False otherwise.

Type: Bool

fromInt

(Function)

Convert an Int to a Word.

Type Signature

 fun (Int) -> Word
Argument: x

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

Type: Int

Returns:

The Word representation of x.

Type: Word

toString

(Function)

Convert a Word to a String.

Type Signature

 fun (Word) -> String
Argument: x

The Word to convert.

Type: Word

Returns:

The binary representation of the Word as a String

Example:

bits: Word.toString(Word.fromInt(255)) # => “00000000000000000000000011111111”

Type: String

Word

(Type)

type Word:
  _0: Byte
  _1: Byte
  _2: Byte
  _3: Byte

A Word is four bytes.

Record {

Field: _0
Type: Byte
Field: _1
Type: Byte
Field: _2
Type: Byte
Field: _3
Type: Byte

}