September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
8
Task/Bitwise-operations/XLISP/bitwise-operations.xlisp
Normal file
8
Task/Bitwise-operations/XLISP/bitwise-operations.xlisp
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