A logical shift moves bits and fills emptied positions with zeros. An arithmetic right shift repeats the sign bit to preserve the sign of a twos-complement value. A barrel shifter selects a shift amount through combinational stages instead of shifting one position over several cycles.

Worked example

Four-bit 1100 shifted right logically by one becomes 0110, or unsigned 6. Arithmetic right shift gives 1110, which is signed −2, matching −4 divided by two in this exact case. A rotation would wrap a displaced bit around instead of discarding it.

What to watch for

Left shifts can lose high bits and overflow. Arithmetic right shifting a negative odd value rounds toward negative infinity in the usual twos-complement interpretation.

Try it yourself

What is logical left shift by one of 0011 in four bits?

Answer: 0110. The original high bit was zero, so no one-bit information was lost in this case.

How to study this topic

State the operand width and signedness first. Work out a decimal answer, then compare it with the binary result. Keep result bits, carry, borrow and signed overflow distinct when interpreting the circuit's output.

Explore related programmes

These recorded programmes are upcoming. This article is general educational content, not a syllabus or course sample.

Digital Electronics