1. 7
  1.  

  2. 3

    This is a case where having an unsigned integer type in Jack would really help, but alas, we do not.

    The difference between signed and unsigned is all in the semantics that you put on the values, not in the values themselves, and most basic operators actually handle them the same way. Whether 255*255 returns 65205 or -331, either one is represented by the same bits, and if you add 400 to either one you end up at 69.

    All of which is to say, I suspect that the multiplication could have been done using 8x8->16 multiplies using Jack’s native i16 with only minor fixups, and that going to 4x4->8 multiplies (four times as many of them!) wasn’t really necessary.