Page 33 - Viva ICSE Computer Studies 7 : E-book
P. 33
Do and Learn
Convert the following decimal numbers into binary numbers.
(a) (58) (b) (75)
10 10
Steps to be Followed
• Divide the numbers with the base 2.
• Write down the remainder and divide the quotient again by 2.
• Repeat Step 2 till the quotient becomes zero.
Computer Arithmetic
Let’s now learn binary addition, subtraction, multiplication and division.
Binary Addition
Binary addition is very similar to addition of decimal numbers. Here, if the sum of two numbers
exceeds 1, a carryover is generated. The following table illustrates the addition of two binary
digits.
A B A + B
0 0 0 + 0 = 0
0 1 0 + 1 = 1
1 0 1 + 0 = 1
1 1 1 + 1 = 10 (Sum = 0 and carry over = 1)
Let’s understand with the help of an example.
Add 101 and 101.
1 1 Carry over
1 0 1
+ 1 0 1
1 0 1 0
Binary Subtraction
Binary subtraction is very similar to subtraction of decimal numbers. A borrow is taken from
the next higher bit in order to subtract a higher bit from a lower bit.
The following table illustrates the subtraction of two binary digits.
A B A + B
0 0 0 – 0 = 0
0 1 0 – 1 = 1 (Borrow from left)
1 0 1 – 0 = 1
1 1 1 – 1 = 0
21