FreeBASIC <-> Visual C++ .NET | Bitwise right shift

FreeBASIC

shr

Description

par1 shr par2
Used keywords: shr

Input


Output

Examples

FreeBASIC

Bitwise right shift the possible of use:
x = 8 shr 1        ' x = 4
y = &Hff shr 4     ' y = 15
z = (x shr 2) shr 2 ' z = 0

FreeBASIC

Even one example in what situations we can use the operation bitwise right shift:
i shr 2
2 shr i
32 shr (&HA shr 2) shr 1
.
Visual C++ .NET

>>

Description

par1 >> par2
Used keywords: >>

Input


Output

Examples

Visual C++ .NET

Bitwise right shift the possible of use:
x = 8 >> 1;        // x = 4
y = 0xff >> 4;     // y = 15
z = (x >> 2) >> 2; // z = 0

Visual C++ .NET

Even one example in what situations we can use the operation bitwise right shift:
i >> 2
2 >> i
32 >> (0xA >> 2) >> 1

You can find it in the following collections: bitwise operators
Languages: en hu cz sk