Function LFuncGetBitStatus (Value, Bit) LFuncGetBitStatus=Value And 2 ^ (Bit)=2 ^ Bit End the Function
CodePudding user response:
Drawn from a number of a particular binary values, For example, Value=https://bbs.csdn.net/topics/47 Bit=3 The Value of the binary form is 101111 2 ^ 3 is 3 to the power of 2, 8, 1000 The Value And 2 ^ Bit is 101111 And 1000 101111 And 001000 -- -- -- -- -- -- -- -- -- -- 001000 The result is 1000, and 2 ^ 3 equal, Returns True So the fourth in the binary format of 47 (from low number) is True