# Bitwise Operations and the Naming Convention of their Operators

So I just recently came across a bitwise operation on StackOverflow which shifts the bits in a binary number to the right while zero-filling from the left. The left side zero-filling overwrites the sign bit, thus it always yields positive representations of a number (the result cannot be negative).

E.g.:

11010101 >>> 3

yields

00011010

According to the normal mathematical conventions for naming operators, would it be correct to call this an unsigned bitshift operator? I ask because it seems that this is not inherently an unsigned bitshift but just a zero-filling shift that overwrites (i.e. does not propagate) the sign bit. So, basically, it seems like although the result will always be unsigned it does not seem semantically correct to call the operator an unsigned bitshift operator. Another [lemma??] which I've run into that further supports the argument that this operator should not be called unsigned is that it can be used on both signed and unsigned operands.

• It sometimes fill ones from the right if there was a 1 in the signed bit and sometimes it fills zeros, it's system dependant (at least in C). Also, AFAIK, it's called bit shift (to the right) operator (C again). – shinzou Jun 2 '15 at 19:03
• Yeah that makes sense to me to call it bit shift (to the right). The documentation I linked to seems to also [correctly?] call it a "zero-fill right shift" operator. The main reason I asked the question is that I've found it in certain documentation where it is referred to as the unsigned right shift operator. – Alex W Jun 2 '15 at 20:01

Both $$0$$-filling and $$1$$-filling cases are referred to as bitshift operations. Calling the former an unsigned bitshift operator is ambiguous, as it is unclear what unsigned applies to (is it the bit, the bitshift, or the operator?).