Skip main navigation

£199.99 £139.99 for one year of Unlimited learning. Offer ends on 28 February 2023 at 23:59 (UTC). 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

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education