Skip to main content

Module word

Module word 

Source
Expand description

Fixed-width balanced ternary word types.

Trit storage is little-endian: trit zero is the least-significant trit.

§Common types

  • Tribble — 3 trits, range -13 through +13
  • Tryte / Word9 — 9 trits, range -9,841 through +9,841
  • Word27 — 27 trits
  • Word54 — 54 trits, used for extended-width arithmetic

Word is generic over its trit count, allowing ISA crates to use widths such as Word<24> and Word<32> without adding more core types.

Structs§

Word
A fixed-width balanced ternary integer containing N trits.

Enums§

WordError
Errors returned by fixed-width ternary-word operations.

Traits§

CheckedDiv
Checked division supporting potentially different operand widths.

Type Aliases§

Tribble
A 3-trit balanced ternary integer.
Tryte
A 9-trit balanced ternary integer.
Word9
Alias for Tryte.
Word27
A 27-trit balanced ternary integer.
Word54
A 54-trit balanced ternary integer.