This paper develops an encoding scheme for discrete-state systems as part of a hybrid-state hierarchy. The codes are based on commands between subsystems, in the sense that the interactions of the discrete states with the continuous states are exploited to attach significance to what each discrete state does to the continuous subsystem. The resultant codeset is independent of how the discrete-state transitions are designed, and conventional tools such as truth tables and K-maps are easily applicable in the binary representation of the codes. Code-based representations of every possible combination of commands/behaviors governed by the discrete subsystem is useful in a number of design scenarios, an example of which is the generation of a consistent norm for discrete states. Such a norm is demonstrated to be useful in hybrid-state estimation.Index Terms-Discrete-event systems, intelligent vehicles, hybrid-state systems (HSSs), state encoding.