bit. bnot Synchronous
Invert every bit in a 32-bit value. Combine it with band to clear selected flags while preserving the others.
Luau
bit.bnot(value: number) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
value | number | Number to interpret as a 32-bit value. |
Returns
numberThe 32-bit bitwise complement.
Differences from Volt
Volt documents its Bit Library setting as disabled by default. Kawaii enables bit by default. Disabling the setting removes the bit global and makes retained function references reject calls.
Availability
Bit is enabled by default. The bit global is removed when disabled, and its operations check the setting.
Example
Luau
local flags = 0x07
print(bit.band(flags, bit.bnot(0x02))) -- 5