1.3.1 Logic Gates
Logic Circuit
.- Logic gates combined together to carry ou a specific function .- e.g. controlling a robot .-They can have more than 2 inputs
B= NOT 1
.-Means B = 0 .-Inputs start as a 1. If you need a 0, write it as A = NOT 1, and put a NOT gate in the input.
Truth Table
.-Trace the Output of a logic gate or logic circuit .-all possible combinations of 0s and 1 considered
Off the shelf logic units
.-Very common building block NAND .-All gates (and/or/not) can be build with NAND
Truth table using logic statements
.-X is an OR of both intermediate values A B C (A=1 AND B=NOT 1) (B=1 AND C=NOT 1) X 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 0
9.-Produce a logic circuit to solve a given problem or to implement a gien written logic statement
1.- Write down the logic statement representing the scenario. e.g. X on if A is ON and B is OFF A=1 AND B=NOT 1 2.-Write the logic gates for EACH PART 3.- Combine all the parts 4.-Write the truth table. Two ways 1.-(all possible inputs -> the intermediate outputs -> final output) 2.- Using the original logic statement: ADVANTAGE-> check logic circuit is correct
1. Use Logic Gates to create electronic circuits
Electronic circuits, new memories, controlling devices are MADE UP of THOUSANDS of LOGIC GATES
Logic circuits in the real world
Electronic companies review logic circuit design: 1.-Cheaper: use "off-the-shelf" logic units and build the circuit as a number of "building blocks" 2.-Simplifying it as much as possible, e.g. in satellites you have very little space Also <<components→ << cost
ON and OFF
In binary: ON = 1 OFF = 0
Logic Gates
Take binary inputs and produce a binary output .- All Logic Gates 2 inputs except NOT that has 1
5.-NAND gate
The output, X, is 0 if : input A AND B are BOTH 1 X=A NAND B (logic notation) ---- X = a . b (boolean algebra)
6.- NOR gate
The output, X, is 1 if : input A AND B are BOTH 0 X=A NOR B (logic notation) ---- X = a + b (boolean algebra)
7.- XOR gate
The output, X, is 1 if : there is only one 1 X=A XOR B (logic notation) - - X = (a . b) + (a . b) (boolean algebra)
2.-NOT gate
The output, X, is 1 if: input, A, is 0 X=NOT A (logic notation) - X = a (boolean algebra)
3.- AND gate
The output,X, is 1 if : BOTH inputs, A and B, are 1 X=A AND B (logic notation) X = a.b (boolean algebra)
4.-OR gate
The output,X, is 1 if : EITHER inputs, A or B, is 1 X=A OR B (logic notation) X = a + b (boolean algebra)
8.-Produce tables for given logic circuit for example abc
The picture shows a complex logic gate combining three simple gates. .-3 inputs and 8 possible outcomes. .- To complete a truth table do a WHOLE COLUMN BEFORE NEXT COLUMN .-Put intermediate outputs after each gate .-Truth Table A B C D E Z 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1