Monday 15 September 2014

BINARY ARITHMETIC

BINARY ARITHMETIC

Binary Addition:


Binary addition is performed in the same manner as decimal addition. However, since binary system has only two digits, the addition table for binary arithmetic is very simple consisting of only four entries. The complete table for binary addition is as follows:


Rules for binary addition ….
0 + 0 = 0,     0+1 =1,     1+0= 1,    1+1 = 10    (here, 0 is result and 1 is carry)

Ex (1). Add the binary numbers  (11011) and (1101)
Ex (2). Add the binary numbers   10111.101 and 110111.010


Binary Subtraction:

 It consists of two steps, which are repeated for each column of the numbers. The first step is to determine if it is necessary to borrow. If the subtrahend (the lower digit) is larger than the minuend (the upper digit), it is necessary to borrow from the column to the left. It is important to note here that the valued borrowed depends upon the base of the number and is always the decimal equivalent of the base. Thus, in decimal, 10 is borrowed; in binary, 2 is borrowed; in octal, 8 is borrowed; in hexadecimal, 16 is borrowed. The second step is to simply to subtract the lower value from the upper value. The complete table for binary subtraction is as follows:

Rules for binary subtraction ….
0 - 0 = 0,     1-0= 1,    1-1 = 0,   0-1 =1  with a barrow of 1.

Ex (1). Subtract the binary numbers  0101 & 0011
 Sol:
                                                                   barrow
Binary Multiplication:

Multiplication in the binary system also follows the same general rules as decimal multiplication. However, learning the binary multiplication is a trivial task become the table for binary multiplication is very short, with only four entries instead of the 100 necessary for decimal multiplication. The complete table for binary multiplication is as follows :

0 x 0 = 0
0 x 1 = 0
1 x 0 = 0
1 x 1 = 1

Ex (1): Multiply the binary numbers 1010 and 1001
       
        1010
     x 1001
        1010
      0000
    0000 
  1010     
1011010


Courtesy : http://bscshortnote.blogspot.in/2013/05/binary-addition-subtraction.html

2 comments: