# Logic Gates

In this post I am to discuss the ins and outs of logic gates, but before I start, let me recommend to all of you a pair of links about fracking, which is a technique that, far from being based on renewable energy (you know? you can find references to gas utilization as far back as millenniums in some old-well-known-books of which I will not recommend any (or either I recommend you all), letting all of you to plunge into remote ancient times to find etymology and references for that),it is much more  yet another way to drill the Earth’s foundations…

http://www.onegreenplanet.org/environment/countries-except-united-states-that-have-banned-fracking/

In brief, this technique injects water into subsoil to create ‘controlled’ explosions which generate heat, and pushes the fraction of gases in the area through a drilling which leads to a chamber where the product of the explosions will be used in order to obtain the desired result, gas, in this case (none of alternate, renewable energies, as far as I know…) and also other undesired products such as earthquakes, for instance…

And once I have told you this, let’s plunge into logic gates, but first…

analogical gates

Well… leaving all this nonsense apart…

Logic gates are a type of electronic devices which can simulate analogical ones. They are more economical, because they can be manufactured in series and can also be miniaturized for their implementation in lots of apparatuses such as mobile phones, tablets, or other types of microchip | IC (stands for Integrated Circuit) fed technologies.

Putting apart their factual physical constitution, I will explain here the basics of their maths, and the first thing you must know to understand them is their symbols.

logic gates

In the image above you have the logic gates and their truth tables. For each one of them there are two inputs and one output. Inputs values are represented on the columns whose headers are A, and B.

In logic you only have two possible values (I do not include here the trivalued logics, which in computer science provide run time errors when a ‘null’ return value comes with a non-controlled (initial value) not-1 or not-0, rendering any other value enclosed in the topology for the data type possible values, for the sake of clarity), so

either yes, high, 1,

or no, low, 0.

The third column in each truth table for the logic gates, gives the result, which depends of the logic gate considered.

The AND gate is on the right top corner of the above image, it looks like a capital D and has two lines on its left, which are the inputs, and one line on its right, which is the output.

On the right of its symbol there is a truth table. As we are considering two inputs, and only two values are possible, this renders a four row set of situations:

A = 0 , B = 0 in an AND gate gives a zero as output.

A = 1 , B = 0                                            0

A = 0, B = 1                                             0

A = 1, B = 1                                              1

This results are so, because the AND gate is mathematically equivalent to multiplying the values of the inputs, so whenever there is a zero, the result turns into a zero. So it only lets the function (algorithm) pass, when the two inputs are in high state (1,1).

The OR logic gate is right below the AND gate in the image above, looks a bit like a tragedy and comedy mask laying flat horizontally, without eyes nor mouth, and has also two lines on the left, and one line on the right, as is the case for the rest of gates (but the NOT gate) represented in the image.

The truth table has a different output, this is because for OR gates, the mathematical equivalent is an addition, so it renders a high whenever there is a high on either input, or mathematically simplified, whenever the addition for input values is not zero it results in a no-zero value (that’s a high). So here you have 0, 1, 1, 2 (decimal, 1 for logic analysis in truth tables), as results of the addition of A, and B, input values.

You can also think of this as intersection and union Venn sets diagrams (they are so clear that they ended wiped out of the mathematics world for the sake of obscurity… two or three decades ago…).

Venn diagram

#### Venn diagrams are very similar to Euler diagrams, which were invented by Leonhard Euler in the 18th century.’   en.wikipedia

Venn’s diagrams

AND gate is an intersection, and OR gate is a union.

And here comes NAND and NOR…

But first, there is the NOT gate. The NOT gate simply turns the input (output) into the other state, so you have a ‘one’, turned into ‘zero’, and a ‘zero’ turned into a ‘one’. Its symbol is on the top left corner of the logic gates image above. It is represented with an input and an output, looks like a triangle with a little bubble on the pointing angle.

And I’ll publish this post as it is now, and I’ll add the rest of the info in forthcoming updates later.

(Some hours afterwards…) [Well… you know?, it is not a narrative style… it is to make sense for newcomers… 🙂 ].

NAND is an AND gate with a NOT gate at the output, so you only need to take the AND gate third column (the one for the results) and swap ‘zeroes’ and ‘ones’.

The NOR gate follows the same mechanism, put a NOT at the output, and swap ‘zeroes’ and ‘ones’.

And the same goes for the EXNOR (exclusive NOR), take the EXOR (that is exactly the same as the XOR gate, but with a more clear naming protocol), and put a NOT, and there you are the swapping of the output values.

These gates I commented today are also represented in the logic gates image above, with their corresponding truth tables.

And I’ll write the implications of all these integrated circuiteries (at least the most relevant) in the next post, that I’ll write right away.

## Acerca de María Cristina Alonso Cuervo

I am a teacher of English who started to write this blog in May 2014. In the column on the right I included some useful links and widgets Italian is another section of my blog which I called 'Cornice Italiana'. There are various tags and categories you can pick from. I also paint, compose, and play music, I always liked science, nature, arts, language... and other subjects which you can come across while reading my posts. Best regards.
Esta entrada fue publicada en Computer Science, English, Global issues, Hilarious, Physics Chemistry and Mathematics, Science y etiquetada , , , , , , , , . Guarda el enlace permanente.