|  | Left bit shift (For modes 2D, 3D, Console) |  Show exampleHide example | Bitwise operator. Takes binary representation of the value and shifts all bits by given number of positions to the left. |
Bits from right are set to 0. Every shift to the left by 1 is equivalent to multiplication by 2.
Save number 1 to the variable i and eight times do left bit shift by 1 and writes the number to the output window. | | |
|
|
|  | Right bit shift (For modes 2D, 3D, Console) |  Show exampleHide example | Bitwise operator. Takes binary representation of the value and shifts all bits by given number of positions to the right. |
Bits from left are set to 0. Every shift to the right by 1 is equivalent to division by 2.
Save number 256 to the variable i and eight times do right bit shift by 1 and writes the number to the output window. | | |
|
|
Did you find this information useful?
Documentation of SGP Baltie 4 C#
Send us comments on this topic by
this form
©1978-2010
SGP SystemsParent page |
Previous page |
Next page