Garry's Mod Wiki

bit.band

number bit.band( number value, number otherValues = nil )

Description

Performs the bitwise "and" for all values specified.

Arguments

1 number value
The value to be manipulated.
2 number otherValues = nil
Values bit to perform bitwise "and" with. Optional.

Returns

1 number
Result of bitwise "and" operation.

Example

local a = 170 -- 10101010 in binary form local b = 146 -- 10010010 in binary form print( bit.band( a, b ) )
Output: 130 (10000010 in binary form)

Page Links


Special Pages


Wikis

?

Render Time: 38ms

DB GetPage 2
Generate Html 9
SaveChanges (1) 10
Render Body 0
Render Sidebar 13