You are on page 1of 23

Combinational Logic

Circuits – Gates
Lecture 4

1
outline
 Binary Logic and Gates
 Basic Gates
 Implemented Gates

 Material from section 2-1 of text

2
Basic Gates
 Gates are the base level elements of digital
systems.
 Gates are used to implement Boolean Logic
functions.
 Will start with one level circuits or just a
single gate.
 Then move on to two or more levels of logic
circuits.
3
Logic gates implementation
 Logic gates, having two distinct and stable
states, high and low, are implemented today
using interconnected MOS transistors (most
common).
 Today CMOS – Complementary Metal Oxide
Semiconductor – technology is most common.
 Have had a steady progression of technology
used for the implementation of digital circuits.
4
Past technologies
 RTL – Resistor Transistor Logic –
implemented with resistors and bipolar
transistors
 TTL – Transistor Transistor Logic –
implemented with bipolar transistors
 NMOS – n-type MOS transistors –
implemented with one transistor configured as
a MOS resistor – similar in philosophy to
RTL
5
Basic Functions
 AND
 Represented by a dot (·) or the absence of an
operator.
 May be written
 Z = X AND Y
 z = x AND y
 Z=X·Y
 Z = XY
 Meaning: Result is TRUE if, and only if, both X and
Y are TRUE
6
AND - switches in Series
Switches in Series
If several on-off switches are connected in
series they must all be closed (on) to
complete the circuit .The diagram shows a
simple circuit with two switches connected in
series to control a lamp .
Switch S1 AND Switch S2 must be closed to
light the lamp .
AND gate

The output Q is true if input A AND input B


are both true: Q = A AND B
An AND gate can have two or more inputs, its
output is true if all inputs are true.

50
Basic Functions
 NOT
 Represented by a bar ¯ over the symbol or the
word NOT
 Examples
 Z = NOT X
 Meaning: True if X is False False if X is True

9
Truth table and gate symbols
 NOT

10
NOT gate (Inverter)
The output Q is true when the input A is NOT
true, the output is the inverse of the input :
Q=NOT A
A NOT gate can only have one input. A NOT
gate is also called an inverter .

51
Basic Functions
 OR
 Represented by the + operator symbol
 Examples
 Z = X OR Y
 Z = x OR Y
 Z=X+Y
 Meaning: Result is TRUE if at least one of X and
Y, or both, are TRUE.

12
Switches in Parallel

If several on-off switches are connected in


parallel only one needs to be closed (on) to
complete the circuit. The diagram shows a
simple circuit with two switches connected in
parallel to control a lamp.
Switch S1 OR Switch S2 (or both of them)
must be closed to light the lamp.
OR gate

The output Q is true if input A OR input B is


true (or both of them are true :(Q = A OR B
An OR gate can have two or more inputs, its
output is true if at least one input is true

52
NAND gate (NAND=NOT AND)

This is an AND gate with the output inverted,


as shown by the 'o' on the output .
The output is true if input A AND input B are
NOT both true :Q = NOT (A AND B )
A NAND gate can have two or more inputs,
its output is true if NOT all inputs are true .

53
NOR gate (NOR=NOT OR)
This is an OR gate with the output inverted,
as shown by the 'o' on the output .
The output Q is true if NOT inputs A OR B are
true :Q = NOT (A OR B )
A NOR gate can have two or more inputs, its
output is true if no inputs are true .

54
EX-OR =XOR gate= Exclusive OR

The output Q is true if either input A is true


OR input B is true ,but not when both of
them are true :
Q=(A AND NOT B) OR (B AND NOT A )
This is like an OR gate but excluding both
inputs being true .
The output is true if inputs A and B are
DIFFERENT .
EX-OR gates can only have 2 inputs .

55
Truth table for  (Exclusive OR)

p q pq
1 1 0

1 0 1

0 1 1

0 0 0
(EX-NOR) EXclusive-NOR gate

This is an EX-OR gate with the output


inverted, as shown by the 'o' on the output .
The output Q is true if inputs A and B are the
SAME) both true or both false :(
Q=(A AND B) OR (NOT A AND NOT B )
EX-NOR gates can only have 2 inputs.

57
Summary truth tables
The summary truth tables below show the
output states for all types of 2-input and 3-
input gates

58
Truth table and gate symbols
 AND function OR function

21
But gates are electronic elements
 And have
voltages over
time that are
interpreted as
logic values over
time

22
Basic gates with more than 2 inputs
 It is often the case that we have 3 input AND
gates or 3 inputs OR gates.
 Sometimes, even have 4 input gates.
 Some logic equations have many terms
ANDed together. In MOS these many input
gates are not readily feasible. Therefore, use
multiple levels of logic.

23

You might also like