top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to AND two numbers without using & operator, all other bitwise operators are allowed.

+1 vote
63 views
How to AND two numbers without using & operator, all other bitwise operators are allowed.
posted Feb 26, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

Please execute the following statement in code:
unsigned num1, num2 , result;

result = ~(num1 ^ num2);

this statement will result expected output.

answer Feb 26, 2016 by Harshita
if num1 =2, num2 =2

how this works??
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...