"PEMDAS" is an acronym for the order in which operations are performed in a mathematical expression: parentheses, exponents, multiplication, division, addition and subtraction. If there are parentheses, that operation is completed first. Any exponents are taken care of next. Multiplication and division operations follow exponents, but multiplication does not outrank division. Addition and subtraction come last, and they, too, have equal stature.
When there is not a hierarchy, the operations are performed in order from left to right. For example, in the expression 30 ÷ 5 x 7, division is done first (30 ÷ 5 = 6) and then multiplication follows (6 x 7) for an answer of 42.
With several operations, PEMDAS prevents confusion. In the example 8 + 7 x (4+5), the numbers inside the parentheses are addressed first to get 9. Then the multiplication (7 x 9) is performed to obtain 63. Finally, 8 is added for a total of 71.