links: Elixir MOC
Bitwise binary functions1 can be performed on integers using the Bitwise module
band/2: bitwise ANDbsl/2: bitwise SHIFT LEFTbsr/2: bitwise SHIFT RIGHTbxor/2: bitwise XORbor/2: bitwise ORbnot/1: bitwise NOT
Bitwise.band(0b1110, 0b1001)
# => 8 # 0b1000
Bitwise.bxor(0b1110, 0b1001)
# => 7 # 0b0111tags: bit-manipulation
sources: