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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

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

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!

Related Book