TXT · Text & Data tools

Arithmetic Shift Right Calculator

Operand A
Operand B / shift count
expression

0x000000F0 SAR 0x0000000F = 0x00000000

32-bit result

0000 0000 0000 0000 0000 0000 0000 0000

Unsigned decimal
0
Hexadecimal
0x00000000
Octal
0o00000000000
Go to the full Bitwise Calculator

Arithmetic shift right calculator

Enter the base value as operand A and the shift count as operand B. The result shows as unsigned decimal, hexadecimal, octal, and 32-bit padded binary. The operation preserves the sign bit of the 32-bit input.

Sign extension

Unlike a logical shift, an arithmetic right shift copies the original sign bit into each vacated high position. If operand A is negative (bit 31 is 1), the new high bits are all 1s and the value remains negative. If operand A is positive, the new bits are 0s and the value halves normally. This makes arithmetic shift right the correct operation for signed two’s complement division.

Unsigned display on a signed operation

This page fixes the word at 32 bits and shows the result as unsigned decimal by default. A value like -1 (0xFFFFFFFF) displays as 4294967295. To read the signed decimal interpretation, use the full Bitwise Calculator with the signed output toggle on. Operand A accepts decimal, hexadecimal (0xFF), binary (0b10110010), and octal (0o377) automatically. Operand B must be a non-negative integer.

Frequently Asked Questions

Use an arithmetic shift when working with signed negative numbers in two's complement. It copies the highest bit (the sign bit) into the vacated positions, preserving the sign of the result.

It divides by two but rounds toward negative infinity rather than toward zero. Shifting `-3` right by 1 gives `-2`, not `-1`.

Standard integer division (like `-3 / 2` in C or Java) truncates toward zero, giving `-1`. An arithmetic shift truncates toward negative infinity.

Specific bitwise operations

Full Bitwise Calculator tool

Explore Our Tools

Browse all tools