Four-node neuronal network motifs are widespread in neural networks. Their dynamical and functional roles are studied in this paper. By computational modeling, firing-rate model and integrate-and-fire neuron model with the chemical coupling are used to model two typical four-node neuronal network motifs. Numerical results show that the structures of the motifs and the properties of every node play the significant roles in the dynamics and functions. By analyzing the impacts of the input current and the neuronal excitability, several interesting phenomena, such as acceleration and delay of response and long- and short-term memory, are observed. In addition, it is shown that the large time constants can prolong short-term memory which plays important roles in almost all neural computation and cognition task. Furthermore, these motifs can accomplish simple calculations of subtractors and comparators.