This paper presents an original method of designing reversible circuits. This method is destined to most popular gate set with three types of gates CNT (Control, NOT and Toffoli). The presented algorithm based on graphical representation of the reversible function is called s-maps. This algorithm allows to find optimal or quasi-optimal reversible circuits. The paper is organized as follows. Section 1 recalls basic concepts of reversible logic. Especially the cascade of the gates as realization of reversible function is presented. In Section 2 there is introduced a classification of minterms distribution. The s-maps are the representation of the reversible functions where the minterms distribution is presented. The choice of the first gate in the cascade depends on possibility of improving the distribution. Section 3 describes the algorithm, namely how to find the optimal or quasi-optimal solutions of the given function.
 O. Golubitsky and D. Maslov, “A study of optimal 4-bit reversible Toffoli circuits and their synthesis,” IEEE Transactions on Computers, vol. 61, no. 9, 2012,. pp. 1341-1353.
 C. Bandyopadhyay, H. Rahaman, R. Drechsler, “A Cube Pairing Approach for Synthesis of ESOP-Based Reversible Circuit,” Proceedings of the IEEE International Symposium on Multiple-Valued Logic, pp. 109-114, May 19-21, 2014
 C. S. Cheng, A. K. Singh, “Heuristic Synthesis of Reversible Logic - A Comparative Study”, Advances in Electrical and Electronic Engineering, vol. 12, no. 3, pp. 210-225, September 2014
Financed by the National Centre for Research and Development under grant No. SP/I/1/77065/10 by the strategic scientific research and experimental development program:
SYNAT - “Interdisciplinary System for Interactive Scientific and Scientific-Technical Information”.