Operations are usually grouped by their "arity". Unary operations act on one object, in logic we have the operation of negation. It takes one statement and does something to it. Binary operators take two statements and create something new out of them. There are also operators that take three, four,... statements, but they are more of a theoretical interest.

Although there are four unary and sixteen binary operations in logic, we traditionally work only with negation and four binary connectives. There is a good reasong for this, all the others can be expressed using these basic five. This should not be so surprising, after all, you surely know that instead of writing 3 × 7 one can write 7 + 7 + 7, so we can actually do without multiplication when working with integers. In was proved that in logic we can do with even less than those five, every logical operation one can think of can be expressed using for instance just the negation and the "or" operation. Now why do we not work with just these two? For the same reason why we use multiplication. We could do without, but writing for instance 1573 × 7790 using just addition would be very inconvenient. Similarly, even a relatively simple statement could lead to a long and complicated expression when written using those two logical operations. Those five basic logical operations are a compromise between a small number of operations and our wish to write things nicely. Moreover, those five basic operations are closest to what people use when composing thoughts, which is very convenient as well, they are not alien to our usual thinking.

However, this does not mean that other operations are useless. For instance, computers relay on our ability to create electrical bugs that can play with 0's and 1's, that is, they can do logic. Making five basic bugs in order to program everything else is not very economical, moreover, some of these basic operations are hard to wire up. Therefore the electrical industry focuses on another binary operation called "nand", it is actually a negation of "and", which has two important properties. First, it is easy to wire into electrical bugs. Second, this one operation by itself is enough to express any other logical operation. That is, every trick with 0's and 1's one can come up with can be wired up using just the "nand" bugs. This makes them very convenient. For example, I am willing to bet that you used some USB flash memory lately. Well, it means that you also used "nand", because the usual procedure for storing/retrieving data in flash memories is based on just this operation. On the other hand, the memory that keeps the most important part of your computer's system is wired using another operation called "nor". As you can see, there is definitely more to logic than those basic five operations, but these are specialized applications and we need not worry about them. In our usual work in mathematics we can safely ignore these exotic (but wonderful) creatures.