Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Bitwise-operations/XLISP/bitwise-operations.l
Normal file
8
Task/Bitwise-operations/XLISP/bitwise-operations.l
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(defun bitwise-operations (a b)
|
||||
; rotate operations are not supported
|
||||
(print `(,a and ,b = ,(logand a b)))
|
||||
(print `(,a or ,b = ,(logior a b)))
|
||||
(print `(,a xor ,b = ,(logxor a b)))
|
||||
(print `(,a left shift by ,b = ,(lsh a b)))
|
||||
(print `(,a right shift by ,b = ,(lsh a (- b)))) ; negative second operand shifts right
|
||||
(print `(,a arithmetic right shift by ,b = ,(ash a (- b)))) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue