How do I bitwise shift left and right

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

I have an integer where I want to shift the bits to the
left or to the right.

What is the VBA command to do that?

My integer is e.g.: 0000 0010 0000 0000
I want it to shift to: 0000 0100 0000 0000
 
Would this be just a matter of multiplying or dividing by a power of 2?

The exponentiation operator is ^.
The integer division operator is \.
 
Back
Top