Page 1 of 1

If we wanted to find the value (1 or 0) of the third bit from the right (bitNum = 2) of variable x, we should: int bit =

Posted: Sun May 15, 2022 1:35 pm
by answerhappygod
If We Wanted To Find The Value 1 Or 0 Of The Third Bit From The Right Bitnum 2 Of Variable X We Should Int Bit 1
If We Wanted To Find The Value 1 Or 0 Of The Third Bit From The Right Bitnum 2 Of Variable X We Should Int Bit 1 (14.47 KiB) Viewed 83 times
If we wanted to find the value (1 or 0) of the third bit from the right (bitNum = 2) of variable x, we should: int bit = (x >> 3) & 1; int bit = (x >> 2) & 1; int bit = x & 4; int bit = x >> 3;