about | help | code help+videos | done | prefs |
In computer programming, a bitwise rotation, also known as a circular shift, is a bitwise operation that shifts all bits of its operand. Write the method CIRC that shifts a positive integer by the specified distance. In LCIRC or left rotation(negative distance), the bits that fall off at left end are put back at right end. In RCIRC or right rotation(positive distance), the bits that fall off at right end are put back at left end. CIRC(16, -2) → 64 CIRC(16, 2) → 4 CIRC(65535, -3) → 524280 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200 Post-solution available
Copyright Nick Parlante 2017 - privacy