No, 40 is quite right...
What you seem to be expecting is this: "x * 2 * n", but left shift is a different operation.
You can think of left shift as an efficient "x * 2^n" where n is the number - in your case 3. So what you're doing is 5 * 8, which is 40.
Same goes for 80: 5 * 16, which is 80.
Tim Čas
2010-10-23 22:01:56