Multiple choice technology programming languages

. Shifting left n bits, and right n bits, Where n is some number greater than 0 is equivalent to?

  1. Mulitplying by 2*n and Dividing by 2*n

  2. Dividing by 2*n and Multiplying by 2*n

  3. Multiplying by n and Dividing by n

  4. Dividing by n and Multiplying by n

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Left shifting by n bits multiplies by 2^n (each position shift is a power of 2). Right shifting divides by 2^n. This is fundamental to binary arithmetic.