MyLeoNes™

Operators: actions on information — Computing, 11–13 years

Operators are the small instructions that calculate, compare or join values. They let a program do useful work with the information it stores.

Instructions between values

An operator tells a program how to use one or two values. The plus sign adds, a comparison checks a relationship, and a text operator can join words. Operators are like compact verbs inside a calculation or instruction.

From counting to useful programs

A program would be little more than a list of stored facts if it could not change or compare them. Operators were needed so computers could total prices, measure distances and check answers. They turn data into results.

Calculating a total

A game shop sells a map for €7 and a torch for €3. Step 1: the operator + combines 7 and 3, giving 10. Step 2: a comparison checks whether 10 is greater than 8; it is true. One expression has calculated, another has checked.

Order matters

People often read a computer expression exactly as they read a sentence from left to right. That is reasonable, but multiplication usually happens before addition: 2 + 3 × 4 means 14, not 20. Parentheses make the intended order clear.

Prices, scores and measurements

Operators appear in shopping baskets, game scores, maps and fitness apps. A basket adds item prices, a game subtracts lost points, and a map compares distances. The operator is useful only when its meaning fits the values.

Keep exploring

Other languages

Loading MyLeoNes™…