Circular Shift Application

I would like to know some examples of the application of circular shifts. For example, a shift to the right by an unsigned integer will result in a division by two. Conversely, a left shift will result in multiplication by 2. Are there any known / interesting properties of a circular shift on binary numbers.

Note. An example of a left / right shift is an illustration of the application of this particular operator. I am asking for examples similar to the operator / circular shift function.

+3
source share
3 answers
  • Convert a 16-bit word between a large and a lower order representation: right or left circular shift by 8.
  • - : t = rand(); result = t XOR cshift(t,1).
  • , : - . : ", Perfect Shuffle" ( 7). , . 2 (mod (2^N - 1)), .
  • Micro-. , 2- . , , . ( ). 6 . 4, , . , 5.
  • , . , Twofish Cipher .
+2

, , - , . . , .. , , . , ?

, n . , " ".

, !

+5

- 2 (mod 2 ^ N), N - .

2 (mod (2 ^ N - 1)). , (2 ^ N-1).

+2
source

All Articles