In this work we propose to implement supervisory control by embedding control in the plant Finite State Machine (FSM). Supervisory control is introduced by extending the plant with boolean variables, guard formulas and updating functions. Boolean variables are used to encode the supervisor's states. Event observation is captured by a set of boolean functions that update the values of boolean variables, and control is introduced by guarding events with boolean formulas. The resulting Extended Finite State Machine (EFSM) implements the supervisory control map in the sense that the languages closed and marked by the EFSM are equal to those of the supervised system. After studying embedded supervisory control under partial observation, centralized and decentralized control architectures are analyzed. It is shown that the coobservability condition remains necessary and sufficient for the existence of decentralized supervisors. An application of our approach in the synthesis of communication protocols is presented.