Arithmetic Operators

In AP Computer Science Principles, arithmetic operators are the symbols +, -, *, /, and MOD that perform math inside expressions; they appear on the exam reference sheet, and MOD (the remainder operator) is the one most often tested, e.g. 17 MOD 5 evaluates to 2 (EK AAP-2.C.1 to AAP-2.C.3).

Verified for the 2027 AP Computer Science Principles examLast updated June 2026

What are Arithmetic Operators?

Arithmetic operators are the symbols a programming language uses to do math. AP CSP pseudocode gives you five of them, all printed on the exam reference sheet: + (addition), - (subtraction), * (multiplication), / (division), and MOD (modulus). The first four work exactly like the math you already know. MOD is the new one, and it just means "the remainder." So 17 MOD 5 evaluates to 2, because 17 divided by 5 is 3 with a remainder of 2. The CED tells you to assume the first number is an integer that's 0 or greater and the second is an integer greater than 0 (EK AAP-2.C.2).

Arithmetic operators never stand alone. They combine with values, variables, and procedure calls to build expressions, and every expression evaluates down to a single value (EK AAP-2.B.3 and AAP-2.B.4). When an expression has multiple operators, the language's order of operations (precedence) decides what happens first, just like PEMDAS in algebra class.

Why Arithmetic Operators matter in AP Computer Science Principles

Arithmetic operators live in Topic 3.3 (Mathematical Expressions) in Unit 3: Algorithms and Programming, and they directly support learning objective AP Comp Sci P 3.3.C, which says you should be able to evaluate expressions that use arithmetic operators. They're also the building blocks for 3.3.B, since sequential code statements usually involve assigning the result of some arithmetic expression to a variable.

Here's the bigger picture. Almost every algorithm question on the AP CSP exam, whether it's tracing a loop, predicting a robot's path, or finding a bug in code, eventually asks you to compute something. If you can't evaluate 8 + 12 / 4 MOD 3 correctly, every later skill built on top of it falls apart. Arithmetic operators are the smallest unit of "doing" in programming, and Unit 3 is the most heavily weighted unit on the exam.

How Arithmetic Operators connect across the course

Expression (Unit 3)

An arithmetic operator is one ingredient in an expression. An expression mixes values, variables, operators, and procedure calls, then collapses into a single value when evaluated. Operators are the verbs; the expression is the full sentence.

Precedence (Unit 3)

When an expression has more than one operator, precedence decides the order. In AP pseudocode, *, /, and MOD all happen before + and -, so 8 + 12 / 4 MOD 3 means you divide and take the remainder first, then add. This is the single most common trap in expression-evaluation questions.

Operand (Unit 3)

Operands are the values an operator acts on. In 17 MOD 5, the operator is MOD and the operands are 17 and 5. MCQs love swapping operands to test whether you know that 17 MOD 5 and 5 MOD 17 give different answers.

Iteration and algorithms (Unit 3)

MOD shows up constantly inside loops and selection statements. Checking whether num MOD 2 equals 0 is the classic even-number test, and MOD is how algorithms make counters "wrap around." If you see MOD in exam code, ask yourself what pattern or cycle it's detecting.

Are Arithmetic Operators on the AP Computer Science Principles exam?

Arithmetic operators are tested through multiple-choice questions, and they show up in a few predictable flavors. One flavor asks you to identify the operators in an expression (in 12 / 3 * 2, the operators are / and *). Another tests whether you actually understand MOD, like recognizing that it evaluates to a remainder and that 17 MOD 5 is 2. A third flavor mixes operators and checks whether you know that division and MOD are performed before addition, which is a precedence question wearing an arithmetic costume.

The good news is that +, -, *, /, and MOD are all printed on the exam reference sheet, so you don't need to memorize the symbols. You DO need to evaluate expressions quickly and correctly under time pressure, and you'll almost certainly use arithmetic operators in the code you write for your Create Performance Task.

Arithmetic Operators vs Division (/) vs. MOD

Division gives you the quotient; MOD gives you the remainder. So 17 / 5 evaluates to 3.4, while 17 MOD 5 evaluates to 2. A useful mental model is long division from elementary school. The / operator answers "how many times does it fit?" and MOD answers "what's left over?" If an exam answer choice treats 17 MOD 5 as 3.4 or 3, it's a distractor.

Key things to remember about Arithmetic Operators

  • The five AP CSP arithmetic operators are +, -, *, /, and MOD, and all of them are provided on the exam reference sheet (EK AAP-2.C.3).

  • MOD evaluates to the remainder of a division, so 17 MOD 5 is 2, not 3.4 (that's what 17 / 5 gives you).

  • For MOD on the exam, assume the left operand is an integer that's 0 or greater and the right operand is an integer greater than 0 (EK AAP-2.C.2).

  • Arithmetic operators combine with values, variables, and procedure calls to form expressions, and every expression evaluates to a single value.

  • Precedence matters. Multiplication, division, and MOD are evaluated before addition and subtraction, so 8 + 12 / 4 MOD 3 means you compute 12 / 4 MOD 3 first.

  • A common exam use of MOD is checking divisibility, like num MOD 2 = 0 to test whether a number is even.

Frequently asked questions about Arithmetic Operators

What are arithmetic operators in AP Computer Science Principles?

They're the five math symbols in AP CSP pseudocode: + (addition), - (subtraction), * (multiplication), / (division), and MOD (remainder). They're listed on the exam reference sheet and tested under learning objective AP Comp Sci P 3.3.C.

What does MOD mean in AP CSP?

MOD gives the remainder when one integer is divided by another. For example, 17 MOD 5 evaluates to 2, because 17 = 5 × 3 with 2 left over. On the exam, assume the left number is an integer ≥ 0 and the right number is an integer > 0.

Is MOD the same as division?

No. Division (/) gives the quotient and MOD gives the remainder. 17 / 5 evaluates to 3.4, while 17 MOD 5 evaluates to 2. Mixing these up is one of the most common mistakes on expression-evaluation MCQs.

Do I need to memorize the arithmetic operators for the AP CSP exam?

No, the symbols +, -, *, /, and MOD are all printed on the exam reference sheet you get during the test. What you do need is the skill to evaluate expressions with them, including applying precedence rules correctly.

How do arithmetic operators relate to expressions and precedence?

Operators are pieces of expressions, which combine values, variables, operators, and procedure calls into something that evaluates to a single value. Precedence is the rule set that orders the operators, so in 8 + 12 / 4 MOD 3, the division and MOD happen before the addition.