Bit operation

zhaozj2021-02-16  83

1, let a certain bit becomes 0

Using the AND logic operation, the number of calculations indicate is 0, the remaining bits are 1,

IF Both Bits Are 1, The Corresponding Result Bit IS Set To 1. Otherwise, The Corresponding Result Bit is set to 0.

2, let a certain bit becomes 1

Use or calculate, let the indication becomes 1, the rest is 0

If One Bit is 0 and the Other Bit IS 1, The Corresponding Result Bit IS set to 1. OtherWise, The Corresponding Result Bit is set to 0.

转载请注明原文地址:https://www.9cbs.com/read-14134.html

New Post(0)