problem in arithmetic subtraction

Discussion in 'Homework Help' started by annujain501, Jul 30, 2010.

  1. annujain501

    Thread Starter New Member

    Jul 28, 2010
    6
    0
    if two n-digit unsigned numbers are subtracted,then,
    for M-N (both in base-r)

    M-N=M+r's complement of N

    but if we have one n-digit number and other n-1 digit number,this method doesnt work. how it can be done then ? for eg;

    (both 46 and 7 are in base-8)

    46
    -7
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    You borrow a 1 from the 4 in the 8's place.
    so 16 - 7 = 7
    then 3 - 0 = 3
    and the result is 37 base 8

    This is EXACTLY the same process you would use doing subtraction in base 10 representation.
     
Loading...