You are on page 1of 22

Addition of octal numbers:

Addition of octal numbers is carried out by the same principle as that of decimal or binary numbers.

An addition table for octal numbers is given below:


+

10

10

11

10

11

12

10

11

12

13

10

11

12

13

14

10

11

12

13

14

15

10

11

12

13

14

15

16

With the help of this table addition of octal numbers is best illustrated by the following examples:

Evaluate:
(i) (162)8 + (537) 8
Solution:
11

<---- carry

162
537
721
Therefore, sum = 7218

(ii) (136) 8 + (636) 8


Solution:
1

<---- carry

136
636
774
Therefore, sum = 7748

(iii) (25.27) 8 + (13.2) 8


Solution:
1

<---- carry

25.27
13.2
40.47
Therefore, sum = (40.47)

(iv) (67.5) 8 + (45.6) 8


Solution:
11

<---- carry

67.5
45.6
135.3
Therefore, sum = (135.3)

Subtraction of octal numbers:


Similarly, subtraction of octal numbers can be performed by following the rules of subtraction of decimal
numbers.
Thus, for performing addition and subtraction of octal numbers we can follow the rules of addition and
subtraction of decimal numbers

ADDITION,SUBTRACTION, MULTIPLICATION AND DIVISION


OF OCTAL NUMBERS
The addition and subtraction of octal number are shown here. An alternative method of solving this
types of problem is also discussed in this section below.

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

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)
5%8=5
1+2+2=5
(Quotient added)
6%8=6
0+1+5=6
Hence, the sum of (123)8 and (527)8 is (652)8.

5/8=0
6/8=0

[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
Right)

(Starting

from Remainder
Equivalent)

4+8 = 12
(Quotient Added) 1+5+3
=9
(Quotient Added) 1+2+2
=5
(Quotient Added) 0+3+7
= 11
(Quotient Added) 1 = 1

(Octal

Quotient

12%8 = 4

12/8 = 1

9%8 = 1

9/8 = 1

5%8 = 5

5/8 = 0

11%8 = 3

11/8 = 1

1%8 = 1

1/8 = 0

Therefore, the sum is (1351.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.
Let us take an example:
3

Exp1:- subtract (453)8 (234)8.

By using 7s complement of the subtrahend


STEP 1: 7s complement of (234)8 = 777 234
= (543)8
STEP 2: Add the numbers (453)8 and (543)8.
Digits
Right)

(Starting

from Remainder
Equivalent)

3+3 = 6
(Quotient added) 0+5+4
=9
(Quotient added) 1+4+5
= 10
(Quotient added) 1 = 1

(Octal

Quotient

6%8 = 6

6/8 = 0

9%8 = 1

9/8 = 1

10%8 = 2

10/8 = 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, 8scomplement of (341)8 = (777 341) + 1
= (437)8
4

STEP 2: Add the minuend (574)8 and 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%8 = 3
11/8 = 1
= 11
(Quotient Added) 1+5+4
10/8 = 1
10%8 = 2
= 10
(Quotient Added)
1
1%8 = 1
1/8 = 0
=1
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?
Solution:STEP 1: 8s complement of subtrahend = (777 444) + 1
= (334)8
STEP 2: Add the numbers (764)8 and (334)8.
Digits
Right)

(Starting

from Remainder
Equivalent)

4+4=8
(Quotient added)
1+6+3=10
(Quotient added) 1+7+3
= 11
(Quotient added) 1 = 1

(Octal

Quotient

8%8=0

8/8=1

10%8=2

10/8=1

11%8 = 3

11/8 = 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
SUBTRACTION OF OCTAL NUMBER

AND

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

5%8=5

5/8=0

7%8 = 7

7/8 = 0

(Quotient added)
1+2+2=5
(Quotient added) 0+2+5
=7
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

9%8 = 1

9/8 = 1

11%8 = 3

11/8 = 1

1%8 = 1

1/8 = 0

(Quotient added) 0+5+4


=9
(Quotient added) 1+7+3
= 11
(Quotient added) 1 = 1

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.

ALTERNATE
METHOD
FOR
ADDITION
SUBTRACTION OF OCTAL NUMBERS

AND

The addition or subtraction of two or more octal numbers can be performed by an


alternate method that follows as:
1. The addition or subtraction is performed first by changing the given
octal numbers into their equivalent decimal number and then we add or
subtract them.
2. Change the obtained final addition value or subtraction value into
octal number.
Now the question arises here how an octal number can be altered in decimal number
the answer is as follows:

1. Multiply each digit of the octal number with its corresponding


position octal value and it start form left side as for first digit 8 0=1, 81=8,
82=64, 83=512 and so on.
2. Add all the numbers obtained form first step and that is the final
decimal equivalent value of an octal number.
Let us verify the above problem by this rule.
Example:- Add the octal numbers (123)8 and (527)8.
Solution:- First we change both the octal number into decimal number by above
rules.
(123)8 = 1x82+2x81+3x80
= 64+16+3
= 83
= (83)10
(527)8 = 5x82+2x81+7x80
= 320+16+7
= 343
= (343)10
(83)10+(343)10 = (426)10
Now the step one has been executed. Thus we will start second step as: In the first step
we have find the final decimal value, now we are going to change this decimal number
into its equivalent octal number. The process of altering a decimal number into octal
number is done by repeated division of the decimal number by 8 until the number
becomes less than 8. The remainder found in each division together forms the octal
number. The remainders are taken in order from bottom to up. Thus the octal equivalent
of (426)10 is as obtained:
426/8=53+ 2R
53/8=6+ 5R
6/8=0+ 6R
Hence the octal equivalent is (652) 8. And this is the final answer in octal number
system.
(123)8 + (527)8 = (652)8
Similarly any octal numbers can be added by this method. Now we will discuss about the subtraction of octal
number in the same procedure. The subtractions of octal numbers are illustrated below
with proper example.
Example:- Subtract the octal number (453)8 and (234)8.
Solution:- The subtraction process will be processed in the same way as the
addition is performed above. Now we change the octal numbers (453) 8 and
(234)8 into decimal numbers.
(453)8 = 4x82+5x81+3x80
= 256+40+3
= 299
= (299)10
(234)8 = 2x82+3x81+4x80
= 128+24+4
7

= 156
= (156)10
(299)10 (156)10 = (143)10
Since the first step is complete now so we will go for the next step to change the
decimal value into octal value.
143/8 = 17+ 7R
17/8 = 2+ 1R
2/8 = 0+ 2R
The octal equivalence of (143)10 is (217)8.
Hence
the
result
is
(453)8
(234)8 =
(217)8.

MULTIPLICATION AND DIVISION OF OCTAL NUMBERS


Multiplication and Division of octal number can also be achieved by this method
easily. To take a good understanding let us go through an example:
Example:- Multiply the octal number (488)8 and (555)8.
Solution:- let us change the numbers into decimal number system.
(488)8 = 4x82+8x81+8x80
= 256+64+8
= 328
= (328)10
(555)8 = 5x82+5x81+5x80
= 320+40+5
= 365
= (365)10
(328)10X(365)10 = (119720)10
Now change (119720)10 into octal equivalent.
119720/8 = 14965+0R
14965/8 = 1870+ 5R
1870/8 = 233+ 6R
233/8 = 29+
1R
29/8 = 3+
5R
3/8 = 0+
3R
Hence the octal equivalent is (351650)8.
Therefore (488)8X(555)8 = (351650)8

Octal Addition
Following octal addition table will help you to handle octal addition.

To use this table, simply follow the directions used in this example: Add 6 8 and 58. Locate 6 in the A column
then locate the 5 in the B column. The point in 'sum' area where these two columns intersect is the 'sum' of
two numbers.
68 + 58 = 138.

Example Addition

Octal Subtraction
The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number
system. The only variation is in borrowed number. In the decimal system, you borrow a group of 10 10. In the
binary system, you borrow a group of 210. In the octal system you borrow a group of 810.

Example Subtraction

Hexadecimal Number System


Following are the characteristics of a hexadecimal number system.

Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.

Letters represents numbers starting from 10. A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

Also called base 16 number system.

Each position in a hexadecimal number represents a 0 power of the base (16). Example 16 0

Last position in a hexadecimal number represents an x power of the base (16). Example 16 x where
x represents the last position - 1.

Example
Hexadecimal Number 19FDE16
Calculating Decimal Equivalent
Step

Binary Number

Decimal Number

Step 1 19FDE16

((1 164) + (9 163) + (F 162) + (D 161) + (E 160))10

Step 2 19FDE16

((1 164) + (9 163) + (15 162) + (13 161) + (14 160))10

Step 3 19FDE16

(65536 + 36864 + 3840 + 208 + 14)10

Step 4 19FDE16

10646210

Note 19FDE16 is normally written as 19FDE.

10

Hexadecimal Addition
Following hexadecimal addition table will help you greatly to handle Hexadecimal addition.

To use this
table, simply
follow

the

directions
used in this
example
Add

A16 and

516. Locate A
in

the

column then
locate the 5
in

the

column. The
point in 'sum'
area

where

these

two

columns
intersect

is

the sum of two numbers.

A16 + 516 = F16.

Example Addition

Hexadecimal Subtraction
The subtraction of hexadecimal numbers follow the same rules as the subtraction of numbers in any other
number system. The only variation is in borrowed number. In the decimal system, you borrow a group of 10 10.
In the binary system, you borrow a group of 210. In the hexadecimal system you borrow a group of 1610.

Example - Subtraction
11

Hexadecimal Addition
Decimal basic concepts:
Decimal is base 10.
There are 10 digits in counting (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
When you reach 10, you carry a 1 over to the next column
The number after 9 is 10
Hexadecimal basic concepts:
Hexadecimal is base 16.
There are 16 digits in counting (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)
When you reach 16, you carry a 1 over to the next column
The number after F (decimal 15) is 10 in hex (or 16 in decimal)

Use the following steps to perform hexadecimal addition:

1.

Add one column at a time.

2.

Convert to decimal and add the numbers.

3a.

If the result of step two is 16 or larger subtract the result from 16 and carry 1 to the next
column.

3b.

If the result of step two is less than 16, convert the number to hexadecimal.

Example: (Use the color code in each step to see whats happening)
12

The problem:
A

1. Add one column at a time

2. Convert to decimal & add (9 + 4 = 13)

You are to add these numbers:

Carry Over:

3. Follow less than 16 rule


Decimal 13 is hexadecimal D

Carry Over:

1.

Add next column

2.

Convert to decimal & add (10 + 9 = 19)

3.

Follow 16 or larger than 16 rule

(19 16 = 3 carry a 1)

Carry Over:

1.

Add next column

2.

Convert to decimal & add (1 + 5 + 6 = 12)

3.

Follow less than 16 rule, convert to hex

Decimal 12 is hexadecimal C

Carry Over:
1.

Add next column

1
A

13

2.

Convert to decimal & add (12 + 13 = 25)

3.

Follow 16 or larger than 16 rule

(25 16 = 9 carry a 1)

Carry Over:

1.

Add next column

2.

Convert and add (1 + 10 + 11 = 22)

3.

Follow 16 or larger than 16 rule

(22 16 = 6 carry a 1)

Carry Over:

1.

Add next column

2.

Convert and add (1 + 0 + 0 = 1)

3.

Follow less than 16 rule

Example: Add 16F16 + 4A216.

1 1

Carried over digits

1 6 F
+

4 A 2
---------------6 1 1
-----------------

The digits in unit's place F are 2. From the table, F + 2 = 1116 from which 1 is written in unit's place and 1 is
carried over to the next higher (16) place.
The digits in 16's place are added as
1 + 6 + A = 7 + A = 1116 (From table) out of which, 1 is written down as sum and 1 is carried to the next higher
(162) place.
The digits in 162 's place add as 1 + 1 + 4 = 616.
Thus 16F16 + 4A216 = 61116.
Hexadecimal Subtraction:
The rule to be remembered for subtraction is the digit borrowed from the immediate higher place is counted as
16.

14

Example: Subtract B4A16 from C3916.

16 16
B 2

Borrowed
Remaining digit after borrowing

C 3 9
-

B 4 A
-----------------E

------------------In units place, A the bigger number is to be subtracted from 9. So, 1 digit from 16's place is borrowed and 16 +
9 = 25.
A is subtracted from 25.
25 - A16 = F16 (Note the values of A and F are 10 and 15).
As 1 is borrowed from 3, now for the next place 4 is to be subtracted from 2. This again requires borrowing
from the next higher place.
16 + 2 - 4 = 18 - 4 = E16.
Now, for the next place, B is to B subtracted from B remaining after lending 1. B - B = 0.
Thus C3916 - B4A16 - = EF16.
Hexadecimal Multiplication:
The following table gives products of all combinations of two single digits.

While multiplying, if the product consists of two digits, the digit on the left is carried over and added to the
product in the next place.
Example:

Find the product of 1A816 and AF16.

15

Digits carried over in second multiplication

Digits carried over in first multiplication.

1 A 8
x

A F
--------------1 8 D 8
1 0 9 0

-------------------------1 2 1

D 8

--------------------------First the digit F in the number AF16 is multiplied with each of the digits in the number 1A816.
F x 8 = 78.
The digit 8 is written below in the product row and 7 is carried over to the next place to be added with the next
product.
F x A = 9616
and 9616 + 716 = 9D16.
D is written in the product row and 9 is carried over to the next place
F x 1 = F.
and F16 + 916 = 1816 .
The second row of multiplication is done in a similar manner, by multiplying the digit A with each of the digits in
1A816.
The two products are then added to get the final product.
Thus 1A816 x AF16 = 121D816.
Question 3: Add F4A16 + 3D916.
Solution:
The addition steps are explained below showing table used for hexadecimal addition.

16

1 1
Carried Over Digits.
F 4 A
+ 3 D 9
----------------1 3 2 3
-----------------

The addition table is used to determine the sum of two digits. If the sum shows two digits in the table, the left
digit is carried over to the immediate higher place and added with the digits in that place. The sums A + 9 = 13,
1 + 4 + D = 5 + D = 12 and 1 + F + 3 = 4 + F = 13 are highlighted in the table.
If the sum is found by writing the digits in decimal form A16 + 916 = 1010 + 910 = 1910. 16 in 19 is carried over as 1
to the immediate higher place, and the remainder 3 is written as sum for that place.
Hence F4A16 + 3D916 = 132316.

Question 4: Find the product of A3916 and FD16.


Solution:
As addition, a multiplication table is used for finding the product of two hexadecimal digits.

17

3 8
Digits
carried over in second
multiplication by F
2 7
Digits
carried over in first
multiplication by D
A 3 9
X
F D
-------------8 4 E 5
9 9 5 7 0
---------------------A 1 A 5 5
----------------------

The products used for multiplication D x 9 = 75, D x 3 = 27, D x A = 82, F x 9 = 87, F x 3 = 2D and F x A = 96
are highlighted in the Multiplication table.
For each product, the digit on the right is written in the product row and the digit on the left is carried over to the
next place.
The digit carried over is added to the product got for the digit in that place.
The two products obtained for D and F with A3916 is then added.
This A3916 x FD16 = A1A5516.

Octal Number Multiplication:18

In multiplication of octal numbers a simple rule for multiplication of two digits in any radix is to
multiply them in decimal. If the product is less than the radix, then we take it as the result. If the
product is greater than the radix we divide it by the radix and take the remainder as the least
significant digit. The quotient is taken as carry in the next significant digit.
For example, (3)4 (1)4 = (3)4 but (3)4 (2)4 = (12)4 since 3 2 = 6 is decimal and division of 6 by 4
has the remainder 2 and quotient 1.

To multiply two octal numbers we use the rule given above. The process for multiplication of
octal numbers is illustrated with the help of the following examples:
Evaluate:
(i) 68 238
Solution:
We have 6 3 = 18 in decimal, which when divided by 8 gives a remainder 2 and carry 2. Again 6 2 = 12
in decimal, and 12 + 2 = 14. This when divided by 8 gives a remainder 6 and a carry 1.
Hence 68 238 = 1628

6 3 = 18
18/8 = 2 with remainder 2 l,s,d,
6 2 = 12 + 2 (carry) = 14
14/8 = 1 with remainder 6.

(ii) 158 448


Solution:
Since 158 = 78 + 68, We write
158 448 = (78 + 68) 448 = 78 448 + 68 448
Now 7 44 = 374
6 44 = 330
Taking octal addition, we have 3748 + 3308 = 7248
Hence 158 x 448 = 7248

OCTAL MULTIPLICATION
19

We multiply the numbers as they are. However, 2 digit or 3


digit products will still remain in one column. As you can see, when we multiplied 5 by 6, we write a 30 below. Not
0 carry 3. Do the following for 2 times 6 to get 12 and so on.

Next, we add the numbers. 30 + 0 is 30. 12 + 5 is 17. 0 + 2


is 2. Sums are still on individual columns.

20

Here's the tricky part. Since we're dealing with the octal number system ( 8 ), we have to find multiples of 8
closest to each digit. These are 0, 8, 16, 24, 32, 40, 48 and so on...For 30, the closest would be 3 x 8 = 24. So
subtract 30 by 24 to get 6. Carry the 3 over to the second digit.

The number we carry over is determined by the number of 8's we had to subtract from 30 to get a difference of
less than 8. I.E 30 - 8 = 22 - 8 = 14 - 8 = 6. We subtracted 30 by 8 three times so we add 3 to the digit before. Or it
is simply the number we multiply by 8 to get the number closest to 30.

17 + 3 is 20. The multiple ( of 8 ) closest to 20 is 16. So we subtract 20 by 16 to get 4 and carry over a 2 to the 3rd
digit.

21

2 + 2 is 4 . Since this is less than 8, this would be the final answer.

22

You might also like