Jul 28, 2011 at 2:18am UTC
Does anyone have any recommendations of a PDF or article for technical interview questions for c++ bitwise operations? I know its specific, but I am looking to study up on low level c++ programming.
Any help is appreciated.
Jul 28, 2011 at 2:22am UTC
The tutorial on this site briefly goes through them. It might be easier with just examples.
Quite neat things to work with, they also help you in electronics and Minecraft. ;)
1 == true
0 == false
| or - at least one or the other true
10010010
01010101
-------------
10010111
& and - both must be true
10010010
01010101
-------------
00010000
>> shift right - shunt all digits right
10000000
>> 3
-------------
00010000
<< shift left
00000100
<< 3
-------------
00100000
^ xor - one or the other, but not both
10010110
01010101
-------------
11000011
~ not - opposite truth values
11000011
-------------
00111100
Last edited on Jul 28, 2011 at 2:36am UTC
Jul 28, 2011 at 3:32am UTC
Work it out yourself. ;) Same principles apply.
Last edited on Jul 28, 2011 at 3:32am UTC
Jul 28, 2011 at 3:48am UTC
lol. I know the answer. I was looking for more examples similar to it.