Multiple choice

Which of the following bit manipulations is equal to doubling the number i?

  1. i<<1

  2. i>>1

  3. i<<2

  4. i>>2

  5. none of these

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

It shifts the bits of the number towards left by 1 bit. Hence it is equal to multiplying the whole number by 2.