bit-and applies bitwise conjunction to two or more integer arguments. Each output bit remains 1 only when the corresponding bit is 1 in every argument, making it useful for masking and low-level arithmetic. section 3.2.3
Use the following contract when calling bit-and:
- Pass at least two byte, short, int, or long values; additional arguments are allowed. section 3.2.3
- Receive a java.lang.Long containing the bitwise conjunction. section 3.2.3
- Expect IllegalArgumentException for an invalid type and NullPointerException for nil. section 3.2.3
Combining binary masks
(bit-and 201 198) ;; 192 (Long/toBinaryString (bit-and 2r11001001 2r11000110)) ;; "11000000" (bit-and 2r11001001 2r11001000 2r01011110) ;; 01000000
