Binary arithmetic is a very important part of digital system. We have to perform arithmetic operations on binary numbers in many digital computers and other digital system. The arithmetic of binary number means addition, subtraction, multiplication and division. But binary arithmetic has its own rules to be followed. And most important of them is operations start from Least Significant Digit (LSD). We will undergo each binary operation with an example to learn in detail.
Binary addition
For binary addition,
we have four simple rules to remember:
- 0 + 0
= 0
- 0 + 1
= 1
- 1 + 0
= 1
- 1 + 1
= 0 (with a carry to the adjacent left bit)
The first
three cases are same as in ordinary addition. But, when we add 1+1, we get the
value 2 in ordinary addition. And in binary numbers, 2 is represented as 102.
Thus, we write a 0, and the 1 is overflown to the next bit i.e. it is taken as
carry.
Let us see
an example to understand the situation clearly.
53 + 41 = 94
(53)10
= (110101)2
(41)10
= (101001)2
|
|
Binary Subtraction
We have four main rules to remember for the
binary subtraction:
- 0 – 0 = 0
- 0 – 1 = 1 (borrow/take
1 from the adjacent bit to the left)
- 1 – 0 = 1
- 1 – 1 = 0
We consider the second case as a borrow case
and borrow 1 from the immediate left bit. Thus, this becomes 10 (binary 2).
Thus, 2-1 gives 1.
Let us see an example
of binary subtraction.
Now
we will perform this using binary subtraction:
(26)10
= (11010)2
(12)10
= (01100)2
As we had discussed, according to the second rule in case of 0-1 we have to borrow 1 from the left adjacent bit. But when we borrowed 1 from that bit we again got the case 0-1. Hence, it again
formed the case 0-1 and again
borrowed a bit from the left adjacent bit. And we got our result.
Binary Multiplication
The binary multiplication is the simplest one
when compared to the other operations as it is similar to the ordinary
multiplication we perform. Let us consider the four rules under this operation
:
- 0 x 0 = 0
- 0 x 1 = 0
- 1 x 0 = 0
- 1 x 1 = 1
Lets see an example of binary
multiplication:
Binary Division
Binary division consists of two operations
subtraction and multiplication. If you have understood binary subtraction
properly then it will be easy for you to learn binary division.
Let us see an example to get a clear picture
in our minds:
0 Comments
Doubts? Please let our team know So that we can serve you better.