# bit.band

From Garry's Mod

## Contents |

# Description

Performs the bitwise "and" for all values specified.

# Arguments

number value

The value to be manipulated.

# Arguments

number otherValues=nil

Values bit to perform bitwise "and" with. Optional.

# Returns

Result of bitwise "and" operation.

# Examples

## 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)