Hi Hama,
Imagine the possible values of a byte variable like the face of a clock. At the top of the clock, where 12 would be, there is the value zero. Imagine that moving clockwise the values increase until we reach 127. Imagine that moving counter-clockwise from zero the values are negative, and decrease until we reach -128.
These two values, -128 and 127, are next to each other at the bottom of the clock face where the 6 would be.
Now imagine your long value to be a piece of
string, or a rope of licorice or
fruit leather -- something that is rolled up and can be unrolled. The length of the rolled-up long is its value, and the units are the same as the units on the clock face. We are going to unroll the long, along the circumference of the clock, starting at zero and moving clockwise. If the value is 127 or lower, then we do not run out of positive values on the clock face before we have unrolled the long value, and then we don't see a difference in the value of the byte after casting.
BUT
If the value is greater than 127, guess what? We just keep unrolling around the edge of the clock, up into the negative values! We started with the value of 130, and now we have used up the positive values from 1 to 127. Now we will move from -128 toward zero. We have 3 units left to account for, so we end up at -126.