If we take any bit AND (&) with 0 will give a zero. (i.e) Will turn that particular bit OFF.
(Mon, Sep 5, 2011 12:26:55 AM)
But! why will && not work?
(Fri, Sep 16, 2011 11:08:01 PM)
Because && is a logical operator not a bitwise (bitwise is a operator that takes single bit at a time).
(Thu, Sep 22, 2011 08:05:55 PM)
Please explain about bitwise operator?
(Thu, Sep 22, 2011 08:08:14 PM)
How to work bitwise ?
Vinod Basi said:
(Fri, Nov 4, 2011 10:01:33 PM)
Sorry, I know this is an outdated thread... But just saw Mr.Gaurav's doubt to be one which I had a days back.
Here is a simple explanation, correct me if am wrong.
Its like && and || are logical operators, evaluting true statements.
Sachin && Sehwag opens batting, It returns true(1) only if both the guys are present to open the game. Else False(0)
Sachin || Sehwag, return true(1), if either Sachin or Sehwag accompanied by someone else opens the game. Else false(0)
& and | are bitwise operators, High and Low
AND, OR gates truth table pretty much explains it.
2 & 3 (AND)
2 | 3 (OR)
Bitwise operators can be predominantely found in Embedded design, to find the status (ON or OFF) of a bit in a system.
Hope this explains...
(Tue, Nov 29, 2011 08:44:18 AM)
I have 1 doubt please tell me how to find the status of a bit ie char s;
Then write a c program to find the status of 170th bit.
(Thu, Jan 12, 2012 11:52:47 AM)
Turn off operator in bitwise operators is and because it turns 1&0 and 0&1 into turn off(that is o). |(OR) bitwise turns preceeded operations into turn on(that is 1).
Hence AND IS turn off operator.
Naveen Kumar Ramisetty said:
(Thu, Feb 2, 2012 11:18:12 PM)
(Thu, Jul 26, 2012 10:42:48 PM)
Bitwise operator is more easily been applied than the logical operator.
(Mon, Sep 3, 2012 11:30:59 AM)
Please explain how to convert hexa decimal into binary.
(Fri, Sep 7, 2012 11:17:05 AM)
If you want to off the bit means u want to make it ZERO it is possible in only & condition because
in & if 1 1 o/p-1
(Tue, Sep 18, 2012 02:42:24 PM)
I explain in simple manner
bit wise & truth table
a b z
0 0 0
1 0 0
1 1 1
0 1 0
only one condition satisfyied foe on bit excpt bit value is off position
Prema Latha.S said:
(Fri, Sep 28, 2012 09:15:42 PM)
Bitwise AND operator (&), one's complement operator(~)
Example: To unset the 4th bit of byte_data or to turn off a particular bit in a number.
Explanation: Consider, Material from Interview Mantra. Subscribe to free updates via email.