How do you manually calculate imul -1 * 3?
Honestly, I can't fully understand the other two answers. It's over complicated for me. I just need a dumb, simple and universal rule.
I'd like to just pick up what works for me.

The result is equivalent to sign-extending (imul) or zero-extending
(mul) both inputs to the destination width and then doing a
non-widening multiply
@Peter Cordes


To manually compute there are several approaches: you can sign extend
both inputs to 16-bits and do 16 × 16 keeping only the low 16-bits
@Erik Eidt

I tried and verified and this rule works for me.
-1*3,
sign extended
  11111111 11111111
 x00000000 00000011
-------------------
  11111111 11111111
 111111111 1111111
-------------------
1011111111 11111101

keep the low 16 bits, I get the correct result 11111111(ah) 11111101(al).
Try a 4 bit example:
-2 * 3, 1110 imul 0011
sign extended
  1111 1110
 x0000 0011
-----------
  1111 1110
 11111 110
-----------
101111 1010

keep the lower 8 bits, the result is 1111 1010, -6.
Before I wasn't sure how sign extended works in imul, now I get it and it's easy to verify. Btw, if you find manual calculation tedious for some examples (e.g. 4 bit -7 * -1, 1001 x 1111, sign extended 1111 1001 x 1111 1111, many lines to add), you can use the Windows Calculator (programmer mode) and verify the result very quickly.

I am learning x86-64 assembly with an online course and the course is horribly unclear in detail. I've searched online and read several SO questions but couldn't get an answer.
I tried to figure out how to calculate binary multiplication by hand, but I am stuck with imul .
Given this example of binary multiplication, 11111111 * 00000011, it can be viewed as 255 * 3 unsigned or -1 * 3 signed.
255*3
   mov al, 255
   mov bl, 3
   mul bl

this is easy and here's how I calculate by hand, just like decimal multiplication:
     11111111
x    00000011 
--------------
     11111111       
    11111111
--------------
   1011111101  

The result overflows, the upper half is 10 in ah and the lower half is 11111101 in al. My manual calculation matches the program result.
-1*3
when it comes to signed,
   mov al, -1
   mov bl, 3
   imul bl

the program result is 11111111 in ah and 11111101 in al.
How can I calculate this result by hand? I was told that sign extension is involved in imul, but I really don't know how it works here.
I am using SASM IDE and NASM Assembler.
