Right Arithmetic Shift Calculator

Written by:

Here is a right arithmetic shift calculator. Enter a number to convert to 32 bit binary, plus the number of spaces to shift to the right, and the tool will return the result after the arithmetic shift.

With an arithmetic shift, the sign of the number is preserved, see the right logical shift calculator to shift all digits and add leading zeroes.

Right Arithmetic Shift Calculator

Using the Right Arithmetic Shift Calculator

To use the right arithmetic shift calculator, enter a number to shift right in the "Number to Shift" field in the tool. Then, in the "Steps" field, enter how many digits to shift the number to the right.

Once happy with the inputs, click the "Calculate Right Arithmetic Shift" button.

The result of the shift will show up in the "Shifted Number" field, already converted to integer:

Right arithmetic shift the number 4 2 digits
Right arithmetic shift 2 digits on the number 4

Right Arithmetic Shift Example

Behind the scenes, the tool converts the number to a 32-bit binary number, then shifts it right the number of spaces you'd like to move. Let's walk through the screenshotted example a step at a time to see how it works:

4 >> 2 = 1\\(steps)\\
100\ (4) >>2=\\
010\ (2)>>1=\\
001\ (1)

In an arithmetic shift, you preserve the first binary digit. That is, if you have a negative number, you will maintain a negative because the shift preserves the 1 at the front of the number's two's complement representation. With a right logical shift, you will have 0s substituted up front so all numbers will become positive (or stay positive).

Other Binary Calculator

Try our other binary math calculators:



PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram