Subj : Re: puzzle little closer to machine. To : comp.programming From : Gerry Quinn Date : Mon Jul 04 2005 12:53 pm In article , unknown@this- world.com says... > Can somebody solve the following puzzle ? > > Suppose I have a 32 bit machine with 32 bit 32 registers. > How to multiply two integers in such a machine with taking > care of all the overflows. Also MUL or such multiplication > operands are not available in such a machine. Just long multiplication, which in binary means just shifts and adds. In assembler there will normally be a carry flag set after a shift, so you can tell when you have to add 1 to the 'high' refister before shifting it. - Gerry Quinn .