To split water into hydrogen and oxygen in the hydrogen generator needs a lot of energy. Electricity is used to…