Left shift operator
问题 If I have the following: char v = 32; // 0010 0000 then I do: v << 2 the number becames negative. // 1000 0000 -128 I read the standard but it is only written: If E1 has a signed type and nonnegative value, and E1 × 2 E2 is representable in the result type, then that is the resulting value; otherwise, the behavior is undefined. so I don't understand if is a rule that if a bit goes on most left bit the number must begin negative. I'm using GCC. 回答1: Left shifting it twice would give 1000 0000)