FantasticFerret
FantasticFerret
02.10.2019 • 
Mathematics

As we will see later in x86 programming, there is an instruction called "lea" that can perform computations of the form (a < < k) + b, where k is either 0, 1, 2, or 3, and be is either 0 or some program value. the compiler often uses this instruction to perform multiplications by constant factors. for example, we can compute 3*a as (a< < 1) + a. considering cases where b is either 0 or equal to a, and all possible values of k, what multiples of a can be computed with a single lea instruction?

Solved
Show answers

Ask an AI advisor a question