bit32

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package bit32 implements the Lua 5.2-style bit32 library for 32-bit unsigned integer arithmetic. All operands are coerced to uint32 (sign bit dropped, high bits masked) before the operation; results are returned as int64 in the [0, 2^32) range, matching Lua's bit32 semantics where every result is a normalized unsigned 32-bit value.

Lua 5.3+ folded these into native integer bitops on int64, but bit32 remains widely used for fixed-width work (hashing, network protocols, embedded targets). The module is preloaded; use `require("bit32")`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBit32Preload

func RegisterBit32Preload(v *vm.VM)

RegisterBit32Preload installs the bit32 module at package.preload.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL