public function getBinarySlice($binary, $start, $size, $binaryLength)
    {
        $binary >>= $binaryLength - ($start + $size);
        $mask = ((1 << $size) - 1);

        return $binary & $mask;
    }