Question: Why is (W * Y) equal to (W < < N) ? Multiply_WY: mov eax, 0 ; Initialize eax prior to using it mov ebx,
Why is (W * Y) equal to (W << N) ?
Multiply_WY: mov eax, 0 ; Initialize eax prior to using it mov ebx, 0 ; Initialize ebx prior to using it mov esi, W ; Move the address of W into esi mov eax, [esi] ; Move the value at W into eax mov esi, Y ; Move the address of X into esi mov ebx, [esi] ; Move the value at Y into ebx imul eax, ebx ; Multiply: X * Y mov [RESULT], eax ; Store the result Display_WY_product: Print_Msg MSG_A0, LEN_A0, RESULT ; ======== Calculate X << N ======== Shift_W_left_by_N: mov eax, 0 ; Initialize eax prior to using it mov ecx, 0 ; Initialize ecx prior to using it mov esi, W ; Move the address of W into esi mov eax, [esi] ; Move the value at W into eax mov esi, N ; Move the address of N into esi mov ecx, [esi] ; Move the value at N into cl register shl eax, cl ; Shift W << N mov [RESULT], eax ; Store the result Display_W_left_shift: Print_Msg MSG_A1, LEN_A1, RESULT ;
Step by Step Solution
There are 3 Steps involved in it

Get step-by-step solutions from verified subject matter experts