RosettaCodeData/Task/Bitwise-operations/Scheme/bitwise-operations-1.ss

16 lines
307 B
Scheme
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
(import (rnrs arithmetic bitwise (6)))
2013-04-10 16:19:29 -07:00
(define (bitwise a b)
(display (bitwise-and a b))
(newline)
(display (bitwise-ior a b))
(newline)
(display (bitwise-xor a b))
(newline)
(display (bitwise-not a))
(newline)
(display (bitwise-arithmetic-shift-right a b))
(newline))
(bitwise 255 5)