Fast shifting can be accomplished by using dedicated multipliers. Shifting left N places is equivalent to multiplying by 2N.
(a) Given that A is a 16-bit unsigned number and 0 ≤ N ≤ 15, show how to construct a left shifter using a multiplier and a decoder.
(b) Write VHDL code that infers this type of shifter.
(c) Repeat (a) and (b) for a right shifter. Hint: Multiply by 215N and select the appropriate 16 bits of the 32-bit product.