循环左移
循环左移 | |
---|---|
术语名称 | 循环左移 |
英语名称 | circular left shift |
别名 | rotational left shift |
循环左移(circular/rotational left shift)是位运算的一种,指将数据的全部位向高位移动并把左侧溢出的部分补在低位的运算。
定义
循环左移 | |
---|---|
运算名称 | 循环左移 |
运算符号 | |
Latex | |
运算对象 | 二进制串, 自然数 |
运算元数 | 2 |
运算结果 | 二进制串 |
定义域 | [math]\displaystyle{ \mathbb{B}^n \times \mathbb{N} }[/math] |
陪域 | [math]\displaystyle{ \mathbb{B}^n }[/math] |
对二进制串 [math]\displaystyle{ b_1 b_2 \cdots b_m }[/math] 和自然数 [math]\displaystyle{ n }[/math] ,得到二进制串 [math]\displaystyle{ b_{n+1} b_{n+2} \cdots b_m b_1 b_2 \dots b_{n} }[/math] ,称这种运算为循环左移(circular/rotational left shift),得到的二进制串称为原二进制串循环左移 [math]\displaystyle{ n }[/math] 位(rotated left by [math]\displaystyle{ n }[/math] (bits) / shifted left by [math]\displaystyle{ n }[/math] (bits) rotationally/circularly)的结果。
位运算 | ||
---|---|---|
按位运算 | 按位运算 | 按位取反、按位与、按位或、按位异或 |
特殊情况 | 掩码、位设置、位清除、位反转 | |
移位运算 | 算术移位 | 算术左移、算术右移 |
逻辑移位 | 逻辑左移、逻辑右移 | |
循环移位 | 循环左移、循环右移 |