Kirchhoff's rules provide a means of obtaining enough independent equations to solve for currents in an electrical circuit. They were first described in 1845 by German physicist Gustav Kirchhoff and consist of two equalities: (1) the Junction Rule states that the sum of currents entering a junction equals the sum leaving, based on conservation of charge, and (2) the Loop Rule states that the sum of voltages around a closed conducting loop must be zero, based on conservation of energy. Kirchhoff's rules can be applied to traffic flow analysis and are the basis of circuit simulation software used in integrated circuit design.