Maths & numbers

Fixed-width bit rotation calculator

Rotate a bit pattern in both directions without discarding any bits.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Rotate a bit pattern in both directions without discarding any bits.

THE FORMULASplit at the rotation point and wrap the displaced bits

A worked example

Rotating 10000001 left by one gives 00000011.

Good to know

The rotation count wraps modulo the word width.

Read the result

Rotate a bit pattern in both directions without discarding any bits.

The primary result is labeled “Rotate left”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

The rotation count wraps modulo the word width.

For a related exercise, try the greatest common divisor.

A few questions, answered

How can I check the default inputs by hand?

Rotating 10000001 left by one gives 00000011.

Which rule does this calculator apply?

Split at the rotation point and wrap the displaced bits

Find your calculator

Start typing to explore the library.