(require "numbers.BRU" "logic.BRU" "division.BRU") [(bit-|-impl (\bit-| (\x (\y (cond ((= x y) x) ((zero? x) y) ((zero? y) x) (else (+ (⋅ (bit-| (int/ x 2) (int/ y 2)) 2) (if (& (even? x) (even? y) 0 1))))))))) (bit-&-impl (\bit-& (\x (\y (cond ((= x y) x) ((zero? x) 0) ((zero? y) 0) (else (+ (⋅ (bit-& (int/ x 2) (int/ y 2)) 2) (if (| (even? x) (even? y)) 0 1)))))))) (bit-shift-left (\x (\n (⋅ x (** 2 n))))) (bit-shift-right (\x (\n (int/ x (** 2 n))))) (bit-set? (\x (\n (odd? (int/ x (** 2 n))))))]