I copy pasted the code from the hello world shift register example from http://arduino.cc/en/Tutorial/ShftIn11 and when I test it, I get funny results: my problem is that when I press the 8th bit (2^7 position), I sometimes get 11111111 instead of 10000000(expected result). When this happens, the other buttons connected to my shift in stop working. A hypothesis I have is that my pull-up resistors are of 100 ohm, not the suggested 10k, but This was never a problem before today (using the same chip). I have checked and double checked my wiring and I have tried swapping the register for a new one, but no luck.
Like I said, this sometimes happens, then, for some reason I don't understand, it starts working properly again, and when I least expect it, it stops working (gives 11111111 if the 8th bit is pressed or nothing if any other bit is pressed).
I am using: arduino Uno r3, CD4021BE shift register
Thanks in advance for the help