Give binary values to my arduino inputs

At the first i used arduino UNO (Do you Remember? )
My coding was also based on ardino uno
It appears that i did not have enough I/O even with registers and things start to becomplicated
So i switched to arduino Mega and keep the wiring and the code as it's.