bit32

Show Deprecated

This library provides functions to perform bitwise operations.

Number Limitations

This library treats numbers as unsigned 32-bit integers; numbers will be converted to this before being used (see image below). Numbers with decimal numbers are rounded to the nearest whole number.

32-bit integer conversion (in hexadecimal)

Summary

Functions

Functions

arshift

Parameters

disp: number

Returns

band

Parameters

numbers: Tuple

Returns

bnot

Parameters

Returns

Parameters

numbers: Tuple

Returns

btest

Parameters

numbers: Tuple

Returns

bxor

Parameters

numbers: Tuple

Returns

byteswap

Parameters

Returns

countlz

Parameters

Returns

countrz

Parameters

Returns

extract

Parameters

field: number
width: number
Default Value: 1

Returns

replace

Parameters

field: number
width: number
Default Value: 1

Returns

lrotate

Parameters

disp: number

Returns

lshift

Parameters

disp: number

Returns

rrotate

Parameters

disp: number

Returns

rshift

Parameters

disp: number

Returns