Solve it using shift operator.... here is the crude algo : the procedure for the division algorithm, given a dividend and a divisor would be to left shift (multiply by 2) the divisor till it reaches dividend/2, then continue this routine with the the difference between the dividend and divisor and divisor till the point where dividend is less than divisor or their difference is zero.
On Sun, May 22, 2011 at 1:22 AM, kunzmilan <kunzmi...@atlas.cz> wrote: > > > On 22 kvÄ›, 08:40, punnu <punnu.gino...@gmail.com> wrote: > > Given 2 nos. we need to divide them without performing divison. > > Please give a better solution than subtracting the nos. again and > > again. > > Try to multiply the smaler number and by a suitable number, subtract the > product, compare, and repeat adding zeroes, if necessary. > kunzmilan > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.