Arithmetic Operations
Arithmetic Operations
OPERATIONS
ADDITION OF NUMBER SYSTEMS
• BINARY ADDITION
• OCTAL ADDITION
• HEXADECIMAL ADDITION
BINARY ADDITION
Ex.
1
11111 <-----carry over
2) 100102
+ 111002
+ 101012
+ 110102
10111012
OCTAL ADDITION
Rules:
1. Start adding the Least Significant Bit and divide the sum by
8.
2. The quotient will be carried to the next digit to the left and
the remainder is taken down as the sum.
3. Repeat the whole process until the left most digit have been
added.
OCTAL ADDITION
11 1 1 <-----carry over
1) 7 6 4 38
+ 1 3 5 78
11 2 2 28
1 1 2 1 <-----carry over
2) 7 6 4 38
+ 1 3 5 78
+2465 8
1 3 7 0 78
HEXADECIMAL ADDITION
Rules:
1. Start adding the Least Significant Bit and divide the sum by
16.
2. The quotient will be carried to the next digit to the left and
the remainder is taken down as the sum.
3. Repeat the whole process until the left most digit have been
added.
HEXADECIMAL ADDITION
1 1 1 1 <-----carry over
1) ABCD16
+9 8 7 616
1 4 4 4 3 16
1 1 1 1 <-----carry over
2) 7 6 4 316
+ F ACE16
+ 2 4 6 5 16
1 8 5 7 6 16
1 1 1 <-----carry over
3) 3 A B E 16
8 7 C A 16
C 2 8 816
ANY NUMBER SYSTEM
BASE 5
1 2 2 1 <-----carry over
1 2 4 35
+ 1 3 4 05
+2432 5
1 1 1 2 05
BASE 6
1 1 2 2 <-----carry over
5 2 4 36
+ 1 3 4 46
+ 2 4 3 56
3 5 1 0 16
SUBTRACTION OF NUMBER SYSTEM
1. 1 1 0 1 - minuend 1112
- 0 1 1 1 - subtrahend 0111
1001
+1101
10110 2
2. 0 1 1 1 1112 112
-1101 1101 1010
0011 0110 2
+ 0111
1010
OCTAL SUBTRACTION
1. 7 2 7 2 8 7778
- 7 2 7 18 7271
0507
+ 7272
100018
2. 7 2 7 1 8 7778 7778
- 7 2 7 28 7272 7777
0506 - 0001 8
+7271
7777
HEXADECIMAL SUBTRACTION
1. F E E D16 F F F16
- B E E F 16 BEEF
4111
+FEED
1 3 F F E 16