# lshift\(&lt;&lt;\) {#lshift}

**Parent topic:**[Operators](../../../Programming/Operators/Operators.md)

## Syntax {#syntax}

X&lt;&lt;a

## Arguments {#arguments}

**X** is an integral scalar/pair/vector/matrix.

**a** is the number of bits to shift.

## Details {#details}

Shift bits to the left.

## Examples {#examples}

```
lshift(2, 10);
// output: 2048

1..10 << 1;
// output: [2,4,6,8,10,12,14,16,18,20]

1..10 << 10;
// output: [1024,2048,3072,4096,5120,6144,7168,8192,9216,10240]

1:10<<10;
// output: 1024 : 10240
```

Related operator: [rshift](rshift.md)

