;; there are faster portable versions (define (bitwise-and a b) (cond ((zero? a) 0) ((zero? b) 0) (else (+ (if (and (odd? a) (odd? b)) 1 0) (* 2 (bitwise-and (quotient a 2) (quotient b 2)))))))