A “four-state device” can be exemplified by an electrical relay (two states, “energized” and “de-energized”, for the relay coil, times two states, “open” and “closed”, for the relay contacts). Such a device can be represented, abstractly, by a two-by-two Boolean matrix. By using these matrices as elements and by defining some binary operations by abstract representations of certain circuit configurations, an algebra is constructed. It is shown that this algebra contains Boolean algebra as a special case. A probability metric for a single four-state device is introduced by way of a simple random walk on four lattice points in the plane, which yields Markov transition probabilities. A simple example of a “network” is chosen, and the “reliability” (strictly speaking, the time-dependent probability of being in any of the four possible states) of the network is calculated. It is thus seen to be possible, at least in principle, to calculate the reliability of a relay contact network, taking into account the reliability of the coils which activate those contacts.