Tham khảo tài liệu 'the new c standard- p12', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Bitwise AND operator 1238 Commentary The rationale for performing these conversions is a general one that is not limited to the operands of the 702 operators i cdube coi iveisioi Is arithmetic operators. C The following conversion is presumably performed on the operands. The usual arithmetic conversions are performed 5 11 1 Common Implementations If one of the operands is positive and has a type with lower rank than the other operand it may be possible to make use of processor instructions that operate on narrower width values. Converting the operand to the greater rank will cause it to be zero extended which will cancel out any ones in the other operand. Unless both operands are known to be positive there tend to be few opportunities for optimizing occurrences of the A and operators because of the possibility that the result may be affected by an increase in value representation bits . Coding Guidelines Unless both operands have the same type which also has a rank at least equal to that of int these conversions will increase the number of value representation bits in one or both operands. Given that the binary operator is defined to work at the bit level developers have to invest additional effort in considering the effects of the usual arithmetic operands on the result of this operator. A probabilistic argument could be used to argue that of all the bitwise operators the operator has the lowest probability of causing a fault through an unexpected increase in the number of value representation bits. For instance the probability of both operands having a negative value needed for any additional bits to be set in the result is lower than the probability of one operand having a negative value needed for a bit to be set in the result of the A and operators . Unless the operands have a bit-set role the guideline recommendation dealing with use of representation 945 bit-set role represeninformation is applicable here. tatioi ii- formation using 1237 The .