Hi, > Hi, > Anyone knows how to find the factorial of a number without > using loops , arithmetic operator,case structure.I guess that this has to be > done by using bitwise operator.but i dont know how.
extremely long drawn, but possibly something along the asm lines? you could increment using the or/xor operation, multiply by repeated addition (which again is xor) operations. subtract with xor operations. essentially, you would be rewriting every arithmetic is the least arithmetic way possible. but do keep this thread posted if there really is a simpler such solution. would love to know :) abishek _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc