From: David Vallner Date: 2006-08-27T12:11:04+09:00 Subject: Re: and and or priority M. Edward (Ed) Borasky wrote: > Matthew Smillie wrote: >> Is that actually a mathematical rule, though? I don't remember as such >> from any math or logic that I know, and poking around through my old >> textbooks made no mention of binding or precedence of logical >> operations; the closest thing being a statement that parentheses are >> required to avoid ambiguity when mixing and and or in one statement, at >> least slightly implying that there is no 'order of operations'. >> >> If anyone has a reference either way on this, I'd be curious to see it. >> >> matthew smillie. >> >> > My rather dim recollection is that computer jocks forced "and" to bind > tighter than "or" and "not" to bind tighter than "and" just so it *was* > defined. Only in programming (and logic design) do you usually find > Boolean expressions complicated enough for operator precedence to matter. :) Hmm. If I recall my freshman discrete maths, logical conjunction (and) was the multiplicative operation in boolean algebra, logical disjunction (or) was the additive operation. Or at least were denoted by the same symbols and the analogy made it easier to remember the meaning of those symbols than ∧ and ∨. And in arithmetical maths expressions, multiplication binds before addition. So I might have jumped to the conclusion that in boolean expressions, and would bind before or. (Or made a really lucky guess as to the correct convention.) Either way, operator precedence is a convention, not a rule - just a very widespread convention. And speaking of logic design, that I remember to really have beastly logical expressions in it. And wonder of wonders, I also remember that terms using one operator were always parenthesized. David Vallner