In this paper we propose a structure dependent method for the systemat
ic design of a self-checking circuit which is well adapted to the faul
t model of single gate faults and which can be used in test mode. Acco
rding to the fault model considered, maximal groups of independent and
unidirectionally independent outputs of an arbitrarily given combinat
ional circuit are determined. A parity bit is added to every group of
independent outputs. A few additional outputs are added to every group
of unidirectionally independent outputs. In the error free case, thes
e groups of unidirectional independent outputs together with their cor
responding additional outputs are elements of a unidirectional error d
etecting code; for example, a Berger code or an r-out-of-s code. It is
demonstrated how the pairs of (unidirectionally) independent outputs
of a given circuit can be determined. A simple heuristic solution for
this problem based on a modified circuit graph is also given. The maxi
mal classes of (unidirectionally) independent outputs can be computed
as cliques of a dependency graph where the nodes of the graph are the
outputs of the circuit. The applicability of the proposed method is de
monstrated for the MCNC benchmarks circuits.