Logic and Logic Gates
Unit 09: Assignment 4 Anas Patel
This is a preview of the whole essay
BTEC National Unit 9 Computer Architecture Assignment 2: Computer Components and Features Criterion covered P7, M2, M4, D1
For these tasks you are required to produce a report using drawings or diagrams and appropriate technical language. Make sure you use appropriate headings and subheadings to identify separate tasks and requirements
- Use logic diagrams, and truth tables and narrative to describe the operation of the following logic gates:
- Use simple logic gates (eg AND, OR, NOT) to produce a logic circuit to:
a) Show a security circuit which includes input from a movement-sensing PIR (passive infra red sensor) and a light sensor. While there is movement sensed, and it is dark, the security light must be lit.
b) Describe the logic circuit for accessing an electrical cabinet. For safety reasons, a high voltage electrical maintenance cabinet can only be accessed if the power is off, a special key is inserted, and the high tension line is earthed.
c) Describe the logic circuit for a Half-Adder.
Be sure to include the logic diagram, Boolean algebra statement and truth table for each and a description of how each works. You will also need to provide keys to any letters used to represent inputs and outputs. [M2]
- Describe the difference between astable and bistable flip-flops using appropriate diagrams. [M4]
- Build complex logic circuits from arrays of simple logic circuits to:
a) Use Half-Adders and further logic gates to build a Full Adder
b)build a logic circuit including Full Adders to add together the contents of two eight-bit registers. [D1]
LIST OF LOGIC GATES
WORKING OUT TRUTH TABLES
All of the logic gates obviously have a truth table. The formula for working out the number of possible outputs is 2n. N is the number of inputs. E.g. if there are 2 inputs than the formula would be 22. The answer is 4. This means that there are 4 possible outputs.
- AND GATE
In AND gates the output can only be 1 if all the inputs are all 1 and if either of the output are 0 and the other input is 1 than output will always be 0. The two inputs AB and output Q represent the expression which in effect is right because the stands for AND.
- NAND GATE
A NAND gate can have more than 2 inputs. The above NAND gate has 3 inputs. Therefore the formula to work out the number of output is 23 = 8. The truth table is on the side. Even though the formula to work out the number of outputs for the truth table is the same, the actual gate is completely opposite because if the can only be 0 if all inputs are 1. The output will always be 1 if the inputs are mix of 0 and 1. The input expression for this gate is . The line above stands for NOT. The circle on the symbol is called a bubble and is generally used to indicate the inverted (active-low) input or output.
- OR GATE
There are two inputs so the equation is 22 = 4. The truth table is on the side as always. You can only get the output as 0 if all the inputs are 0 and if either of the two inputs are 0 or 1 then the output will always be 1. The logical expression for this is pretty simple. The + actually stands for OR. This expression mean Q = A (OR) B
- NOR Gate
There are two inputs so the formula would be 22 and the answer is 4. The output can only be 1 is all the two inputs are 0 and if the output is 0 that means that the two inputs are 1 and 0 or 0 and 1. The expression for this gate is . This means that Q = A (NOT OR) B
- NOT Gate
In a NOT Gate also know as an “Inverter”, there is always 1 input. If the input is 1 than output is 0 and if the output is 1 than output has to be 0. The logical expression is which means Q = NOT A.
This type of gate is implemented in computers for binary addition. If both the inputs are 0 than the output will also be 0 and if both the inputs are 1 than the output will also be 0. XOR is actually short for exclusive OR.
The logical expression for the XOR gate is which means that Q = (A AND NOT B) OR (B AND NOT A).
This type of gate is simply the inverse of XOR (exclusive OR). You can only get a result of 1 is both the inputs are same either 00 or 11. If the inputs are different e.g. 0 and 1 or 1 and 0 than the output will be 0. The expression for this type of gate is.