The advantages of using a microcontroller are reduced size of circuitry and increased flexibility. A microcontroller can be used as a substitute for other integrated circuits, or ICs. It can also be easily reprogrammed to modify its function.
A microcontroller is a type of IC with an embedded memory, processor and programmable input and output peripheral devices. It can be configured to respond to inputs and to control outputs as well as serve as a string of logic gates.
The program that is installed in a microcontroller is read in machine code. Typically, the program is written in another language and needs a software converter before it can be read.