Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 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