Page 30 - Computer Class 06
P. 30
Example 2 : (12D) = (100101101)
16 2
Step 1 : (12D) = (301) 10 Step 2 : (301) = (100101101) 2
10
16
1 2 D(13) 2 301
16 2 16 1 16 0 2 150
256 16 1 2 7 5 0
(1x256)+(2x16)+(13x1) 2 3 7 0
2 1 8
256 32 13 0
2 9
301 1
2 4 1
2 2 0
Answer : (12D) = (301) = (100101101) 1
16 10 2
Binary Arithmetic
The arithmetic of binary numbers means the operation of addition, subtraction,
multiplication and division.
Binary arithmetic operation starts from the right most side.
Binary Addition
Binary addition is performed in the same manner as decimal addition. However,
binary system has two digits (0 and 1).
Rules for Binary Addition:
1. 0 + 0 = 0
2. 0 + 1 = 1
3. 1 + 0 = 1
4. 1 + 1 = 0 and 1 carry (10)
5. 1 + 1 + 1 = 1 and 1 carry (11)
Example 1 : (101) + (11) = (1000) 2 Example 2 : 1110 + (1010) = (11000) 2
2
2
2
1 1 carry 1 1 carry
1 0 1 1 1 1 0
1 1 1 0 1 0
10 0 0 11 0 0 0
Binary Subtraction
Binary subtraction is also similar to that of decimal subtraction with the difference that
when 1 is subtracted from 0, it is necessary to borrow 1 from the next higher order bit
and that bit is reduced by 1 and the remainder is 1.
Computer-6 30 Computer-1