WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Using the Shift Operators

Keywords: 	  Shift Operators

Question:

Does any one have an example of the correct use of >> and << operators? I have not found any doing searches on the various help files.

Answer:

Well you have to understand the binary representation of numbers.

Basically each shift left for small numbers will multiply it by 2, and a shift right will divide it by 2.

a = 6
b = 3 
; this is a times 2x2x2
c= 6 << b
Message("Result is",c)

Article ID:   W14624
Filename:   Shift Operators.txt
File Created: 2001:01:23:09:22:58
Last Updated: 2001:01:23:09:22:58