i24

User Guide

  • Installation
    • Requirements
    • Installing from PyPI
      • Installing a Specific Version
      • Upgrading
    • Installing from Source
  • Basic Usage
    • Creating Instances
      • From Python int
      • Value Range Validation
      • From Bytes
    • Converting to Python Types
      • To int
      • To Bytes
    • Comparisons
    • String Representations
    • Hashing
    • Immutability
    • Class Attributes
    • Type Checking
  • Arithmetic Operations
    • Basic Arithmetic
      • Standard Operators
      • Overflow Behavior
      • Division by Zero
    • Checked Arithmetic
      • Addition
      • Subtraction
      • Multiplication
      • Division
    • Wrapping Arithmetic
    • Saturating Arithmetic
    • Unary Operations
      • Negation
      • Absolute Value
      • Positive
    • Best Practices
  • Byte Operations
    • Byte Order (Endianness)
    • Converting to Bytes
      • Basic Conversion
      • Signed vs Unsigned
    • Creating from Bytes
      • Basic Creation
      • Validation
    • Bitwise Operations
      • AND, OR, XOR
      • Bitwise NOT
      • Left and Right Shift
    • Bit Manipulation Methods
      • Counting Bits
      • Bit Length

API Reference

  • I24 Class
    • I24
    • Class Attributes
      • I24.min_value
      • I24.max_value
    • Construction Methods
      • I24.__init__()
      • I24.from_bytes()
    • Conversion Methods
      • I24.to_int()
      • I24.to_bytes()
    • Comparison Operators
      • I24.__eq__()
      • I24.__ne__()
      • I24.__lt__()
      • I24.__le__()
      • I24.__gt__()
      • I24.__ge__()
    • Arithmetic Operators
      • I24.__add__()
      • I24.__sub__()
      • I24.__mul__()
      • I24.__truediv__()
      • I24.__floordiv__()
      • I24.__mod__()
    • Bitwise Operators
      • I24.__and__()
      • I24.__or__()
      • I24.__xor__()
      • I24.__lshift__()
      • I24.__rshift__()
      • I24.__invert__()
    • Unary Operators
      • I24.__neg__()
      • I24.__pos__()
      • I24.__abs__()
    • Special Methods
      • I24.__int__()
      • I24.__str__()
      • I24.__repr__()
      • I24.__hash__()
    • Rounding Methods
      • I24.__round__()
      • I24.__ceil__()
      • I24.__floor__()
      • I24.__trunc__()
    • Bit Manipulation Methods
      • I24.count_ones()
      • I24.count_zeros()
      • I24.leading_zeros()
      • I24.trailing_zeros()
      • I24.bit_length()
      • I24.bit_count()
    • Checked Arithmetic Methods
      • I24.checked_add()
      • I24.checked_sub()
      • I24.checked_mul()
      • I24.checked_div()
    • Wrapping Arithmetic Methods
      • I24.wrapping_add()
      • I24.wrapping_sub()
      • I24.wrapping_mul()
    • Saturating Arithmetic Methods
      • I24.saturating_add()
      • I24.saturating_sub()
      • I24.saturating_mul()
    • Utility Methods
      • I24.as_integer_ratio()
  • U24 Class
    • U24
    • Class Attributes
      • U24.min_value
      • U24.max_value
    • Construction Methods
      • U24.__init__()
      • U24.from_bytes()
    • Conversion Methods
      • U24.to_int()
      • U24.to_bytes()
    • Comparison Operators
      • U24.__eq__()
      • U24.__ne__()
      • U24.__lt__()
      • U24.__le__()
      • U24.__gt__()
      • U24.__ge__()
    • Arithmetic Operators
      • U24.__add__()
      • U24.__sub__()
      • U24.__mul__()
      • U24.__truediv__()
      • U24.__floordiv__()
      • U24.__mod__()
    • Bitwise Operators
      • U24.__and__()
      • U24.__or__()
      • U24.__xor__()
      • U24.__lshift__()
      • U24.__rshift__()
      • U24.__invert__()
    • Unary Operators
      • U24.__pos__()
    • Special Methods
      • U24.__int__()
      • U24.__str__()
      • U24.__repr__()
      • U24.__hash__()
    • Rounding Methods
      • U24.__round__()
      • U24.__ceil__()
      • U24.__floor__()
      • U24.__trunc__()
    • Bit Manipulation Methods
      • U24.count_ones()
      • U24.count_zeros()
      • U24.leading_zeros()
      • U24.trailing_zeros()
      • U24.bit_length()
      • U24.bit_count()
    • Checked Arithmetic Methods
      • U24.checked_add()
      • U24.checked_sub()
      • U24.checked_mul()
      • U24.checked_div()
    • Wrapping Arithmetic Methods
      • U24.wrapping_add()
      • U24.wrapping_sub()
      • U24.wrapping_mul()
    • Saturating Arithmetic Methods
      • U24.saturating_add()
      • U24.saturating_sub()
      • U24.saturating_mul()
    • Utility Methods
      • U24.as_integer_ratio()

Additional Information

  • Contributions
  • Use of AI-Assisted Tools
  • Code of Conduct
  • License
    • MIT License
    • Attribution
    • Questions About the License
i24
  • Search


© Copyright 2026, Jack Geraghty, Vrtgs.

Built with Sphinx using a theme provided by Read the Docs.