What is the logic of logic gates?

It is just a logic of manipulating binary values.