0% found this document useful (0 votes)
61 views60 pages

ELL 100 Introduction To Electrical Engineering: Ecture

The document discusses digital logic circuits and logic gates. It introduces boolean logic and defines logic variables that can have values of 0 or 1. It then explains common logic gates - OR, AND, NOT, XOR - through truth tables and circuit diagrams. These basic logic gates are the building blocks used to construct more complex digital circuits and systems like microprocessors, memory, and data transmission networks.

Uploaded by

Aishwarya Mahale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views60 pages

ELL 100 Introduction To Electrical Engineering: Ecture

The document discusses digital logic circuits and logic gates. It introduces boolean logic and defines logic variables that can have values of 0 or 1. It then explains common logic gates - OR, AND, NOT, XOR - through truth tables and circuit diagrams. These basic logic gates are the building blocks used to construct more complex digital circuits and systems like microprocessors, memory, and data transmission networks.

Uploaded by

Aishwarya Mahale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

ELL 100 - Introduction to Electrical Engineering

LECTURE 29: DIGITAL CIRCUITS

INTRODUCTION TO LOGIC
Outline
 Introduction to Logic
 Logic Gates
 OR
 AND
 NOT
 EX-OR/XOR
 NOR
 NAND
 Universal Gates
 Solved Examples and Exercises
2
APPLICATIONS OF LOGIC GATES

Random Access
Microprocessors Memory (RAM)
Flash Memories

Digital Data
Transmission
and Internet
3
INTRODUCTION TO LOGIC
• Digital logic circuits use predefined voltage levels to represent
the binary states e.g. ‘1’ is represented by high, say 5 V and
‘0’ is represented by low, say 0 V.
• As long as the variation in the voltage levels is not sufficient to
change the binary state, the transmitted information is
preserved (more immune to noise than analog representation).
• A logic circuit is one that behaves like a voltage-controlled
switch, i.e. a two-position device with ON and OFF states
• This is termed a binary device, in which the ON state is
represented by ‘1’ and the OFF state by ‘0’
4
BOOLEAN LOGIC
• Named after English mathematician George Boole (1815 – 1864)
• Boolean algebra uses symbols to represent a logical expression that has
one of two possible values: True/False (1/0; ON/OFF; High/Low)
• The main purpose of these logical expressions is to describe the
relationship between a logic circuit’s output (the decision) and its
inputs (the circumstances), both of which are binary values.
• Boolean constants and variables are allowed to have only two possible
values, 0 or 1
• A Boolean variable is a quantity that may, at different times, be equal
to either 0 or 1
5
BOOLEAN LOGIC
• Boolean 0 and 1 do not represent actual numbers but instead represent
the state of a voltage variable, or what is called its “logic level”
• A voltage in a digital circuit is said to be at the logic 0 level or the logic
1 level, depending on its actual numerical value (e.g. low or high)
• The inputs are considered logic variables whose logic levels at any
time determine the output levels
• We use letter symbols to represent logic variables. For example, the
letter A might represent a certain digital circuit input or output, and at
any time either A = 0 or A = 1
6
LOGIC GATES
• Logic gates are the most basic logic circuits
• These are the fundamental building blocks from which all other
logic circuits and digital systems are constructed
• In Boolean algebra there are only three basic operations:
OR, AND, and NOT, called logic operations
• Logic gates can be constructed from diodes, transistors, and
resistors connected so that the circuit output is the result of a basic
logic operation (OR, AND, NOT) performed on the inputs.

7
“OR” LOGIC GATE
• Two logic inputs, A and B, are combined using the OR operation (denoted
by ‘+’ symbol) to produce the output x (x, A, B are bits).
• A truth table is a means for describing how a logic circuit’s output
depends on the logic levels present at the circuit’s inputs

Truth Table Circuit Symbol


8
“OR” LOGIC GATE
• Example: The bus will go to A or B. The success (truth) of the bus
going to one or other can be represented by x; thus ‘x’ occurs when the
bus goes to either A or B or both (it might travel through A to get to B
or vice versa)
• The Boolean expression for the OR operation is x = A + B
• The positive (+) sign is not the additive function,
but means OR in logic
x = A OR B

9
“OR” LOGIC GATE
• In an electrical circuit, OR operation is equivalent to
two switches in parallel
• The lamp F lights (F = 1) when either switch or both switches are
closed (closed switch is represented by logic level 1)
i.e. F = A + B

10
“OR” LOGIC GATE
• If no (zero) voltage (logic level 0) is applied to both inputs then the output
voltage Vo is also zero (logic level 0) (both diodes are reverse biased i.e.
open circuit)
• If, however, a positive voltage of, say, 5 V (logic level 1) is applied to
either one or both inputs then at least one diode turns on (forward biased),
and the output voltage is also ~5 V

Diode-based OR-gate circuit

11
“OR” LOGIC GATE
If no (zero) voltage (logic level 0) is
applied to both inputs A and B then
the output voltage Vo is also zero
(logic level 0) (both transistors are
in cutoff i.e. open circuit)

If, however, a positive voltage of,


say, 5 V (logic level 1) is applied to
either one or both inputs then at OR-gate circuit
least one transistor turns on using BJT’s
(saturation mode), and the output
voltage C is also ~5 V (logic level 1) 12
“OR” LOGIC GATE
For three inputs, the OR-gate circuit symbol, and corresponding truth table
is given below. The Boolean expression is x = A + B + C

13
“AND” LOGIC GATE
• Two logic inputs, A and B, are combined using the AND operation
(denoted by ‘.’ symbol) to produce the output x (x, A, B are bits)
• The table shows that x is a logic 1 only when both A and B are at logic 1

Truth Table Circuit Symbol 14


“AND” LOGIC GATE
• Example: The bus goes to A and B. The success (truth) of the bus going
to both places can be represented by x; thus ‘x’ occurs only when the bus
goes to both A and B

• The Boolean expression for the AND operation is F = A . B


• The period (.) sign is not the multiplicative function,
but means AND in logic
F = A AND B

15
“AND” LOGIC GATE
• In an electric circuit, AND operation is equivalent to
two switches in series
• The lamp F lights (i.e. F = 1) only when both switches are closed
(closed switch is represented by logic level 1)
i.e. F = A . B

16
“AND” LOGIC GATE
• If zero voltage (logic level 0) is applied to either A or B or both, then that
respective diode(s) is forward-biased (i.e. short-circuit), resulting in the
output voltage becoming zero (logic level 0).
• If 10 V (logic level 1) is applied to both A and B then the both diodes are
reverse-biased (i.e. open-circuit) and the output voltage rises to the 10 V
(logic level 1) supply.

Diode-based
AND-gate circuit
17
“AND” LOGIC GATE
If no (zero) voltage (logic level 0) is applied
to either input A or B or both, then the output
voltage Vo is also zero (logic level 0) (at least
one transistor is in cutoff i.e. open circuit so
no current flows)

If, however, a positive voltage of, say, 5 V


AND-gate (logic level 1) is applied to both inputs then
circuit both transistors turn on (saturation mode),
using and the output voltage C is also ~5 V (logic
BJT’s level 1)
18
“AND” LOGIC GATE
For three inputs, the AND-gate circuit symbol and the truth table is
given below. The Boolean expression is x = A . B . C

19
“NOT” LOGIC GATE
• The NOT operation is unlike the OR and AND operations because it is
performed on a single input variable
• If the variable A is subjected to the NOT operation (also called inversion
or complementation), the result x is expressed as x = Ā or x = A’

Truth Table Circuit Symbol

20
“EX-OR/XOR” LOGIC GATE
• Two logic inputs, A and B, are combined using the Exclusive-OR
(EX-OR or simply XOR) operation (denoted by symbol ⊕ ) to produce
the output F
• The truth table shows that F is a logic 1 only when A and B are different

Truth
Table
A
F  A B
B
Circuit Symbol 21
“EX-OR/XOR” LOGIC GATE
• Example: The bus goes to either A or B but not to both. The success
(truth) of the bus going to one or other can be represented by F; thus ‘F’
occurs when the bus goes only to A (and not B) or only to B (and not A)
• The Boolean expression for the EX-OR operation is
F = A ⊕ B = (A . 𝐁) + (𝐀 . B)
(in terms of the fundamental gates
OR, AND, NOT)

22
“EX-OR/XOR” LOGIC GATE
• The XOR operator is typically represented in an electric circuit by the
two-way switching associated with a stair light
• The lamp F lights (i.e. F = 1) only when one of the switches is ON (1)
AND the other is OFF (0) i.e. F = A ⊕ B = (A . 𝐁) + (𝐀 . B)
1

23
“NOR” LOGIC GATE
• NOR gate operates like an OR-gate followed by an Inverter (NOT gate)
• The NOR-gate output (x = 𝐀 + 𝐁) is the exact inverse of the OR-gate
output
Truth Table

Circuit Symbol

Equivalent Circuit

24
“NAND” LOGIC GATE
• NAND-gate operates like an AND-gate followed by an Inverter (NOT gate)
• The NAND-gate output (x = 𝐀. 𝐁) is the exact inverse of the AND-gate

Truth Table

Circuit Symbol

Equivalent Circuit

25
OPERATOR PRECEDENCE
• If an expression contains both AND and OR operations, the
AND operations are performed first, unless there are parentheses
in the expression, in which case the operation inside the
parentheses is to be performed first

• Example: F = A . B + C
First AND operation is performed between A and B
The result of above operation is then ORed with C

26
UNIVERSAL GATES: NAND/NOR
• All Boolean expressions consist of various combinations of the basic
operations of OR, AND, and NOT (or INVERT).
• Any expression can be implemented using combinations of OR gates, AND
gates, and INVERTERs (NOT gates).
• NAND and NOR gates, in the proper combination, can be used to perform
each of the Boolean operations OR, AND, and INVERT (NOT)
• Thus, it is possible to implement any logic expression using only
NAND or only NOR gates and no other type of gate
• Thus, NAND and NOR gates are called “universal gates”
• Easier/simpler to standardize by using a single type of gate. However, the
number of gates that need to be used increases. 27
NOT OPERATION USING NAND GATE

28
AND OPERATION USING NAND GATES

Two NAND gates are required to perform the operation of one AND gate

29
OR OPERATION USING NAND GATES
Three NAND gates are required to perform the operation of one OR gate

30
NOT OPERATION USING NOR GATE

31
AND OPERATION USING NOR GATES
Three NOR gates are required to perform the operation of one AND gate

32
OR OPERATION USING NOR GATES

Two NOR gates are required to perform the operation of one OR gate

33
SOLVED EXAMPLES

1. Write the Boolean expression for a 3-input NAND gate.


Sol. The output Y of the NAND gate with inputs A, B, and C is Y  A.B.C

2. Which logic gate generates a HIGH output when an odd number of


inputs are HIGH?
Sol. Exclusive-OR gate (EX-OR/XOR Gate)

34
SOLVED EXAMPLES
3. For the given input signals A, B, C, sketch the output for an OR gate.

Sol.

The output X = A + B + C is high when any of the inputs is high. 35


SOLVED EXAMPLES
4. How many different sets of input conditions will produce a HIGH
output from a five-input OR gate?
Sol. The total number of sets of input conditions are 25 = 32. The output is
low only when all the inputs are low. This happens in only one case.
Therefore, 31 different sets of input conditions will produce a HIGH output.

5. Write the Boolean expression for a 4-input XOR gate.


Sol. The output Y of the XOR gate with inputs A, B, C and D is
Y  A B C  D
36
SOLVED EXAMPLES
6. For the given expression, draw the corresponding logic circuit, using
AND, OR and NOT gates.
x  A.B (C  D )

Sol.

37
SOLVED EXAMPLES
7. For the given expression, draw the corresponding logic circuit, using
AND, OR and NOT gates.
z  A  B  CDE  BC D

Sol.

38
SOLVED EXAMPLES
8. Apply the input waveforms A, B and C given below to a NOR gate,
and draw the output waveform.

Sol. The output waveform


39
EXERCISES
1. Draw a logic circuit, incorporating any gates of your choice, which
will produce an output 1 when its two inputs are different. Also draw
the same logic circuit incorporating only NOR gates.

40
EXERCISES
1. Draw a logic circuit, incorporating any gates of your choice, which
will produce an output 1 when its two inputs are different. Also draw
the same logic circuit incorporating only NOR gates.

Ans. The required function is F = A ⊕ B = (A . 𝐁) + (𝐀 . B)

A
F  A B
B

41
EXERCISES
Circuit for F = A ⊕ B = (A . 𝐁) + (𝐀 . B) using only NOR gates
(gates with single input imply that both inputs are same)

42
EXERCISES
2. Draw the circuit diagram to implement the expression below
x  ( A  B)( B  C )

43
EXERCISES
2. Draw the circuit diagram to implement the expression below
x  ( A  B)( B  C )

Ans.

44
EXERCISES
3. Determine the output waveform for an OR gate output with inputs
A and B varying according to the timing diagrams shown below

45
EXERCISES
Ans.

A+B

46
EXERCISES
4. Determine the output waveform for an AND gate with inputs A and B
varying according to the timing diagrams shown below

47
EXERCISES
Ans.

A.B

48
EXERCISES
5. Determine the output waveform for an AND gate with inputs A and B
varying according to the timing diagrams shown below

Ans. The output A.B

49
EXERCISES
5. Determine the output waveform for an AND gate with inputs A and B
varying according to the timing diagrams shown below

Ans. The output A.B

50
EXERCISES
6. Draw the circuit diagram to implement the expression
x  AC  BC  ABC

51
EXERCISES
6. Draw the circuit diagram to implement the expression
x  AC  BC  ABC
Ans.

52
EXERCISES
7. Draw the circuit diagram to implement the expression below, using
gates with no more than three inputs
x  ABC ( A  D )

53
EXERCISES
7. Draw the circuit diagram to implement the expression below, using
gates with no more than three inputs
x  ABC ( A  D )

Ans.

54
EXERCISES
8. Determine the waveform at the output of a NOR gate for the input
waveforms shown below

55
EXERCISES
Ans.

A + B

56
EXERCISES
9. Determine the waveform at the output of a NAND gate for the input
waveforms shown below

57
EXERCISES

Ans.

A .B

58
EXERCISES
10. Implement the logic circuit for the expression below using only NOR
and NAND gates
x  AB.(C  D)

59
EXERCISES
10. Implement the logic circuit for the expression below using only NOR
and NAND gates
x  AB.(C  D)

Ans.

60

You might also like