This paper focus on the issue of electric energy dissipation in code execution on microprocessors of electric vehicles, and proposing use of State Assignment algorithms to minimize energy consumption in vehicle’s Electric Control Units. State Assignment Algorithms are used to minimize bit transition at each state change of FSM (Finite State Machine) that provide solution to power dissipation problem in FSM synthesis. We propose use of State Assignment Algorithm in Embedded code to reduce the bit transition that leads to lower energy consumption in CMOS circuit. The primary goal of using State Assignment Algorithm in embedded coding is to reduce switching activity in the state register. In this paper different proposed State Assignment Algorithms will be studied to understand how a state assignment algorithm reduces switching activity. We will go through the basic of how switching activity is related to energy consumption. And also propose a State Assignment Algorithm.