> if (code == 100000)
This is a decimal constant (base 10)

> if (code == 000010)
This is an octal constant (base 8)

If you really want to input and compare binary, then you'll need to do it using strings.