Using a bitwise AND on more than two bits.
Posted
by Koning WWWWWWWWWWWWWWWWWWWWWWW
on Stack Overflow
See other posts from Stack Overflow
or by Koning WWWWWWWWWWWWWWWWWWWWWWW
Published on 2010-05-22T14:45:29Z
Indexed on
2010/05/22
14:50 UTC
Read the original article
Hit count: 276
Hi, I am pretty new to bitwise operators. Let's say I have 3 variables a
, b
and c
, with these values in binary:
a = 0001
b = 0011
c = 1011
Now, I want to perform a bitwise AND like this:
a
AND b
AND c
--------
d = 0001
d &= a &= b &= c
doesn't work (as I expected), but how can I do this?
Thanks
© Stack Overflow or respective owner