answersLogoWhite

0

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

16y ago

What else can I help you with?

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


What does assignment mean in python?

In Python, assignment refers to the process of assigning a value to a variable using the = operator. This operator takes the value on its right and stores it in the variable name on its left. For example, in the statement x = 5, the value 5 is assigned to the variable x. Assignment allows for the storage and manipulation of data throughout a program.


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);


Difference between modulus and division operator?

The modulus operator (%) returns the remainder of a division operation, while the division operator (/) calculates the quotient. For example, in the expression 10 / 3, the result is 3, while 10 % 3 yields a remainder of 1. Thus, the division operator provides the whole number part of the division, whereas the modulus operator focuses on what remains after dividing.


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.


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.


Difference between eg and ie?

example given......in 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.

Trending Questions
Why do I not have spark at any plugs after a cylinder head change out on a 98 cavalier 2.2 replaced coil pacs and crank sensor? Where on a 92 Chevy suburban do you find an ac compressor relay switch? Where is the engine temperature sensor on a 2005 ford escape xlt? How do you remove rear brakes on a 2004 jeep wrangler? How do you know if your car key has a chip in it? How do you replace a timing chain for a 1994 ford f-150 XL 6-cylinder 4.9l rd f-150 XL 6-cylinder 4.9l? What is the fuel capacity in a 1999 Ford Expedition? Where is fuse located for the blinkers on a Chevy Camaro? What type of antifreeze goes in a 2003 Chrysler PT Cruiser? Does a 2003 Dodge Ram 1500 have limited slip? What is the coolant capacity for a 1992 Ford F-150 8-cylinder? How much does it cost to replace a heater core in a 1989 Lincoln town car? If you have a smallblock 305 your starter stays engaged anybody knoe why? What engine control or sensor would cause black sooty exhaust above idle speed on a 1988 merkur xr4ti? Where is power steering fluid fill hole in Monte Carlo ss 2001? How long is the warranty against rust on the 2012 Jeep Wrangler? What is location of signal flasher on 1991 Ford Thunderbird? 98 astro 2wd extcab wont start after it rains and or high condensation Also tru is missing and will only accellerate up to half throttle if you floor it the engine rpm drops down and misses and backfi? Can a faulty knock sensor leak water? How much horsepower does a 1999 Oldsmobile aurora have?