You can interface switch on input/output port of 8051 micro controller. Ports are TTL (Transistor Transistor Logic) pins. Its has 0V or 5V on pin depending upon ON or OFF. Give 5V supply to input port and connect switch to ground with respect to that port.
Connect your switch to port as shown above for better performance.