function 20 outputs to a program being executed on the microprocessor the combination of switches which has been actuated to give rise to the voltage v in the program is denoted 22 in fig2 and provides a response based on the actuated combination of switches reverting to fig1 each resistor has a unique value which means that a unique different voltage v in is generated at the decoding terminal 11 depending upon which combination of switch switches is are simultaneously actuated in the described embodiment the values are as follows but it will be appreciated that any unique values which have the effect that a unique voltage is generated for each combination of switches can be used to implement the invention in fact the resistor values selected in fig1 and fig3 and as listed above only allow a maximum of two switches to be simultaneously actuated for each decoding terminal 11 but has the advantage of producing a linear voltage difference between each of the voltages produced on decoding terminal 11 for each individual switch that is actuated this allows a large voltage guard band between the switches for the decode function and can easily tolerate noise voltages on v in if it is required to be able to decode more than two switches simultaneously actuated then binary weighted values for the resistors should be chosen e g 250 ohms 500 ohms 1000 ohms 2000 ohms 4000 ohms 8000 ohms.