diff --git a/Hardware/Logic_Gates/Creating_memory_with_NAND.md b/Hardware/Logic_Gates/Creating_memory_with_NAND.md new file mode 100644 index 0000000..c3ec4e9 --- /dev/null +++ b/Hardware/Logic_Gates/Creating_memory_with_NAND.md @@ -0,0 +1,10 @@ +--- +title: Creating memory with NAND gates +categories: + - Computer Architecture + - Electronics + - Hardware +tags: [logic-gates, binary] +--- + +# Creating memory with NAND gates diff --git a/Hardware/Logic_Gates/Logic_gates.md b/Hardware/Logic_Gates/Logic_gates.md index cfb3f2e..429b9e7 100644 --- a/Hardware/Logic_Gates/Logic_gates.md +++ b/Hardware/Logic_Gates/Logic_gates.md @@ -7,11 +7,12 @@ tags: [logic-gates, binary] --- # Logic gates + > [A logic gate consists in] three connections where there may or may not be some electricity. Two of those connections are places where electricity may be put into the device, and the third connection is a place where electricity may come out of the device. (Scott, 2009 p.21) -Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is identical to the truth-conditions of the [Boolean connectives](../../Logic/Truth-functional_connectives.md) specifiable in terms of [truth-tables](../../Logic/Truth-tables.md). +Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is identical to the truth-conditions of the [Boolean connectives](../../Logic/Truth-functional_connectives.md) specifiable in terms of [truth-tables](../../Logic/Truth-tables.md). -Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a transistor responding to the current. But on a more abstract level it is bits that go into the gate and bits which come out: binary information that may be either 1 or 0. +Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a transistor responding to the current. At the next level of abstraction it is bits that go into the gate and bits which come out: binary information that may be either 1 or 0. ## References diff --git a/Hardware/Logic_Gates/Nand_gate.md b/Hardware/Logic_Gates/Nand_gate.md index 8a55765..5000868 100644 --- a/Hardware/Logic_Gates/Nand_gate.md +++ b/Hardware/Logic_Gates/Nand_gate.md @@ -10,42 +10,31 @@ tags: [logic-gates, binary] A NAND gate is a logic gate that inverts the truth-conditions for `AND`. -A real-life circuit showing two switches corresponding to two transistors which control the LED light: - -![NAND_from_transitors.png](../../img/NAND_from_transitors.png) - -In this circuit, there are two transistors, each connected to a switch. The switches control the LED light. So the switches are the input and the LED is the output. - -For clarity, we are not going to draw both transistors, we will simplify the diagram with a symbol for them which stands for the NAND gate: - -![NAND.png](../../img/NAND.png) +Diagram representing NAND gate: + The diagram below shows how the circuit models the truth conditions for `NAND` -Diagram representing NAND gate: - -![NAND.gif](../../img/NAND.gif) - + * When both switches are off (corresponding to `false` `false`) the output is on (the bulb lights up). * If either one of the switches are on, the output remains on (corresponding to `true` `false` or `false` `true` ) * It is only when both switches are on, that the output is off (corresponding to `true` `true` ) - This is the exact opposite to the truth-conditions for AND. ## Transliterating the logic truth-table to the switch behaviour -We can now present a truth table for NAND along side that for AND: +We can now present a truth table for NAND along side that for AND: ``` A B Output _ _ _____ -f f t -t f t -f t t -t t f +f f t +t f t +f t t +t t f A B Output _ _ _____ @@ -54,12 +43,13 @@ t f f f t f f f f ``` + We can see that it inverts the value of AND. ## Significance of the NAND gate: functional completeness > **Equipped with just a NAND we can represent every other possible logical condition within a circuit.** -In practice, it is more efficient to use specific dedicated gates (i.e OR, AND, NOT etc) for the other Boolean connectives but in principle the same output can be achieved through NANDs alone. +In practice, it is more efficient to use specific dedicated gates (i.e OR, AND, NOT etc) for the other Boolean connectives but in principle the same output can be achieved through NANDs alone. When we add more NAND gates and combine them with each other in different ways we can create more complex output sequences and these too will have corresponding truth tables.