RosettaCodeData/Task/Bitwise-operations/Racket/bitwise-operations.rkt
Ingy döt Net 518da4a923 B
2013-04-10 16:19:29 -07:00

9 lines
230 B
Racket

#lang racket
(define a 255)
(define b 5)
(list (bitwise-and a b)
(bitwise-ior a b)
(bitwise-xor a b)
(bitwise-not a)
(arithmetic-shift a b) ; left shift
(arithmetic-shift a (- b))) ; right shift