Problem shifting bitwise Output

Have you checked weather the shift library shifts the MSB first or LSB? The pin order may be reversed.