Function band()

← Back to Module core



Module core → band()

Description

Perform bitwise AND operation for the every bit of the given number x and y

band(x, y, bit_width = 32, unsigned = false)


Parameters


Return Value


Usage Example

a = band(5, 9)                  ' a = 1 -> Where 00000000000000000000000000000101 AND 00000000000000000000000000001001 is 00000000000000000000000000000001 (1 in signed 32-bit)
b = band(0xff, 0x03, 8, true)   ' b = 3 -> Where 11111111 AND 00000011 is 00000011 (3 in unsigned 8-bit)


Availability

This function is available on Dinfio version 3.1.06 or later