Rajmani Kumar,
Lecturer, Dept. of BCA
S.U.College, Hilsa (Nalanda)
Patliputra University, Patna
BCA-1st Year Paper-I
Arithmetic Operations of Binary Numbers
Binary Arithmetic:
Binary arithmetic includes the basic arithmetic operations of addition,
subtraction, multiplication and division. The following sections present the rules
that apply to these operations when they are performed on binary numbers.
Binary Addition:
Binary addition is performed in the same way as addition in the decimal-
system and is, in fact, much easier to master. Binary addition obeys the following
four basic rules:
0 0 1 1
+0 +1 +0 +1
0 1 1 10
The results of the last rule may seem some what strange, remember that these are
binary numbers. Put into words, the last rule states that
binary one + binary one = binary two = binary "one zero"
When adding more than single-digit binary number, carry into, higher order
columns as is done when adding decimal numbers. For example 11 and 10 are
added as follows:
11
+ 10
101
In the first column (L S C or 2°) '1 plus 0 equal 1. In the second column (2 1)
1 plus 1 equals 0 with a carry of 1 into the third column (2 2).
When we add 1 + 1.+ 1 (carry) produces 11, recorded as 1 with a carry to the
next column.
Example 12: Add (a) 111 and 101 (b) 1010, 1001 and 1101.
Solution:
(a) (1) (1)
111
101
1100
, (B) (2)(1)(1)(1)
1010
1001
1101
10000
Binary Subtraction:
Binary subtraction is just as simple as addition subtraction of one bit from
another obey the following four basic rules
0–0=0
1 – 1 =0
1–0=1
10 – 1 = 1 with a transfer (borrow) of 1.
When doing subtracting, it is sometimes necessary to borrow from the next
higher-order column. The only it will be necessary to borrow is when we try to
subtract a 1 from a 0. In this case a 1 is borrowed from the next higher-order
column, which leaves a 0 in that column and creates a 10 i.e., 2 in the column
being subtracted. The following examples illustrate binary subtraction.
Example 13: Perform the following subtractions.
(a) 11 - 01 , (b) 11-10 (c) 100 - 011
Solution:
11 11 100
– 01 – 10 – 011
(a) 10 (b 01 (c) 001
Part (c) involves to borrows, which handled as follows. Since a 1 is to be
subtracted from a 0 in the first column, a borrow is required from the next higher-
order column. However, it also contains a 0; therefore, the second column must
borrow the 1 in the third column. This leaves a 0 in the third column and place a 10
in the second column. Borrowing a 1 from 10 leaves a 1 in the second column and
places a 10 i.e, 2 in the first column:
When subtracting a larger number from a smaller number, the results will be
negative. To perform this subtraction, one must subtract the smaller number from
the larger and prefix the results with the sign of the larger number.
Example 14: Perform the following subtraction 101 – 111.
Solution:
Subtract the smaller number from the larger.
111
– 101
010
Thus 1 0 1 – 1 1 1 = - 010 = - 10
Lecturer, Dept. of BCA
S.U.College, Hilsa (Nalanda)
Patliputra University, Patna
BCA-1st Year Paper-I
Arithmetic Operations of Binary Numbers
Binary Arithmetic:
Binary arithmetic includes the basic arithmetic operations of addition,
subtraction, multiplication and division. The following sections present the rules
that apply to these operations when they are performed on binary numbers.
Binary Addition:
Binary addition is performed in the same way as addition in the decimal-
system and is, in fact, much easier to master. Binary addition obeys the following
four basic rules:
0 0 1 1
+0 +1 +0 +1
0 1 1 10
The results of the last rule may seem some what strange, remember that these are
binary numbers. Put into words, the last rule states that
binary one + binary one = binary two = binary "one zero"
When adding more than single-digit binary number, carry into, higher order
columns as is done when adding decimal numbers. For example 11 and 10 are
added as follows:
11
+ 10
101
In the first column (L S C or 2°) '1 plus 0 equal 1. In the second column (2 1)
1 plus 1 equals 0 with a carry of 1 into the third column (2 2).
When we add 1 + 1.+ 1 (carry) produces 11, recorded as 1 with a carry to the
next column.
Example 12: Add (a) 111 and 101 (b) 1010, 1001 and 1101.
Solution:
(a) (1) (1)
111
101
1100
, (B) (2)(1)(1)(1)
1010
1001
1101
10000
Binary Subtraction:
Binary subtraction is just as simple as addition subtraction of one bit from
another obey the following four basic rules
0–0=0
1 – 1 =0
1–0=1
10 – 1 = 1 with a transfer (borrow) of 1.
When doing subtracting, it is sometimes necessary to borrow from the next
higher-order column. The only it will be necessary to borrow is when we try to
subtract a 1 from a 0. In this case a 1 is borrowed from the next higher-order
column, which leaves a 0 in that column and creates a 10 i.e., 2 in the column
being subtracted. The following examples illustrate binary subtraction.
Example 13: Perform the following subtractions.
(a) 11 - 01 , (b) 11-10 (c) 100 - 011
Solution:
11 11 100
– 01 – 10 – 011
(a) 10 (b 01 (c) 001
Part (c) involves to borrows, which handled as follows. Since a 1 is to be
subtracted from a 0 in the first column, a borrow is required from the next higher-
order column. However, it also contains a 0; therefore, the second column must
borrow the 1 in the third column. This leaves a 0 in the third column and place a 10
in the second column. Borrowing a 1 from 10 leaves a 1 in the second column and
places a 10 i.e, 2 in the first column:
When subtracting a larger number from a smaller number, the results will be
negative. To perform this subtraction, one must subtract the smaller number from
the larger and prefix the results with the sign of the larger number.
Example 14: Perform the following subtraction 101 – 111.
Solution:
Subtract the smaller number from the larger.
111
– 101
010
Thus 1 0 1 – 1 1 1 = - 010 = - 10