Operator 演算子

&=(_:_:)

Stores the result of performing a bitwise AND operation on the two given values in the left-hand-side variable. ビット単位AND演算を2つの与えられた値に関して実行する結果を左手側の変数に格納します。

Declaration 宣言

static func &= (lhs: inout UInt8, rhs: UInt8)

Parameters パラメータ

lhs

An integer value. ある整数値。

rhs

Another integer value. もう1つの整数値。

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: ビット単位AND演算は、ある値という結果になります、それが各ビットを1に設定するのは、両方のそれの引数が、そのビットを1に設定するところです。例えば:


var x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
x &= y                    // 0b00000100

Relationships 関係

From Protocol 由来プロトコル