A common technique for remembering the order of operations is the abbreviation "PEMDAS", which is turned into the phrase "Please Excuse My Dear Aunt Sally". It stands for "Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction". This tells you the ranks of the operations: Parentheses outrank exponents, which outrank multiplication and division (but multiplication and division are at the same rank), and these two outrank addition and subtraction (which are together on the bottom rank). When you have a bunch of operations of the same rank, you just operate from left to right. For instance, 15 ÷ 3 × 4 is not 15 ÷ 12, but is rather 5 × 4, because, going from left to right, you get to the division first. If you're not sure of this, test it in your calculator, which has been programmed with the Order of Operations hierarchy. For instance, typesetting this into a graphing calculator, you will get:
calculator screen-shot: 15 / 3 * 4 = 20
Using the above hierarchy, we see that, in the "4 + 2×3" question at the beginning of this article, Choice 2 was the correct answer, because we have to do the multiplication before the addition.
(Note: Speakers of British English often instead use "BODMAS", which stands for "Brackets, Orders, Division and Multiplication, and Addition and Subtraction". Since "brackets" are the same as parentheses and "orders" are the same as exponents, the two acronyms mean the same thing.)
http://www.purplemath.com/modules/orderops.htm
Mnemonics are often used to help students remember the rules, but the rules taught by the use of acronyms can be misleading. In Canada the acronym BEDMAS is common. It stands for Brackets, Exponents, Division, Multiplication, Addition, Subtraction. In other English speaking countries, Brackets may be called Parentheses, or symbols of inclusion and Exponentiation may be called either Indices, Powers or Orders, and since multiplication and division are of equal precedence, M and D are often interchanged, leading to such acronyms as BIMDAS, BODMAS, BOMDAS, BERDMAS, PERDMAS, PEMDAS, and BPODMAS.
These mnemonics may be misleading, especially if the user is not aware that multiplication and division are of equal precedence, as are addition and subtraction. Using any of the above rules in the order "addition first, subtraction afterward" would also give the wrong answer.
10 - 3 + 2 ,
The correct answer is 9, which is best understood by thinking of the problem as the sum of positive ten, negative three, and positive two.
http://en.wikipedia.org/wiki/Order_of_operations
Position within the expression is used to determine the order of evaluation when two or more operators share the same operator precedence. Consider the following:
A = 6 / 2 * 3
In this case, A equals 9, since the division operator is to the left of the multiplication operator. The subexpression 6 / 2 is evaluated before the multiplication is done, even though the multiplication and division operators have the same precedence. Again, parentheses can be used to override the default evaluation order:
A = 6 / (2 * 3)
In this case, A equals 1, because the expression inside parentheses is evaluated first.
A useful rule of thumb is, "when in doubt, parenthesize". Some examples of expressions are provided in the following table.
http://idlastro.gsfc.nasa.gov/idl_html_help/Operator_Precedence.html