I forgot to mention that there are resistors to ground (to keep the input 'low' when no button is pressed) and that the buttons switch to the +5 Volts.