BINARY CALCULATOR

Binary

Right from the school days, you must have come across four fundamental operations namely addition, subtraction, multiplication and division. The main feature of these operations is that given any two numbers a and b, we associate another number a + b or a – b or ab or a b , b ≠ 0.

It is to be noted that only two numbers can be added or multiplied at a time. When we need to add three numbers, we first add two numbers and the result is then added to the third number

Thus, addition, multiplication, subtraction and division are examples of binary operation, as ‘binary’ means two. If we want to have a general definition which can cover all these four operations, then the set of numbers is to be replaced by an arbitrary set X and then general binary operation is nothing but association of any pair of elements a, b from X to another element of X. This gives rise to a general definition as follows:

A binary operation ∗ on a set A is a function ∗ : A × A → A. We denote ∗ (a, b) by a ∗ b.