Monday, 15 September 2014

OCTAL ARITHMETIC


OCTAL ARITHMETIC :

(1). Octal Addition:

---> If the sum is less than 8, the addition of two octal digits is same as the equivalent sum.

---> If the sum is greater than or equal to 8, then 8 must be subtracted from the sum to obtain the sum and carry of '1' is produced.

Ex(1):  Add (23)8 and (67)8
Sol:       

Column-1: here, 3+7=10,  i.e 10>8, so 8 must be subtracted from 10.
10-8=2 and carry 1 produced.
Column-2: here, 1+2+6=9, i.e 9>8, so 8 must be subtracted from 9
9-8=1 and carry 1 is produced.
Column-3: here, we take the carry also.
Ex(2):  Add (456)8 and (123)8

Sol:       
Column-1: here, 6+3=9,  i.e 9>8, so 8 must be subtracted from 9.
9-8=1 and carry 1 produced.
Column-2: here, 1+5+2=8, i.e 8=8, so 8 must be subtracted from 8
8-8=0 and carry 1 is produced.
Column-3: here, 1+4+1=6, i.e 6<8. So, we have to take the same equivalent sum, i.e ‘6’.
(2). Octal Subtraction:

 The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number system. The only variation is in borrowed number. In the decimal system, you borrow a group of 1010. In the binary system, you borrow a group of 210. In the octal system you borrow a group of 810.

Ex (1):


Attendance on 16-09-2014 for CSE-A


Attendance on 16-09-2014  for CSE-A

Absentees: 7, 15, 25, 26, 34, 50, 56

Topic: Octal Arithmetic & Hexadecimal Arithmetic



Attendance on 16-09-2014  for CSE-B

DLD LAB : (591-5C0 & LE-Three members)


Absentees: A7

Expt: Verification of Logic gates

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