This is my second article on octal number system arithmetic. In this post I will explain octal numbers subtraction. You can check my article on octal addition.
Key Questions
- How to perform subtraction in octal number system?
- How to perform fractional octal subtraction?
- How to perform octal subtraction using 8's complement?
Octal Number System Subtraction Examples:
Method#1: Minuend>Subtrahend
This is the method we used to do in elementary mathematics. All the rules we follow remains same as we do in other number systems. Borrow is equal to the base of number system. If you are working with base 2 you borrow 2. If you are working with base 8 you borrow 8. You can verify your results by using this online calculator.
Example#01: 345)8-146)8
8
2 3 8
3 4 5
-1 4 6
1 7 7
1st column (units column) subtraction. 5-6
This is not possible. You have to borrow from tens column. The number you borrow is 8. So units column subtraction is 5+8-6
2nd column (tens column) subtraction. 4 becomes 3 after borrow. 3-4. To proceed this subtraction you have to borrow from hundreds column. So tens column subtraction is 3+8-4
Answer:177)8
Example#02:757.76)8-451.77)8
8
6 6 8
7 5 7 . 7 6
-4 5 1 . 7 7
3 0 5 . 7 7
Start from hundredths column subtraction.
6-7. To proceed this calculation borrow from tenths column. 8+6-7=7
Tenths column subtraction. After borrow 7 becomes 6. 6-7 not possible. To proceed this calculation borrow from units column. 8+6-7=7
Answer: 305.77)8
Example#03:565.67)8-234.34)8
5 6 5 . 6 7
-2 3 4 . 3 4
3 3 1 . 3 3
Answer: 331.33)8
Method#2: Minuend<Subtrahend
This method is same as I discussed in binary subtraction. This method is also valid for Minuend>subtrahend the 8’s complement of subtrahend and add it to minuend.
Minuend-subtrahend=difference
Or
Minuend+[8’s complement]=difference
There are three steps to follow
- Take 8’s complement of the subtrahend
- Add minuend and subtrahend
- If carry is produced in the addition discard it. Otherwise 8’s complement of the answer and assign negative sign
Example#1:257)8-765)8
8’s complement of subtrahend=013)8.
1
2 5 7
+0 1 3
2 7 2
Take 8’s complement of the sum and assign negative sign
8’s complement of sum= 506)8
Answer: -506)8
Example#2:675)8-722)8
8’s complement of subtrahend=056)8
1 1
6 7 5
+0 5 6
7 5 3
8’s complement of the sum= 025)8
Answer: -25)8
Example#01: 345)8-146)8
8’s complement of the subtrahend=632)8
1
3 4 5
+6 3 2
1 1 7 7
Diacard carry.
Answer: 177)8
Example#04:757.76)8-451.77)8
8’s complement of the subtrahend=326.01)8
1 1
7 5 7 . 7 6
+3 2 6 . 0 1
1 3 0 5 . 7 7
Discard carry.
Answer: 305.77)8
Example#03:565.67)8-234.34)8
8’s complement of the subtrahend=543.44)8
1 1 1 1
5 6 5 . 6 7
+5 4 3 . 4 4
1 3 3 1 . 3 3
Discard carry.
Answer: 331.33)8
No comments:
Post a Comment