Alright, first off, the code above doesn't compile. The variable "c" is never declared.

But here's explanations of each of those things:

1. Bitwise OR (Inclusive Or)

Every number is represented as a string of 0s and 1s; 5 is 101, 7 is 111, 8 is 1000, and so on. When you do a bitwise IOR, for each bit (0 or 1), you keep it if the bit from the left is 1, or the bit from the right is 1, otherwise it's 0. Let me give an example.

Imagine X = 8, Y = 6. Therefore, in binary, X == 1000 and Y == 110 (use a binary calculator, such as windows calculator, to calculate these if you need to; otherwise see my related links section for binary conversion lessons).

Now, we do this (line up the bits, note the added leading 0 on Y):

Now since the first bit is 1 in X and 0 in Y, we keep it. The second bit is 1 in Y and 0 in X, so we keep it. Same with the third bit. The fourth bit, however, is 0 in both, so we do not keep it. We end up with the result 1110, which is 14. Therefore, 8 | 6 == 14.

2 and 3. Arithmetic shifts

When shifting, once again imagine bits. Imagine you have 10 (1010) as your number. When you left shift it, you add a 0 to the end (10100), which is 20. When you right shift it, you pop the last bit off the binary. 1010 becomes 101, which is 5. (Notice how LSH is just multiplying by 2, RSH is dividing by 2.)

4. Bitwise XOR (Exclusive Or)

This is just like IOR, except that ONLY ONE bit can be 1 to keep it.

Let's do 7 and 10.

The first bit is 1 in 10, 0 in 7, so we keep it. The second bit is 0 in 10, 1 in 7, so we keep it. The third bit, however, is 1 in both, so it is not kept. Fourth bit is the same as the second. Therefore, our result is 1101, which is 7 ^ 10 == 13.

Hope that's thorough enough. For more, here's related links:

Arithmetic shift - Wikipedia, the free encyclopedia Bitwise operation - Wikipedia, the free encyclopedia Hexadecimal, decimal and binary conversion chart. - AtariAge Forums Binary Numbers - An intro to binary numbers & conversion formulas
Good luck!