Pascal <-> JavaScript | Bitwise left shift

Pascal

shl

Description

par1 shl par2
Used keywords: shl

Input


Output

Examples

Pascal

Bitwise left shift the possible of use:
x := 16 shl 2;      { x = 64}
y := $f shl 5;     { y = 480}
z := (x shl y) shl 2;{ z = 256}

Pascal

Even one example in what situations we can use the operation bitwise left shift:
i shl 4
$12AB shl j
128 shl (j shl(3 + i))
.
JavaScript

<<

Description

par1 << par2
Used keywords: <<

Input


Output

Examples

JavaScript

Bitwise left shift the possible of use:
x = 16 << 2;      // x = 64
y = 0xf << 5;     // y = 480
z = (x << y) << 2;// z = 256

JavaScript

Even one example in what situations we can use the operation bitwise left shift:
i << 4
0x12AB << j
128 << (j <<(3 + i))

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