Boolean algebra operation precedence? In my discrete mathematics class we wrote down the truth table for some Boolean functions and in that table they go in the following order:
¬, ∧, ∨, →, ~, ⊕, |, ↓
So, I assumed that this is the order I need to use when evaluating formulas, and all was fine until there appeared an expression (x ⊕ yz) . Normally, I would take conjunction of y and z, then apply exclusive or. However, when I type this into WolframAlpha, it always takes "xor" first, and only then conjunction no matter what the order is.
I really hope someone could give me the right precedence. I'm almost sure that first 4 operations are in the correct order, but what about exclusive or, Sheffer stroke, and Pierce arrow?
Thank you!
EDIT:
I looked through my notes, and in fact we agreed on the order in the class, I can't believe I missed that...Anyway, the order is as follows:   


*

*¬

*∧, |, ↓

*∨

*→

*⊕, ~


In groups 2 and 5 I guess the associativity is from left to right.
Maybe this will help someone.
 A: There is no really settled consensus about what the precedence of these operation symbols ought to be. Mostly that is considered to be not a mathematical question, but purely one of presentation -- how many parentheses can you omit and still have a reasonable expectation that your reader will understand the same formula you thought you were writing?
When one uses multiplicative notation for conjunction (that is, just writing the conjuncts next to each other with no punctuation) it is natural to treat is as binding stronger than the operations that are written with symbols -- including $\neg$, so $\neg ab$ almost always means $\neg(a\land b)$. (When negation is written with an overline, its scope is of course unambiguous).
It is not unusual to extend this to conjunction written with an explicit $\land$ at least as far as the interaction between $\land$ and other binary operations go (but $\neg a \land b$ always means $(\neg a)\land b$). However there are also many authors who don't want to depend on such conventions and insist on disambiguating parentheses whenever $\land$ and $\lor$ are used together).
Since $\to$ is not associative, it presents special problems. In computer science and fields influenced by it, $a\to b\to c$ almost always meas $a\to (b\to c)$, but there are also logicians who write $a\to b\to c$ for $(a\to b)\to c$ -- perhaps reasoning that $a\to(b\to c)$ could equivalently be written as $a\land b \to c$ -- and yet others who prefer all nested implications to be fully parenthesized.
I wouldn't depend on any particular conventions for $\sim$, $\oplus$, $|$ or $\downarrow$, or among these and $\to$ or $\lor$. Err in the direction of too many parentheses. It is uncommon to have see formulas that contain more than one of these anyway, so it's no great burden to always parenthesize them. 
Biimplication, when written $\leftrightarrow$, usually has the lowest precedence of all. I assume that what you write $\sim$ is the same operator, but I wouldn't bet on the convention extending to there.
Programming languages and other pieces of software that have to make some sense of formulas typed by a user (such as Wolfram Alpha) will usually have some particular rules that they use to unravel unparenthesized expressions, but it is not usually worth the trouble trying to memorize them -- they might well be different in the next programming language over anyway.
