0% found this document useful (0 votes)
6 views

DigitalFundamentals 4

Uploaded by

DOOAMADAA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

DigitalFundamentals 4

Uploaded by

DOOAMADAA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Electrical Engineering 1

Lecture 4: Building Logic Circuits


Lecture 4
· Types of logic system
· The algebra of logic systems
· Basic logic gates and operations
· Truth tables
· Algebraic representation of logic gates
Theoretical basis: logic theory
· Many ancient cultures (e.g. ancient Greeks) were
interested in logic, proceeding from rules to formulate
conclusions, e.g.
 General rule:
 If it is raining then there are clouds in the sky

 Particular observation:
 Today there are no clouds in the sky

 What can I conclude?


 It cannot be raining today

· Methods were based on diagrams and human language


arguments
Boolean Logic
· In 19th century, mathematician George Boole wanted a
mathematical foundation for logic:
 Boolean algebra
 Deals with propositions that are true or false

· In 1930s engineer Claude Shannon realised a version


of Boolean algebra could be used for analysis and
design of switching circuits and digital computers
 Deals with switches that are on or off
 Voltages that are high or low
 Binary digits that are 1 or 0

· That’s why digital electronic systems are often called


“logic systems”
Types of logic system
· Combinational logic
 The output depends only on the input at that moment
 Example light switch

Off On

Input Output Input Output

· Sequential logic
 Output depends on input and also the current/past state
 Example pull-cord light

If input=1 and present output=0


then new output=1
else if input=1 and present output=1
then new output=0
Input Output
Types of logic system
· Combinational logic
 The output depends only on the input at that moment
 Example light switch

Off On

Input Output Input Output

· This week we are looking at combinational logic


· The skills that we will need to develop:
Circuit analysis
 We look at a circuit and figure out what it would do

 Circuit synthesis
 We are given a required behaviour, and design a circuit to do it

· This week we are looking at circuit analysis


Logic gates
· Operate on signals that have values 1 or 0
· We’ll start with simple example:
· Alarm system
 Switches detect whether alarm is enabled/disabled
 Windows are open/closed
 Logic gates operate on switch outputs to make a
decision: sound alarm/don’t sound alarm
· As we go through example, we’ll start to examine
algebraic representations that will help us do complex
designs
The AND gate
· The AND gate outputs a 1 if all its inputs are 1
A
C
B
A B C
0 0 0 Truth table
0 1 0 Shows every possible input condition
1 0 0 and resulting output condition
1 1 1
· Say the inputs have these meanings
A.the window is open
B. the alarm is enabled
Then C represents the condition
C. The window is open AND the alarm is enabled
The AND gate
· The AND gate outputs a 1 if all its inputs are 1
A
C
B
A B C Example
0 0 0 Suppose input condition is A=0, B=1
0 1 0 Read output value from truth table
1 0 0 C = A.B = 0.1 = 0
1 1 1
· Boolean algebra representation:

C=A.B
· AND operation is sometimes referred to as logical product
The OR gate
· The OR gate outputs a 1 if any input is 1
A
C
B
A B C
0 0 0
0 1 1
1 0 1
1 1 1
· Say the inputs have these meanings
A. the upstairs window is open
B. the downstairs window is open
· Then C represents the condition
C. The upstairs window is open OR the downstairs window is open
The OR gate
· The OR gate outputs a 1 if any input is 1
A
C
B
A B C Example
0 0 0 Suppose input condition is A=0, B=1
0 1 1 Read output value from truth table
1 0 1
C = A+B = 0+1 = 1
1 1 1
· Boolean algebra representation:

C=A+B
· OR operation is sometimes referred to as logical sum
Inclusive OR and exclusive OR
· In the English language OR can have two meanings
· Inclusive OR:

“See a doctor if you have vomiting or you have diarrhoea”
 If the vomiting=1 and diarrhoea =1 then see doctor=1

· Exclusive OR:
 “You can have a side of chips or salad with your burger”
 If chips=1 and salad=1 then allowed=0

· The OR gate represents the inclusive OR

A B C A B C
A
C 0 0 0 0 0 0
B 0 1 1 0 1 1
1 0 1 1 0 1
Inclusive OR Exclusive OR
1 1 1 1 1 0
The Inverter (NOT gate)
· The inverter outputs the opposite logic value of its input:

A B
Algebraic representation:
A B B=A
0 1
1 0

· Say the input has the meaning


A. the window is closed
· Then B represents the condition
B. the window is NOT closed
Putting it all together
· Now we’ll build our simple alarm system
· Our inputs are switches:
A.the alarm is enabled
B. the upstairs window is closed
C. the downstairs window is closed
· The alarm should be sounded if A AND ((NOT B) OR (NOT C))
We’ll call this condition D

A A
D
B D B
C
C

· In this example, the circuit is intuitively obvious


· In future we’ll look at a systematic method that works when the
solution is not intuitive
Shorthand notation for inversion
· The inversion operation can be shortened to just a circle
“inversion bubble”
· These are the same:

A
D
B

A
D
B

C
Summary
· Combinational logic circuits have an output value that is
determined only by values at the inputs
· The AND, OR and NOT operations are sufficient to build
any combinational logic circuit
· Boolean algebra provides an algebraic representation of
logic gates

You might also like