Suppose I have the following inputs:11101111If I perform a logical right shift by 2 on each, are the 5-bit outputs these:0011100111or these:0111001111If it's neither, then I'd appreciate an explain why and what I've done wrong!
4-bit input, 5-bit output, logical right shift by 2, which is the correct set of 5 output bits?
boolean algebra
There are two ways to do a shift: either the new  digit (the leftmost, msb) is set to zero, or it is set to the digit that was there before. The former is usually called logical shift while the latter preserves the sign of the number (in case you use the complement representation) and is called arithmetic shift. But sometimes both are just called shift, and one needs to clarify the desired behavior.Since you as about buffers of length 5 bits, the msb is anyway 0 so logical shift-arithmetic shift, and I'd say the 2-bit right shift is:01110  -> 00111 -> 0001101111  -> 00111 -> 00011