Anonymous user
Bitwise operations: Difference between revisions
m
→{{header|Common Lisp}}
Line 682:
(defun shr (x width bits)
"Compute bitwise
(logand (ash x (- bits))
(1- (ash 1 width))))
Line 698:
(defun rotr (x width bits)
"Compute bitwise
(logior (logand (ash x (- (mod bits width)))
(1- (ash 1 width)))
|