Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £35.99 £24.99. New subscribers only T&Cs apply

Find out more

Unary and binary operators

Watch this video by Dr. Yossi Elran to learn about binary and unary operators
Operators. Operators act on what’s known as operands. An operator can act on one operand, and then it is called a unary operator, or, it can act on two operands and then it is called a binary operator. It can act on more than two operands but we won’t go into this now. The operands can be numbers. They can be words, they can be shapes, in fact… They can be anything at all, for example,
The mathematical operations: subtraction, addition, multiplication and division can all be operators. But so can the sum of the digits of the number, or, the concatenation, of two numbers or words or phrases, or even taking a shape and giving it half a rotation. That can also be an operator. Let’s see an example of a binary operator.
The binary operator: plus - addition. It acts on two operands. For instance, when the plus operator acts on…
the operands: 13 and 26, the answer is 13 + 26, which is 39 Another example pf a binary operation is the word “and”.
One operand will be the sentence: “It rained today”.
Let’s take as the other operand the sentence: “The dog ate my homework”. The result of the operator ‘and’ acting on these two sentences is the
sentence: “It rained today and the dog ate my homework”. Let’s take a look at an example of a unary operator.
We’ll use the unary operator: factorial. The factorial operator is symboled by an exclamation mark and it means multiply all the numbers from 1 up to the operand. If we take for instance the operand to be the number 4, then 4 factorial
is: 1x2x3x4=24 So, the result of the operator factorial acting on the number 4 is 4 factorial: 1x2x3x4=24. Let’s see the factorial operator again and this time the factorial operator will operate on the number 6. 6 factorial is: 1x2x3x4x5x6=720 which is the result of the operation of the unary operator on the number 6. Operators!

Operators that operate on two operands are known as binary operators. Operators that operate on one operand are known as unary operators. Watch the video to learn about binary and unary operators.

This article is from the free online

Maths Puzzles: Cryptarithms, Symbologies and Secret Codes

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now