answersLogoWhite

0


Best Answer

Shift right preserves the sign by preserving the sign-bit (leftmost bit):
10>>1 returns 5
-10>>1 returns -5

Zero-fill shift right sets sign-bit to zero:
10>>>1 returns 5
-10>>>1 returns document.write(-10>>>1); 2147483643

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between shift right assignment and right shift zero fill operator with proper example?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the Difference between post fix and prefix plus plus operator?

For both cases, the ++ operator increments the integer by one. The difference lies in when it makes that increment. Take the following for example: int B = 3 A = ++B // A = 4, B = 4 --------------- int B = 3 A = B++ //A = 3, B = 4 In the prefix example, the increment occurs before the assignment. In the suffix example, the increment occurs after the assignment.


Which value is modified by an operator?

The value of the variable which is on the left side of the assignment operator. Example: a = 2


Complex assignment in java?

An Assignment operator in Java is the operator that is used to assign a variable a value. if you declare int x = 10; then the value 10 is assigned to the variable x. here the "=" symbol is the assignment operator.


What is the difference between bit wise operator and logic operator?

The logic operator provides boolean results of combinations of other boolean expression, some of which might be relational expressions. For example... bool result = (a < 3) && (b > 4); The bitwise operator provides the same kind of boolean logic, AND, OR, and NOT, but it does it to the correspondingly ranks bits in one or two integers. For example ... int result = (a & 0xff) | (!b);


What is the difference between you equals 10 and you equals equals 10 in c language?

The = operator is the assignment operator. The == operator is the equality or equals operator. The = operator is the assignment operator. We use it to assign a value (the right hand operand) to an object (the left hand operand). The value must be of the same type as the object unless the value can implicitly convert to the object's type. If not, we must explicitly cast the value to the appropriate type. The operator evaluates to the value of the object after assignment, thus creating a temporary value that can be used in other expressions. Examples: int you; you = 10; // assign the value 10 to the object named 'you' int me, you; me = 10; you = 10; Note that the second example can also be written: int me, you; me = you = 10; This is because the expression 'you = 10' evaluates to the temporary value 10 (the value of 'you' after assignment) which we then assign to 'me'. Operators are evaluated according to operator precedence, and assignment 'chains' like this are always evaluated from right to left. The == operator is the equality or equals operator. We use it to determine if two object's have the same value. If so, the expression evaluates true, otherwise false. Operators that evaluate true or false are known as Boolean operators (functions that return true or false are known as predicates). Typically we use the == operator in conditional expressions: if (a == b) { // code to execute when the value of a is equal to the value of b } else { // code to execute when the value of a is not equal to the value of b } while (a == b) { // This code will loop repeatedly so long as a is equal to b at the beginning of each iteration } The == operator is one of six Boolean operators that can be used to compare object values: == : equal != : not equal < : less than <= : less than or equal > : greater than >= : greater than or equal


What is the difference between has and have and give an example?

the difference between has and have is that you use has in sentences with : ( she , he and it ) for example : she has a book . but you use have in sentences with : ( I , you , we and they ) for example : you have a book , I have a book .


Can anyone let you know what does pipe function does in C?

The | operator in C is a bitwise inclusive OR. The operator in C is the logical inclusive OR. operator http://msdn.microsoft.com/en-us/library/f355wky8.aspx | operator http://msdn.microsoft.com/en-us/library/edc0fscw.aspx The main difference between the two is does short-circuit evaluation and | does not. Example: 1 1 is true. 1 1 is true.


What is the difference between homework assignment and agreement?

Semantics. Homework "agreement" is not generally a term accepted to have any significance.The only condition to this would be if you and another individual had some kind of interpersonal agreement, and the executor chose to call it a homework "agreement," but this would have to be mutually agreed upon by all parties.From a linguistic perspective, the difference between "assignment" and "agreement" is the direction of power in the interaction. Agreement is something done with mutual consent between parties; Assignment is something done by one party to another.An example of an "agreement" situation would be between a therapist and a client, in which the client agrees to work on a project to help him/herself in later therapy sessions.An assignment would be like a school assignment, where you are being instructed to do something by an authority figure.


Difference between eg and ie?

example given......in example


What is pointer operator?

For example: [] * -> + - ++ -- = += -= & == < <= > >= !


What is binary operation?

A binary operator is simply an operator that works with two operands (for example, two numbers). The binary operator is usually written between the two operands. Examples include the familiar operations of addition, subtraction, multiplication, or division - for example, in: 2 + 3 the "plus" is the binary operator, which works on the two numbers written on either side of it. What is an operator: Basically a function (calculation rule), written in a special way.


What is oprator?

A symbol that specifies an operation between the operands. Often written between the operands. Example: 1 + 2; here, "+" is the operator, and the numbers are the operands.