Gap junctions are prevalent in every nervous system, but their role in information processing remains largely unknown. In C. elegans, the role of gap junctional communication in touch sensitivity has been demonstrated. In this animal, the entire complement of gap junctions in the nervous system is documented, therefore providing a good model for the computational investigation of circuit functions of gap junctions.We explored several hypotheses about the role of gap junctions in the nervous system of C. elegans by systematically analysing an anatomical database with recursive algorithms. We find that gap junctions connect different sets of neurons from those connected by chemical synapses. In addition, when analysing the topology of the gap-junction networks, we find that, surprisingly, most (92%) neurons in the worm are linked in a single gap-junction network. The worm nervous system can only be divided into smaller networks by assuming that two or more gap junctions are necessary for functional coupling or that neural activity has limited propagation. However, these groups, and others identified using algorithms with subsets or combinations of restrictive criteria, do not correspond to any known circuits identified in genetic and behavioral studies. Finally, we notice that the function of some gap junctions appears linked to their precise location on the neuronal processes. We propose that the location of the gap junctions within the neuron determines their functional role.