binary division

Discussion in 'Math' started by manikanta.mashetti, Jan 21, 2014.

  1. manikanta.mashetti

    Thread Starter New Member

    Jan 13, 2014
    3
    0
    how to divide two binary numbers .if numerator is less than the denominator.

    eg: 6/9 =0110/1001 .

    how to do for the above eg.Is there any algorithms for this ..

    thanks in advance
     
  2. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    761
    Multiplying first, 6 times 10 and then dividing the result of your division by 10?
     
    Last edited: Jan 21, 2014
  3. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Same way we do it in decimal. Multiply the number 0110 with a straightforward count until it exceeds 1001, then take the number under that. You subtract (just like the decimal logarithm) the rest is the remainder.

    Binary
    .....___1r11
    0110/1001
    .....0110
    ..... 011

    Decimal

    ..1r3
    6/9
    ..6
    ..3
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The only good thing about binary division is you don't have to guess at the number to multiply the divisor by: it's either larger then the remaining dividend or not, that's one or zero.

    Code ( (Unknown Language)):
    1.         0.10101
    2.      ------
    3. 1001/0110.0
    4.       100 1
    5.       -----
    6.         1 10
    7.      -     0
    8.         ----
    9.         1 100
    10.       - 1 001
    11.         -----
    12.            110
    13.        -     0
    14.           ----
    15.            1100
    16.          - 1001
    17.            ----
    18.              11   and so on...
    .


    (Psst... Bill... you inverted the numbers.)
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Shift the dividend one bit to the left into a 4-bit register.
    Subtract the divisor as needed,

    0000 <- 0110
    0000 <- 1100 Q = 0
    0001 <- 1000 Q = 0
    0011 <- 0000 Q = 0
    0110 <- 0000 Q = 0

    fractional part follows:

    1100 <- 0000 Q = 1, R = (1100 - 1001) = 0011
    0110 <- 0000 Q = 0
    1100 <- 0000 Q = 1, etc

    Result is 0000.101010
     
    Last edited: Jan 24, 2014
  6. WBahn

    Moderator

    Mar 31, 2012
    17,723
    4,788
    The first thing you need to do is decide what representation you are going to use for your result? quotient/remainder? Fixed point? Four bits? Eight bits? Where will the radix be? All of these affect the algorithm in ways small and great.
     
Loading...