Computer Science, Operating Systems.
-1 × 2³+ 0 × 2²+ 0 × 2¹+ 1 × 2⁰ = -8+0+0+1 = -7 In C, the casting between two data types will NOT affect the underlying bit pattern, but just how we interpret them. short int v = -12345; unsigned short uv = (unsigned short)v; printf("v=%d, uv=%u\n",v,uv); // v=-12345, uv=53191 What if we perform