You are on page 1of 13

OCTAL ADDITION

The addition of two or more octal numbers can be achieved by following some specific rules
which are listed below. Since there are eight digits in this system starting from 0 and the last digit
are 7. The additions of octal numbers are discussed below.
1.

Add the right most digits of each octal numbers.

2.

Find the modulo of the sum of digits means divide the sum by 8 and the remainder so
obtained is the octal equivalent of the sum and the quotient is added to the next sum of
digits from right side. Perform the STEP 2 until we add the left most digits.

Let us take an example to have a better idea how the whole operation takes place.
Exp1:- Add the octal numbers (123)8 and (527)8.
Digit (Starting from Right)

Remainder

Quotient

3+7=10

10%8=2

10/8=1

(Quotient added) 1+2+2=5

5%8=5

5/8=0

(Quotient added) 0+1+5=6

6%8=6

6/8=0

Hence, the sum of (123)8 and (527)8 is (652)8.


[NOTE: WHEN THE SUM OF THE DIGITS IS LESS THAN 8 THEN THE MODULO OF
THE SUM WILL BE THE SUM ITSELF AND THE QUOTIENT WILL BE ZERO.]
Exp2:- Add the octal numbers (325.4)8 and (723.8)8.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

4+8 = 12

12%8 = 4

12/8 = 1

(Quotient Added) 1+5+3 = 9

9%8 = 1

9/8 = 1

(Quotient Added) 1+2+2 = 5

5%8 = 5

5/8 = 0

(Quotient Added) 0+3+7 = 10

10%8 = 2

10/8 = 1

(Quotient Added) 1 = 1

1%8 = 1

1/8 = 0

Therefore, the sum is (1251.4)8.

OCTAL SUBTRACTION
Octal subtraction is performed as we perform the binary subtraction. In binary subtraction, first
we find 1s complement or 2s complement of subtrahend in the same way first we will find 7s
complement or 8s complement of that octal number then we add the minuend and the
subtrahend (The addition is performed as we have stated above.). So to find the subtraction of
two octal numbers we have to follow two steps:
1.

Find either 7s complement or 8s of the subtrahend.

2.

Add the minuend and the subtrahend.

By using 7s complement
Let us take an example:
Exp1:- subtract (453)8 (234)8.
STEP 1: 7s complement of (234)8= 777 234 = (543)8
STEP 2: Add the numbers (453)8 and (543)8.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

3+3 = 6

6%8 = 6

6/8 = 0

(Quotient added) 0+5+4 = 9

9%8 = 1

9/8 = 1

(Quotient added) 1+4+5 = 10

10%8 = 2

10/8 = 1

(Quotient added) 1 = 1

1%8 = 1

1/8 = 0

So, the sum is (1216)8. Now, discard the end carry and add 1 to the right most digit and that will
be the answer.
Hence, (453)8 (234)8 = (217)8.
Exp2:- Subtract (165)8 (76)8.
STEP 1: 7s complement of (76)8 = 77 76 = (1)8
STEP 2: Add the octal numbers (165)8 and (1)8.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

1+5 = 6

6%8 = 6

6/8 = 0

(Quotient added)0+6 = 6

6%8 = 6

9/8 = 0

(Quotient added)0+1 = 1

1%8 = 1

1/8 = 0

The sum is (166)8.


Now, discard the end carry and add 1 to the right most digit.
Hence, (165)8 (76)8 = (67)8.

By 8s complement:
Exp1:- Find the value of (574)8 (341)8.
To solve this problem we use 8s complement of subtrahend. There are also two steps first find
the 8s complement of subtrahend and the follow the STEP 2 of the 7s complement method.
Now, 8s complement any octal number = 7s complement of that octal number + 1
STEP 1: Therefore, 8s complement of (341)8 = (777 341) + 1 = (437)8
STEP 2: Add the minuend (574)8and 8s complement of subtrahend (437)8.
Digits (starting from right)

Remainder (Octal Equivalent)

Quotient

4+7 = 11

11%8 = 3

6/8 = 1

(Quotient Added) 1+7+3 = 11

11%8 = 3

(Quotient Added) 1+5+4 = 10

10%8 = 2

(Quotient Added)

1%8 = 1

1=1

11/8 = 1
10/8 = 1

1/8 = 0

Sum of (574)8 and (437)8 is (1233)8. So, the required value is obtained by discarding the end carry
only.
Therefore, (574)8 (341)8 = (233)8
Exp2:- (764)8 (444)8 solve the problem using 8s complement?
STEP 1: 8s complement of subtrahend = (777 444) + 1 = (334)8
STEP 2: Add the numbers (764)8 and (334)8.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

4+4=8

8%8=0

8/8=1

(Quotient added) 1+6+3=10

10%8=2

10/8=1

(Quotient added) 1+7+3 = 11

11%8 = 3

11/8 = 1

(Quotient added) 1 = 1

1%8 = 1

1/8 = 0

So the sum is (1320)8.


Now discard the end carry and that will be the required answer.
Hence, (764)8 (444)8 = (320)8.

PROBLEM INCLUDING BOTH ADDITION AND SUBTRACTION OF


OCTAL NUMBER
Exp1:- Solve the given problem: (223)8+ (527)8 (436)8

To solve this problem, first we are going to add the first two octal numbers then we subtract the
third octal number from the sum of the first two octal numbers. So, let us start to add first two
octal numbers. To add these numbers we will follow the above rules.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

3+7=10

10%8=2

10/8=1

(Quotient added) 1+2+2=5

5%8=5

5/8=0

(Quotient added) 0+2+5 = 7

7%8 = 7

7/8 = 0

So the sum is (752)8.


Now, find the either 7s complement or 8s complement of the subtrahend (436)8.
Therefore, 7s complement of (436)8 = 777 436 = (341)8
Now, add the sum (752)8 and (341)8.
Digits (Starting from Right)

Remainder (Octal Equivalent)

Quotient

1+2 = 3

3%8 = 3

8/8 = 0

(Quotient added) 0+5+4 = 9

9%8 = 1

9/8 = 1

(Quotient added) 1+7+3 = 11

11%8 = 3

11/8 = 1

(Quotient added) 1 = 1

1%8 = 1

1/8 = 0

So, the sum of (752)8 and (341)8 is (1313)8. Now discard the end carry and add 1 to the right most
digit.
Hence, (223)8 + (527)8 (436)8 = (314)8.

ADDITION OF HEXADECIMAL

The addition of hexadecimal numbers are achieved by following the given two steps given
below.
1.

Add the right most digits of each hexadecimal numbers.

2.

Find the modulo of the sum of digits means divide the sum by 16 and the remainder so
obtained is hexadecimal equivalent of the sum and the quotient is added to the next sum of
digits from right side. Perform the second step until we add the last left most digits.

Let us solve some examples to understand the processes.


Example 1: Find the sum of the numbers A2316 and 1B116?
Solution: The addition of A2316 and 1B116 is shown below:
Digit (Starting from Right)

Remainder

Quotient

3+1=4

4%16=4

4/16=0

(Quotient added) 2+B+0=13

13%16=13(D)

13/16=0

(Quotient added) A+1+0=11

11%16=11(B)

11/16=0

Thus the addition of A2316 + 1B116 = BD416.


Example 2: Find the sum of the hexadecimal numbers 2AC16 and FAB16?
Solution: The solution of the above problem is shown below:
Digit (Starting from Right)

Remainder

Quotient

C+B=23

23%16=7

23/16=1

(Quotient added) A+A+1=21

21%16=5

21/16=1

(Quotient added) 2+F+1=18

18%16=2

18/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

Thus the sum of the hexadecimal numbers 2AC16 and FAB16 is 125716.
Example 3: Find the addition of A2B.D416 and 247.6516?
Solution: The solution of the above problem is performed as:
Digit (Starting from Right)

Remainder

Quotient

4+5=9

9%16=9

9/16=0

(Quotient added) D+6+0=19

19%16=3

19/16=1

(Quotient added) B+7+1=19

19%16=3

19/16=1

(Quotient added) 2+4+1=7

7%16=7

7/16=0

(Quotient added) A+2+0=12

12%16=12(C)

12/16=0

Thus the sum is C73.3916.

SUBTRACTION OF HEXADECIMAL
Subtraction of hexadecimal numbers is obtained by following the given steps:
1.

First find 15s complement or 16s of the subtrahend.

2.

Add minuend and 15s complement or 16s of the subtrahend using the above addition
steps of hexadecimal numbers.

3.

Discard the left most end carry and add 1 to the right most digit (only in case of 15s
complement) and that will be the final solution.

Example 1: Subtract the hexadecimal numbers ABC16 and A3B16?


Solution: here we will find the subtraction of the two given numbers using 15s complement. So
the solution for 15s complement of A3B16 is as follows.

15 A = 5
15 3 = 12 (in hexadecimal number system 12=C)
15 B = 4
So the 15s complement of A3B16 is 5C416.
Now add ABC16and 5C416.
Digit (Starting from Right)

Remainder

Quotient

C+4=16

16%16=0

16/16=1

(Quotient added) B+C+1=24

24%16=8

24/16=1

(Quotient added) A+5+1=16

16%16=0

16/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

The remainder is 108016. Now we have to discard the left most end carry 1 and then we have to
add 1 to the right most digit.
Thus 108016becomes 8016+1=8116
Hence, ABC16 A3B16=8116.
We can solve the same problem taking 16s complement of subtrahend. So lets solve the
problem by this method.
The 16s complement of A3B16
= 15s complement of A3B16 + 1
= 5C416 + 1
= 5C516
Now add ABC16and 5C516.
Digit (Starting from Right)

Remainder

Quotient

C+5=16

17%16=1

16/16=1

(Quotient added) B+C+1=24

24%16=8

24/16=1

(Quotient added) A+5+1=16

16%16=0

16/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

Thus the remainder is 108116. Now we have to discard the left most end carry 1 then number
obtained is final value.
Hence, ABC16 A3B16 = 8116.
Example 2: Subtract the hexadecimal numbers 67A16 and 54916?
Solution: The solution of this problem is as follows:

By using 15s complement of subtrahend:


15s complement of 54916 is found as.
15 5 = 10 (in hexadecimal number system 10=A)
15 4 = 11 (in hexadecimal number system 11=B)
15 9 = 6
So the 15s complement is AB616.
Now add 67A16and AB616.
Digit (Starting from Right)

Remainder

Quotient

A+6=16

16%16=0

16/16=1

(Quotient added) 7+B+1=19

19%16=3

19/16=1

(Quotient added) 6+A+1=17

17%16=1

17/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

Thus the remainder is 113016. Now discard left most end carry 1 and add 1 to the right most digit.
Hence, 113016become 13016 and after adding 1 we get 13116.
So 67A16 54916 = 13116.

By using 16s complement of subtrahend:


16s complement of 54916
= 15s complement of 54916 + 1
= AB616 + 1
= AB716
Now add 67A16 and AB716.
Digit (Starting from Right)

Remainder

Quotient

A+7=17

17%16=1

17/16=1

(Quotient added) 7+B+1=19

19%16=3

19/16=1

(Quotient added) 6+A+1=17

17%16=1

17/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

Thus when we arrange the remainder we get 113116. Now discard the left most end carry and we
will get the final solution.
Hence after discarding end carry of 113116.
We get 13116.
Example 3: Solve ABC16 + FAB16 2AC16?
Solution: first we add ABC16 and FAB16 then we subtract 2AC16from the sum of ABC16 and FAB16.
Digit (Starting from Right)

Remainder

Quotient

C+B=23

23%16=7

23/16=1

(Quotient added) B+A+1=22

22%16=6

22/16=1

(Quotient added) A+F+1=26

26%16=10(A)

26/16=1

(Quotient added) 0+0+1=1

1%16=1

1/16=0

Thus sum of ABC16and FAB16 is 1A6716.


Now subtract 1A6716 and 2AC16.
15s complement of 2AC is obtained as.
15 2 = 13 (in hexadecimal number system 13=D)
15 A = 5
15 C = 3
Thus the 15s complement of 2AC16 is D5316.
Now add 1A6716and D5316.
Digit (Starting from Right)

Remainder

Quotient

7+3=10

10%16=10(A)

10/16=0

(Quotient added) 6+5+0=11

11%16=11(B)

11/16=0

(Quotient added) A+D+0=23

23%16=7

23/16=1

(Quotient added) 1+0+1=2

2%16=2

2/16=0

Thus we get 27BA16. After discarding 1 from left most digit of 27BA16and then we add 1.
Hence 27BA16becomes 17BA16 and 17BA16+1=17BB16.
ABC16 + FAB16 2AC16 = 17BB16.

ALTERNATIVE METHOD FOR


ADDITION AND SUBTRACTION OF
HEXADECIMAL NUMBERS
There is an alternative method also to find addition and subtraction of hexadecimal numbers. The
steps are as follows:
1.

Convert each hexadecimal numbers into decimal numbers.

2.

Add or subtract the decimal numbers obtained from step one.

3.

Convert the decimal number obtained from step two into hexadecimal number.

4.

The hexadecimal number obtained from step three is the final answer.

Example 1: Add the hexadecimal numbers A2116 and 2B116?


Solution: To add the above two hexadecimal numbers we have to follow the above steps:
Convert A2116 and 2B116 into decimal numbers:
A2116
= Ax162 + 2161 + 1160
= 10256 + 216 + 11
= 2560 + 32 + 1
= 259310
2B116
= 2162 + Bx161 + 1160
= 2256 + 1116 + 11
= 512 + 176 + 1
= 68910
Add 259310 and 68910.
259310 + 68910 = 328210
Convert 328210 into hexadecimal number:
16|3282

Remainder

16|205

16|12

13 (in hexadecimal number system 13=D)

16|0

12 (in hexadecimal number system 12=C)

So the sum is CD216.


Example 2: Subtract the numbers ABC16 and A8C16?
Solution: Convert the hexadecimal numbers ABC16 and A8C16 Into decimal numbers:
ABC16
= Ax162 + Bx161 + Cx160
= 10256 + 1116 + 131
= 2560 + 176 + 12
= 274810
A8C16
= Ax162 + 8161 + Cx160
= 10256 + 816 + 121
= 2560 + 128 + 12
= 270010
Subtract 274910 and 266810:
274810 270010 = 4810
Convert 4810 into hexadecimal number:
16|81

Remainder

16|3
|0

0
3

So the answer is 3016.

You might also like