PHP <-> FreeBASIC | Bitwise left shift
PHP Used keywords: <<
<<
Description
par1 << par2
Input
- par1 - Any integer
- par2 - Any integer
Output
- Result - Integers
Examples
PHP
Bitwise left shift the possible of use:$x = 16 << 2; // x = 64
$y = 0xf << 5; // y = 480
$z = ($x << $y) << 2;// z = 256
PHP
Even one example in what situations we can use the operation bitwise left shift:$i << 4
0x12AB << $j
128 << ($j <<(3 + $i))
.
FreeBASIC Used keywords: shl
shl
Description
par1 shl par2
Input
- par1 - Any integer
- par2 - Any integer
Output
- Result - Integers
Examples
FreeBASIC
Bitwise left shift the possible of use:x = 16 shl 2 ' x = 64
y = &Hf shl 5 ' y = 480
z = (x shl y) shl 2' z = 256
FreeBASIC
Even one example in what situations we can use the operation bitwise left shift:i shl 4
&H12AB shl j
128 shl (j shl(3 + i))
You can find it in the following collections: bitwise operators
Bitwise left shift in another programming language:
Differences to: