Neural networks provide an alternative way to solve complex optimization problems. Instead of performing a program of instructions sequentially as in a traditional corn-. puter, neural network model explores many competing hypotheses simultaneously using its massively parallel net. The paper shows how to use neural network approach to perform vertical micro-code compaction for a micro-programmed control unit. The compaction procedure includes two basic steps. The first step determines the compatibility classes and the second step selects a minimal subset to cover the control signals. Since the selection process is an NP-complete problem, to find an optimal solution is impractical. In this study, we employ a customized neural network to obtain the minimal subset. We first formalize this problem, and then define an "energy function" and map it to a two-layer fully-connected neural network. The modified network has two types of neurons and can always obtain a valid solution.