codice:
5*8 = 5 * 2^3 = 5 << 3

5*7 = 5 * 2^2 + 5* 2^1 + 5 * 2^0 = 5 << 2 + 5 << 1 + 5 << 0
Tradotto in assembly:
codice:
mov ax, 5
mov bx, 7

xor dx, dx

mov cx, ax ;; cx = ax
shl ax, 2 ;;ax <<= 2;
add dx, ax ;; dx += ax

mov ax, cx;; ax = cx
shl ax, 1 ;; ax <<= 1
add dx, ax;; dx += ax

mov ax, cx;; ax = cx
shl ax, 0;; ax <<= 0
add dx, ax;; dx += ax