-22 = -(2·2) = -4
(-2)2 = (-2)·(-2) = 4
The exponent operates only on the number to its immediate left unless there are parentheses; then it operates on the number(s) within the parentheses. So in -22 we are NOT squaring -2, we are squaring 2 then taking the negative of the square. In (-2)2 we are squaring -2.