8051 is a 40 Pin microcontroller, consisting 4 ports, each port consists 8 pin, i. E. A total of 4X8=32 pins. These pins are used to input/output operation, some Pins have dual functions like timer, interrupts etc.