The electric chair came to replace hanging because it was not efficient and the process of dying was very long most of the time due to the difficulty to ensure that the death is quick and painless. The electric chair was proposed after some one witnessed a person die quickly after being electrocuted. Electric chair is a humane method to execute some one because it is quick, efficient, and guarantees in almost all of the cases a death without a torture.
During the execution the first shock is delivered between 1,700 and 2,400 volts, which lasts for between 30 seconds and a minute. The first shock automatically destroyed the brain and the central nervous system, which makes everything painless. It causes the paralysis of the whole body and muscles are unable to contract anymore, which stops breathing. Electrocution is fast and it makes sure that the criminal dies because the second shock continues the process to ensure the heartbeat does not resume.
The prisoner is supposed to be rendered unconscious in 1/240th of a second.