public class Test
public Shared Sub Main
'&HFF = the hex value FF, which equals 255, and
'1111 1111 in binary
Dim numberToBeShifted As Integer = &HFF
numberToBeShifted = numberToBeShifted << 4
Console.WriteLine(numberToBeShifted)
numberToBeShifted >>= 2
Console.WriteLine(numberToBeShifted)
End Sub
End class
4080
1020
2.18.Bit |
| 2.18.1. | Bit Shift left and right |
| 2.18.2. | Sign Bit |