bbsl(Bin, Shift) -> % function accepts binary and number << _:Shift, % match Shift number of bits into dummy variable _ and Rest/bits>> = Bin, % puts rest of the bits into Rest variable from Bin variable << Rest/bits, % start creating new binary with bits from Rest at beginning 0:Shift >>. % and Shift number of 0 in the end
Hope that made sense
source share