|
-
January 16th, 2009, 01:06 PM
#1
[RESOLVED] Don't understand
this help link (No works in Firefox, only in IE)
ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vbalr/html/fdb93d25-81ba-417f-b808-41207bfb8440.htm
says:
 Originally Posted by ms-help
"Arithmetic shifts are not circular, which means the bits shifted off one end of the result are not reintroduced at the other end. In an arithmetic left shift, the bits shifted beyond the range of the result data type are discarded, and the bit positions vacated on the right are set to zero."
But then gives an example:
 Originally Posted by ms-help
Code:
Dim pattern As Short = 192
' The bit pattern is 0000 0000 1100 0000.
Dim result4 As Short
'...
result4 = pattern << 17
The results of the previous example are as follows:
...
result4 is 384 (0000 0001 1000 0000).
...
but that result is only possible if the Shift IS circular.
then it says:
 Originally Posted by ms-help
The shift amount for result4 is calculated as 17 AND 15, which equals 1.
I don't get it.
[Vb.NET 2008 (ex Express)]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|