#elisp
Function:
lsh integer1 count
lsh
, which is an abbreviation for logical shift, shifts the
bits in integer1 to the left count places, or to the right
if count is negative, bringing zeros into the vacated bits. If count is negative, lsh
shifts zeros into the leftmost
(most-significant) bit, producing a positive result even if integer1 is negative.
If you want to change selection, open document below and click on "Move attachment"
GNU Emacs Lisp Reference Manual: Bitwise Operationson acts on the individual bits of such a sequence. For example,
shifting moves the whole sequence left or right one or more places,
reproducing the same pattern “moved over”.
The bitwise operations in Emacs Lisp apply only to integers.
<span>Function: lsh integer1 count
lsh , which is an abbreviation for logical shift, shifts the
bits in integer1 to the left count places, or to the right
if count is negative, bringing zeros into the vacated bits. If
count is negative, lsh shifts zeros into the leftmost
(most-significant) bit, producing a positive result even if
integer1 is negative. Contrast this with ash , below.
Here are two examples of lsh , shifting a pattern of bits one
place to the left. We show only the low-order eight bits of the binary
pattern; the re Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details