---
title: "Operator — AP Computer Science Principles Definition"
description: "An operator is a symbol like +, *, or MOD that performs an operation on values in an expression. Learn how AP CSP tests operators in Topic 3.3 expressions."
canonical: "https://fiveable.me/ap-comp-sci-p/key-terms/operator"
type: "key-term"
subject: "AP Computer Science Principles"
---

# Operator — AP Computer Science Principles Definition

## Definition

In AP Computer Science Principles, an operator is a symbol or keyword (like +, -, *, /, or MOD) that performs an operation on values or variables inside an expression, which then evaluates to a single value (EK AAP-2.B.3, AAP-2.C.3).

## What It Is

An operator is the action part of an [expression](/ap-comp-sci-p/key-terms/expression "fv-autolink"). The CED says an expression can consist of a value, a [variable](/ap-comp-sci-p/key-terms/variable "fv-autolink"), an operator, or a procedure call that returns a value (EK AAP-2.B.3), and every expression evaluates down to a single value (EK AAP-2.B.4). The operator is what tells the computer *what to do* with those values. In `score + 5`, the `+` is the operator, and `score` and `5` are the operands it acts on.

AP CSP uses its own pseudocode, and the exam reference sheet gives you exactly five arithmetic operators: `+`, `-`, `*`, `/`, and `MOD` (EK AAP-2.C.3). `MOD` is the one that trips people up. `a MOD b` evaluates to the remainder when `a` is divided by `b`, so `17 MOD 5` evaluates to 2 (EK AAP-2.C.2). Operators don't run in left-to-right reading order either. Evaluation follows a set [order of operations](/ap-comp-sci-p/unit-3/mathematical-expressions/study-guide/00lGBdF7QyY5hmd1rubD "fv-autolink") defined by the language (EK AAP-2.B.5), basically PEMDAS for code, with MOD sitting at the same level as multiplication and division.

## Why It Matters

Operators live in **[Unit 3](/ap-comp-sci-p/unit-3 "fv-autolink"): Algorithms and Programming, Topic 3.3 Mathematical Expressions**, and they directly support learning objective [AP Comp Sci P](/ap-comp-sci-p "fv-autolink") 3.3.C (evaluate expressions that use arithmetic operators) plus 3.3.B (represent step-by-step processes with sequential code statements). Here's the bigger picture. Almost every line of code on the AP exam contains at least one expression, and almost every expression contains an operator. If you can't trace what `+`, `*`, or `MOD` does to a value, you can't trace any code segment, which means operators are quietly tested in nearly every Unit 3 question even when the question isn't 'about' them. MOD in particular shows up constantly because it's the standard trick for checking even/odd numbers, wrapping around a range, or cycling through a list.

## Connections

### Operand (Unit 3)

Operators and operands are two halves of the same expression. The [operand](/ap-comp-sci-p/unit-3/boolean-expressions/study-guide/LkLTi80KQM04AnmNBxCq "fv-autolink") is the value being acted on, and the operator is the action. In `12 MOD 5`, the operator is MOD and the operands are 12 and 5. Exam questions that ask you to 'identify the components of an expression' are testing whether you can tell these apart.

### Arithmetic Operator (Unit 3)

[Arithmetic operators](/ap-comp-sci-p/key-terms/arithmetic-operators "fv-autolink") are the specific family of operators AP CSP names on the reference sheet, which are `+`, `-`, `*`, `/`, and `MOD` (EK AAP-2.C.1). Think of 'operator' as the category and 'arithmetic operator' as the math-flavored members of it.

### Logical Operator (Unit 3)

Operators aren't just for math. Logical operators like NOT, AND, and OR act on Boolean values instead of numbers, and they power the [selection](/ap-comp-sci-p/key-terms/selection "fv-autolink") (if-statement) logic in Topic 3.5. Same idea, different data type. An arithmetic operator produces a number; a logical operator produces true or false.

### Procedure calls in expressions (Unit 3)

EK AAP-2.B.3 lists procedure calls that return a value as expression components alongside operators. A line like `result ← MAX(a, b) + MIN(c, d) * 2` mixes both. You evaluate the procedure calls first to get values, then apply the operators in order of operations. The multiplication happens before the addition.

## On the AP Exam

Operators show up on the multiple-choice exam in two main ways. First, straight evaluation questions hand you an expression like `(5 * 3) MOD 7 + 2` and ask for the result, which tests whether you know the order of operations (EK AAP-2.B.5) and what MOD actually returns. Second, code-tracing questions bury operators inside loops and assignments, so a single misread of `/` versus `MOD` cascades into the wrong answer. Two things to lock down before test day. One, `a MOD b` gives the remainder, so `17 MOD 5` is 2, not 3.4. Two, the AP pseudocode reference sheet only guarantees `+`, `-`, `*`, `/`, and `MOD`, so don't expect a `^` exponent operator. If a question involves powers, the code will build them with repeated multiplication or a procedure. Watch for expressions that mix operators with procedure calls like `MAX(a, b) + MIN(c, d) * 2`, where you resolve the calls first and then apply multiplication before addition.

## Operator vs Operand

The operator is the action; the operand is what gets acted on. In `total / count`, the `/` is the operator and `total` and `count` are the operands. A quick memory hook is that 'operand' ends like 'thousand', a quantity, while the operator is the worker doing something to those quantities. MCQs that ask you to label the parts of an expression are checking exactly this distinction.

## Key Takeaways

- An operator is a symbol or keyword that performs an operation on values or variables, and it's one of the four building blocks of an expression along with values, variables, and procedure calls (EK AAP-2.B.3).
- The AP CSP exam reference sheet provides exactly five arithmetic operators: +, -, *, /, and MOD (EK AAP-2.C.3).
- a MOD b evaluates to the remainder when a is divided by b, so 17 MOD 5 evaluates to 2, and MOD has the same precedence as multiplication and division.
- Every expression evaluates to a single value, and the order of evaluation follows the language's order of operations, not left-to-right reading order (EK AAP-2.B.4 and 2.B.5).
- AP pseudocode has no exponent operator, so raising to a power has to be done with repeated multiplication or a procedure call.
- The operator is the action and the operand is the value being acted on; in `x + 3`, the operator is + and the operands are x and 3.

## FAQs

### What is an operator in AP Computer Science Principles?

An operator is a symbol or keyword that performs an operation on values or variables inside an expression. In AP pseudocode, the arithmetic operators are +, -, *, /, and MOD, and they're all listed on the exam reference sheet (EK AAP-2.C.3).

### What is the difference between an operator and an operand?

The operator is the action and the operands are the values it acts on. In `12 MOD 5`, MOD is the operator and 12 and 5 are the operands. The expression evaluates to 2, the remainder of 12 divided by 5.

### Does AP CSP pseudocode have an exponent operator?

No. The reference sheet only provides +, -, *, /, and MOD, so there's no built-in power operator like ^. Exam code that needs exponents builds them with repeated multiplication inside a loop or uses a procedure that returns a value.

### What does MOD do in AP CSP?

MOD is the modulus operator, and a MOD b returns the remainder when a is divided by b. For example, 17 MOD 5 evaluates to 2. The CED assumes a is an integer greater than or equal to 0 and b is an integer greater than 0 (EK AAP-2.C.2).

### Do operators in AP pseudocode follow PEMDAS?

Essentially yes. EK AAP-2.B.5 says expressions evaluate using a set order of operations, so multiplication, division, and MOD happen before addition and subtraction, and parentheses override everything. An expression like 2 + 3 * 4 evaluates to 14, not 20.

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-p/key-terms/operator#resource","name":"Operator — AP Computer Science Principles Definition","url":"https://fiveable.me/ap-comp-sci-p/key-terms/operator","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-p/key-terms/operator#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-12T22:52:53.909Z","isPartOf":{"@type":"Collection","name":"AP Computer Science Principles Key Terms","url":"https://fiveable.me/ap-comp-sci-p/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-comp-sci-p/key-terms/operator#term","name":"Operator","description":"In AP Computer Science Principles, an operator is a symbol or keyword (like +, -, *, /, or MOD) that performs an operation on values or variables inside an expression, which then evaluates to a single value (EK AAP-2.B.3, AAP-2.C.3).","url":"https://fiveable.me/ap-comp-sci-p/key-terms/operator","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Computer Science Principles Key Terms","url":"https://fiveable.me/ap-comp-sci-p/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is an operator in AP Computer Science Principles?","acceptedAnswer":{"@type":"Answer","text":"An operator is a symbol or keyword that performs an operation on values or variables inside an expression. In AP pseudocode, the arithmetic operators are +, -, *, /, and MOD, and they're all listed on the exam reference sheet (EK AAP-2.C.3)."}},{"@type":"Question","name":"What is the difference between an operator and an operand?","acceptedAnswer":{"@type":"Answer","text":"The operator is the action and the operands are the values it acts on. In `12 MOD 5`, MOD is the operator and 12 and 5 are the operands. The expression evaluates to 2, the remainder of 12 divided by 5."}},{"@type":"Question","name":"Does AP CSP pseudocode have an exponent operator?","acceptedAnswer":{"@type":"Answer","text":"No. The reference sheet only provides +, -, *, /, and MOD, so there's no built-in power operator like ^. Exam code that needs exponents builds them with repeated multiplication inside a loop or uses a procedure that returns a value."}},{"@type":"Question","name":"What does MOD do in AP CSP?","acceptedAnswer":{"@type":"Answer","text":"MOD is the modulus operator, and a MOD b returns the remainder when a is divided by b. For example, 17 MOD 5 evaluates to 2. The CED assumes a is an integer greater than or equal to 0 and b is an integer greater than 0 (EK AAP-2.C.2)."}},{"@type":"Question","name":"Do operators in AP pseudocode follow PEMDAS?","acceptedAnswer":{"@type":"Answer","text":"Essentially yes. EK AAP-2.B.5 says expressions evaluate using a set order of operations, so multiplication, division, and MOD happen before addition and subtraction, and parentheses override everything. An expression like 2 + 3 * 4 evaluates to 14, not 20."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Computer Science Principles","item":"https://fiveable.me/ap-comp-sci-p"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-comp-sci-p/key-terms"},{"@type":"ListItem","position":3,"name":"Operator"}]}]}
```
