Kembali ke Perpustakaan
Region:
Switch to EN
Menengah Exercism • elixir
Bit Manipulation
Ringkasan Pelajaran
# Introduction
About
Bitwise binary functions can be performed on integers using functions from 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 # 0b0111
Originally from Exercism elixir concepts