## Binary Arithmetic

Binary Arithmetic:

The arithmetic operations-addition, subtraction, multiplication and division, performed on the binary numbers is called Binary arithmetic. In computer system, the basic arithmetic operation performed on the binary numbers is Binary addition and Binary Subtraction.
In the following section, we will discuss the binary addition and binary subtraction.

Binary addition involves of two or more binary numbers. The binary addition rules are used while performing the binary addition. The following table shows the binary additions rules.

 Input 1 Input 2 Sum Carry 0 0 no carry 0 1 1 no carry 1 0 1 no carry 1 1 0 1

Binary addition of three inputs, when all the inputs are 1, follows the rules show in table.

 Input 1 Input 2 Input 3 Sum Carry 1 1 1 1 1

Adding the binary numbers involves the following steps:
1. Start adding by adding the bits in the unit’s column (the rightmost column). Use the rules of binary addition.
2. The result of adding bits of a column is a sum, with or without a carry.
3. Write the sum in the result of that column.
4. If carry is present, the carry is carried-over to the addition of the next left column.
5. Repeat steps 2 to 4 for each column, i.e. the tens column, hundreds column and so on.

Example:

When we add 0 and 1 in the units’ column, sum is 1 and there is no carry. The sum 1 is written in the units’ column of the result. In the Tens column, we add 1 and 0 to get the sum 1. There is no carry. The sum 1 is written in the tens column of the result.

 Binary Addition ........................ Decimal Addition ....... 1 0 ..................................... 2 .....+ 0 1 .................................+ 1 Result 1 ............................ Result 3

Binary Subtraction:

Binary subtraction involves subtraction of two binary numbers. The binary subtraction rules are used while performing the binary subtraction. The binary subtraction rules are shown below.

Binary subtraction rules

 Input 1 Input 2 Difference Borrow 0 0 0 no borrow 0 1 1 1 1 0 1 no borrow 1 1 0 no borrow

The steps for performing subtraction of binary numbers are as follow:
1. Start subtraction by subtracting the bits in the lower row from the upper row, in the units’ column.
2. Use the binary subtraction rule. If the bit in the upper row is less than the lower row, borrow 1 from the upper row of the next column (on the left side). The result of subtracting two bits is the difference.
3. Write the difference in the result of that column.
4. Repeat step 2 and 3 for each column, I.e. the tens column, hundreds column and so on.

Example:

Subtract 01 from 11. Verify the answer with the help of decimal subtraction.

When we subtract 1 from 1 in the Units column, the difference is 0. Write the difference in the Units column of the result. In the Tens column, subtract 0 from 1 to get the difference 1. Write the difference in Tens column of the result.

 Binary Subtraction ................... .... Decimal Subtraction ........1 1 ...............................................3 - 0 1 .............................................- 1 Result 1 0..................................... Result 2

www.ittaleem.com