Sei sulla pagina 1di 25

Computer System Low- Level Techniques

CT073-3-2

Simple Logic Gates


Topic & Structure of The Lesson

• A general definition
• Characteristics of login gates
• Simple Input Gates
• AND and OR Gates
• NAND and NOR Gates
• Exclusive OR Gates

CT073-2-3 and CSLLT Logic Gates Slide ‹2› of 25


Learning Outcomes

At the end of this topic, You should be able to

• Define logic gates


• Discuss characteristics of logic gates
• Explain functions of the AND, OR, NAND, NOR and
Exclusive OR gates

CT073-2-3 and CSLLT Logic Gates Slide ‹3› of 25


Key Terms You Must Be Able To
Use
• If you have mastered this topic, you should be able to use the following
terms correctly in your assignments and exams:

• Integrated Circuits
• Transistors
• Digital Circuits
• Boolean Algebra
• Logic Gates

CT073-2-3 and CSLLT Logic Gates Slide ‹4› of 25


Integrated Circuits

Computer - a simple collection of digital switches


- computers are build up of Integrated
circuits
Designed for specialized functions
- Examples: the CPU, bus interface,
memory management unit
- Made up of transistors, resisters,
capacitors and other electronic
components
Transistors - primary components of IC’s
CT073-2-3 and CSLLT Logic Gates Slide ‹5› of 25
Transistors

Boolean algebra - basic computer logic design

Transistors - means for implementing Boolean


algebra
Switches: on/off to represent the 0’s and 1’s of
binary digital circuits

Combined to form logic gates

CT073-2-3 and CSLLT Logic Gates Slide ‹6› of 25


Digital Circuits

Different types of logic


Combinatorial Logic
Results of an operation depends only on the present inputs to the
operation
Purposes: perform arithmetic, control data movement, compare
values for decision making
Sequential Logic
Results depends on both the inputs to the operation and the
results of the previous operation
Purposes: Counters

CT073-2-3 and CSLLT Logic Gates Slide ‹7› of 25


Boolean Algebra
• Rules that govern constants and variables that can take
on 2 values
True/false; on/off; yes/no; 0/1

• Boolean logic
Rules for handling Boolean constants and variables 3
fundamental operations:
AND, OR and NOT

• Truth Table: specifies results for all possible input


combinations

CT073-2-3 and CSLLT Logic Gates Slide ‹8› of 25


Logic Gates
• There are two series of symbols for logic gates:
• The traditional symbols are widely used in industry and
education

The IEC (International Electrotechnical Commission) symbols are


rectangles to show the gate function

CT073-2-3 and CSLLT Logic Gates Slide ‹9› of 25


NOT gate (inverter)
• A NOT gate can only have one input. A NOT gate is also
called an inverter.

Input A Output Q

0 1
1 0
Traditional symbol IEC symbol
Truth Table

CT073-2-3 and CSLLT Logic Gates Slide 10› of 25


AND gate

• An AND gate can have two or more inputs, its outputs is


true if all inputs are true.
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1

Traditional symbol IEC symbol Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹11› of 25


NAND gate (NAND = Not AND)

• An NAND gate can have two or more inputs, its outputs


is true if NOT all inputs are true.
Input A Input B Output Q
0 0 1
0 1 1
1 0 1
1 1 0

Traditional symbol IEC symbol Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹12› of 25


OR gate

• An OR gate can have two or more inputs, its outputs is


true if at least one input is true.
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 1

Traditional symbol IEC symbol Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹13› of 25


NOR Gate (NOR = Not OR)

• A NOR gate can have two or more inputs, its outputs is


true if no inputs are true.
Input A Input B Output Q
0 0 1
0 1 0
1 0 0
1 1 0

Traditional symbol IEC symbol Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹14› of 25


EX-OR (Exclusive-OR) gate
• This is like an OR gate but excluding both inputs being
true.
EX-OR gates can only have 2 inputs
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0

Traditional symbol IEC symbol Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹15› of 25


EX-NOR (Exclusive- NOR) Gate

• The output Q is true if inputs A and B are the SAME


(both true or both false)
• EX-NOR gates can only have 2 inputs.
Output
Input A Input B
Q
0 0 1
0 1 0
1 0 0
1 1 1
Traditional symbol IEC symbol
Truth Table

CT073-2-3 and CSLLT Logic Gates Slide ‹16› of 25


Summary truth tables

The summary truth tables below show the output


states for all types of 2-input.

CT073-2-3 and CSLLT Logic Gates Slide ‹17› of 25


Summary truth tables
• The summary truth tables below show the output states for all types
of 2-input and 3-input gates. Note that EX-OR and EX-NOR gates
can only have 2 inputs

CT073-2-3 and CSLLT Logic Gates Slide ‹18› of 25


Combinations of logic gates

• Logic gates can be combined to produce more complex functions.


• For example to produce an output Q which is true only when input A
is true and input B is false, as shown in the truth table on the right,
we can combine a NOT gate and an AND gate like this

Q = A AND NOT B

CT073-2-3 and CSLLT Logic Gates Slide ‹19› of 25


Working out the function of a combination
of gates

D = NOT (A OR B)
E = B AND C
Q = D OR E = (NOT (A OR B)) OR (B AND C)

CT073-2-3 and CSLLT Logic Gates Slide ‹20› of 25


EXERCISES

CT073-2-3 and CSLLT Logic Gates Slide ‹21› of 25


Quick Review Question

CT073-2-3 and CSLLT Logic Gates Slide ‹22› of 25


Summary of Main Teaching Points
• The circuitry in a computer is made up of a combinatorial
and sequential logic.

• Computer logic based on the rules of Boolean algebra,


as implemented with logic gates.

• Sequential logic uses gates to provide memory

CT073-2-3 and CSLLT Logic Gates Slide (23› of 25


Question and Answer Session

Q&A

CT073-2-3 and CSLLT Logic Gates Slide ‹24› of 25


What we will cover next

Little Man Computer (LMC)

CT073-2-3 and CSLLT Logic Gates Slide ‹25› of 25

Potrebbero piacerti anche