# (lsh integer1 integer2)
[GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md)
<!-- help-structure:notice -->
> **Source status:** This source topic has 1 recorded inherited issue(s). [Source issue details](../../../Source%20Issues.md).
<!-- /help-structure:notice -->
<a id="220"></a>
## (lsh integer1 integer2)
---
Do a bitwise shift.
---
This function performs a logical shift of bits. *Integer1* denotes the number, while *integer2* denotes the number of bits to shift *integer1*. When *integer2* is positive, it shifts to the left; negative shifts to the right.
**lsh** works with [integers](../../../Source%20Issues.md#issue-59d778939c246256) only. The 1 signifies the bit is on; the 0 signifies it is off.
### Examples
| Code | Returns |
| --- | --- |
| (**lsh** 12 1\) | 24 |
| (**lsh** 8 -1) | 4 |
| (**lsh** 24 3\) | 192 |
**Tell me about...**
[(\~ number)](%28-%20number%29.md)
[(and expression ...)](%28and%20expression%20...%29.md)
[(boole function integer1 integer2 ...)](%28boole%20function%20integer1%20integer2%20...%29.md)
[(logand integer1 integer2 …)](%28logand%20integer1%20integer2%20-%29.md)
[(logior integer1 integer2 …)](IDR_LISP_B218.md)
[(or statement ...)](%28or%20statement%20...%29.md)
[LISP Compatibility](../LISP%20Compatibility.md)
[Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md)
<a id="holding"></a>
## Other versions with matching text
[GstarCAD 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28lsh%20integer1%20integer2%29.md)