Multiply by a constant with shifts

A left shift n << k computes 2kn2^k n. The constant 2424 can be written as a difference of two powers of two, so 24n=(na)(nb)24n = (n \ll a) - (n \ll b) with non-negative integer exponents a>ba > b (two shifts and one subtraction). Find a+ba + b.

Show hints (2)+
  1. Write 2424 as a difference of two powers of two: the power just above 2424 is 32=2532=2^5, and 3224=8=2332-24=8=2^3.
  2. So a=5a=5, b=3b=3; add them.

Answer

Reveal answer →

8

Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.

Asked at: Timed Mental-Math & Sequences, Game-Based Aptitude

Related questions