5.8 二元位运算符 Binary bit-wise operations

Each of the three bitwise operations has a different priority level:

三个二元位运算符具有各不相同的优先级:

Download entire grammar as text.

The & operator yields the bitwise AND of its arguments, which must be plain or long integers. The arguments are converted to a common type.

& 运算符进行比特级的AND(与)运算, 参数必须是普通整数或长整数.参数转换成通用类型.

The ^ operator yields the bitwise XOR (exclusive OR) of its arguments, which must be plain or long integers. The arguments are converted to a common type.

^ 运算符进行比特级的XOR(异或)运算, 参数必须是普通整数或长整数.参数转换成通用类型.

The | operator yields the bitwise (inclusive) OR of its arguments, which must be plain or long integers. The arguments are converted to a common type.

| 运算符进行比特级的OR(同或)运算, 参数必须是普通整数或长整数.参数转换成通用类型.