Stores the result of performing a bitwise AND operation on the two given values in the left-hand-side variable.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Parameters
lhsAn integer value.
rhsAnother integer value.
Discussion
A bitwise AND operation results in a value that has each bit set to 1 where both of its arguments have that bit set to 1. For example:
var x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
x &= y // 0b00000100