C++ <-> FreeBASIC | Bitwise right shift
C++ Used keywords: >>
>>
Description
par1 >> par2
Input
- par1 - Any integer
- par2 - Any integer
Output
- Result - Integers
Examples
C++
Bitwise right shift the possible of use:x = 8 >> 1; // x = 4
y = 0xff >> 4; // y = 15
z = (x >> 2) >> 2; // z = 0
C++
Even one example in what situations we can use the operation bitwise right shift:i >> 2
2 >> i
32 >> (0xA >> 2) >> 1
.
FreeBASIC Used keywords: shr
shr
Description
par1 shr par2
Input
- par1 - Any integer
- par2 - Any integer
Output
- Result - Integers
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
You can find it in the following collections: bitwise operators
Bitwise right shift in another programming language:
Differences to: