Rewritten test.c - correct bitshifts now