News for hackers. Stuff that matters.
Re:We Need Hardware Traps for Integer Overflow by Someone on Wednesday June 04, 2014 @07:06PM (#7849034)
A smarter way is to split both numbers to multiply into two halves, and pretend to do two-word arithmetic on a machine with words half the size.

In decimal, that means that you compute the product of two-digit numbers using single-digit multiplications and shifts (= multiplications by 10):

  23 x 67
  = (20+3) x (60+7)
  = (2x3) x 100 + (2x6) x 10 + (3x7) x 10 + 3x7

There are no comments on this comment yet.