Binary arithmetic is essential in all digital computers and in many other types of digital systems. To understand digital systems, you must know the basics of binary addition, subtraction, multiplication, and division.
Binary Addition
The four basic rules for adding binary digits (bits) are as follows:
0 + 0 = 0 Sum of 0 with a carry of 0
0 + 1 = 1 Sum of 1 with a carry of
0
1 + 0 = 1 Sum of 1 with a carry of 0
1 + 1 = 10 Sum of 0 with a
carry of 1
In the right column, 1 + 1 = 0 with a carry of 1 to the next column to the left. In the middle column, 1 + 1 + 0 = 0 with a carry of 1 to the next column to the left. In the left column, 1 + 0 + 0 = 1.
When there is a carry of 1, you have a situation in which three bits are being added (a bit in each of the two numbers and a carry bit). This situation is illustrated as follows:
Add the following binary numbers:
(a) 11 + 11
(b) 100 + 10
(c) 111 + 11
(d) 110 + 100
SOLUTION:
The equivalent decimal addition is also shown for reference.
Binary Subtraction
The four basic rules for subtracting bits are as follows:
When subtracting numbers, you sometimes have to borrow from the next column to the left. A borrow is required in binary only when you try to subtract a 1 from a 0. In this case, when a 1 is borrowed from the next column to the left, a 10 is created in the column being subtracted, and the last of the four basic rules just listed must be applied. Examples 2 and 3 illustrate binary subtraction; the equivalent decimal subtractions are also shown.
Perform the following binary subtractions:
(a) 11 - 01 (b) 11 - 10
SOLUTION :
Subtract 011 from 101.
SOLUTION :
Binary Multiplication
The four basic rules for multiplying bits are as follows:
Multiplication is performed with binary numbers in the same manner as with decimal numbers. It involves forming partial products, shifting each successive partial product left one place, and then adding all the partial products. Example 4 illustrates the procedure; the equivalent decimal multiplications are shown for reference.
Binary Division
Division in binary follows the same procedure as division in decimal, as Example 5 illustrates. The equivalent decimal divisions are also given.
0 Comments
Post a Comment