How is PEMDAS used?
One common application is in computer science. When a computer program is written, PEMDAS order is used by the computer. While the computer will follow the proper order, sometimes programmers will make mistakes. Here is a line of computer code: share = tips/workers+1 It is part of a program used to manage money at a coffee shop. What the programmer intended was, “Each worker’s share of the tips is equal to the total amount of tips divided by the number of servers working that shift (workers +1 where the plus one is for the guy at the drive-through window). His program will fail because the computer will do the division, tips/workers first (using the rule that division comes before addition) and then add 1. It might be even worse than just giving the wrong answer. If the counter is closed (and only the drive-through is open) then workers will be zero and the computer will try to divide tips by zero, an illegal operation that might crash the computer. In this example, the correct code wo