Home > Back-end >  The seventh line 3 is what mean! Don't understand
The seventh line 3 is what mean! Don't understand

Time:03-16

1//define a variable=1001, 1111 b (binary)
2//if put in a binary is divided into two group
3//bit0, bit1 for 0 group, bit2, bit3 to group 1,
4//bit4, bit5 for group 2, bit6 bit7 for group 3
5//for group 1 bit2, bit3 reset
6
7 a & amp;=~ (3 & lt; <2 * 1);

CodePudding user response:

A&=~ (3 & lt; <2 * 1) a=a& (~ (3 & lt; <2 * 1))
3 (0000, 0000, 0000, 0011), the left two is 12 (0000, 0000, 0000, 1100), take (1111, 1111, 1111, 0011), and then the bitwise and is the low position of 3, 4 0, the remaining reserves,

CodePudding user response:

This is an operation

CodePudding user response:

refer to the second floor Spectre Ghost reply:
this is an operation

2 * 1=2
3 left two then invert
  • Related