| Author |
Operator precedence
|
Divya Eknath
Greenhorn
Joined: Jul 27, 2006
Posts: 9
|
|
Can anybody please tell me the precedence of bitwise/ligical operators:&,^ and |? In some books its given as & ^ |, while in others it is & | ^.
|
 |
wise owen
Ranch Hand
Joined: Feb 02, 2006
Posts: 2023
|
posted

0
|
&,^, | Expressions, Statements, and Blocks
|
 |
Simeon Cherniy
Greenhorn
Joined: Jul 26, 2006
Posts: 21
|
|
The order is: & ^ | x^y = (x | !y) & (!x | y) That's why the priority of XOR(^) is higher
|
5-year Student of <br />Moscow Institute of Physics and Technology.
|
 |
Simeon Cherniy
Greenhorn
Joined: Jul 26, 2006
Posts: 21
|
|
|
x^y = (x | y) & (!x | !y)
|
 |
 |
|
|
subject: Operator precedence
|
|
|