Nothing special: value >> number.
Example:
/* shift.c */
#include <stdio.h>
int main (void)
{
long n;
int i;
n= -98765;
for (i=0; i<20; ++i) {
printf ("%2d: %6ld %lx\n", i, n>>i, n>>i);
}
return 0;
}
output:
0: -98765 fffe7e33
1: -49383 ffff3f19
2: -24692 ffff9f8c
3: -12346 ffffcfc6
4: -6173 ffffe7e3
5: -3087 fffff3f1
6: -1544 fffff9f8
7: -772 fffffcfc
8: -386 fffffe7e
9: -193 ffffff3f
10: -97 ffffff9f
11: -49 ffffffcf
12: -25 ffffffe7
13: -13 fffffff3
14: -7 fffffff9
15: -4 fffffffc
16: -2 fffffffe
17: -1 ffffffff
18: -1 ffffffff
19: -1 ffffffff
Chat with our AI personalities
52. The absolute value is the nonnegative value of a number. Enclosing vertical bars ( | | ) are the absolute value operator. Using that notation we can state that |a| = a, and |-a| = a. You can also note that |a| (whether a is negative or positive) equals the square root of a squared.
If the absolute value of the negative is bigger than that of the positive, then the answer is negative. If the absolute value of the negative is the same, then zero. If the absolute value of the negative is smaller, then positive. Absolute value is the value ignoring the sign.
The result will be a negative value.
An absolute value can not be negative.
No, like signs multiply to positive, unlike to negative.