Uploaded by tawsif kadir

Boolean Algebra, Digital Logic CSE231.4 Lec1

advertisement
Boolean ALGEBRA
• Postulates and theorems of Boolean algebra:
Boolean ALGEBRA
• Using the basic theorems and postulates of Boolean algebra, simplify the following Boolean expression:
1.
2.
3.
4.
5.
๐น = ๐‘ฅ ′ ๐‘ฆ ′ ๐‘ง + ๐‘ฅ๐‘ฆ๐‘ง + ๐‘ฅ ′ ๐‘ฆ๐‘ง + ๐‘ฅ๐‘ฆ ′ ๐‘ง
๐น = ๐‘ฅ (๐‘ฅ ′ + ๐‘ฆ)
๐น = (๐‘ฅ + ๐‘ฆ)(๐‘ฅ + ๐‘ฆ ′ )
๐น = ๐‘ฅ๐‘ฆ + ๐‘ฅ ′ ๐‘ง + ๐‘ฆ๐‘ง
๐น = (๐‘ฅ + ๐‘ฆ)(๐‘ฅ ′ + ๐‘ง)(๐‘ฆ + ๐‘ง)
Boolean ALGEBRA
• Using the basic theorems and postulates of Boolean algebra, simplify the following Boolean expression:
1.
2.
3.
4.
5.
๐น = ๐‘ฅ ′ ๐‘ฆ ′ ๐‘ง + ๐‘ฅ๐‘ฆ๐‘ง + ๐‘ฅ ′ ๐‘ฆ๐‘ง + ๐‘ฅ๐‘ฆ ′ ๐‘ง
๐น = ๐‘ฅ (๐‘ฅ ′ + ๐‘ฆ)
๐น = (๐‘ฅ + ๐‘ฆ)(๐‘ฅ + ๐‘ฆ ′ )
๐น = ๐‘ฅ๐‘ฆ + ๐‘ฅ ′ ๐‘ง + ๐‘ฆ๐‘ง
๐น = (๐‘ฅ + ๐‘ฆ)(๐‘ฅ ′ + ๐‘ง)(๐‘ฆ + ๐‘ง)
Boolean ALGEBRA
• Develop a truth table for the Boolean expression:
๐น = ๐‘ฅ ′๐‘ฆ′ ๐‘ง
DIGITAL LOGIC GATE
• Logic gates:
• Logic gates are electronic circuits that operate on one or
more physical input signals to produce an output signal.
• Electrical signals such as voltages or currents exist as
analog signals having values over a given continuous
range, say, 0–3 V, but in a digital system these voltages
are interpreted to be either of two recognizable values, 0
or 1.
• Voltage-operated logic circuits respond to two separate
voltage levels that represent a binary variable equal to
logic 1 or logic 0.
• The simplest binary element is a switch that has two
states. If a given switch is controlled by an input variable
x, then we will say that the switch is open if x = 0 and
closed if x = 1.
DIGITAL LOGIC GATE
• OR gates:
• The OR operation is the first of the three basic Boolean
operations to be learned.
• An example can be found in the kitchen oven. The light
inside the oven should turn on if either the oven light
switch is on OR if the door is opened. The letter A could be
used to represent the oven light switch is on (true or false)
and B could represent door is opened (true or false). The
letter x could represent the light is on (true or false).
• The Boolean expression for the OR operation is, ๐‘ฅ = ๐ด + ๐ต
A
B
DIGITAL LOGIC GATE
• OR gates (continued):
• If a OR logic gate has n inputs, the output (y) can be expressed as,
๐’š = ๐’™๐Ÿ + ๐’™๐Ÿ + ๐’™๐Ÿ‘ + โ‹ฏ + ๐’™๐’
• For OR gate if one input is logical 1, the output is 1.
• Determine the OR gate output :
DIGITAL LOGIC GATE
• AND gates:
• The AND operation is the second basic Boolean operation.
• As an example of the use of AND logic, consider a typical
clothes dryer. It is drying clothes (heating, tumbling) only if
the timer is set above zero AND the door is closed. Let’s
assign x1 to represent timer is set (T/F), x2 to represent door
is closed (T/F), and x can represent the heater and motor
are on (T/F).
• The Boolean expression for the AND operation is, ๐‘ฅ = ๐ด โˆ™ ๐ต .
In this expression, the “ . ” sign stands for the Boolean AND
operation and not the multiplication operation.
H&M
DIGITAL LOGIC GATE
• AND gates (continued):
• If a OR logic gate has n inputs, the output (y) can be expressed as,
๐’š = ๐’™๐Ÿ โˆ™ ๐’™๐Ÿ โˆ™ ๐’™๐Ÿ‘ … ๐’™ ๐’
• For AND gate if one input is logical 0, the output is 0.
• Determine the AND gate output :
DIGITAL LOGIC GATE
• NOT gates:
• The NOT operation is unlike the OR and AND operations
because it can be performed on a single input variable.
• For example, if the variable A is subjected to the NOT
าง
operation, the result x can be expressed as ๐‘ฅ = ๐ด.where
the
overbar represents the NOT operation. This expression is
read as “x equals NOT A” or “x equals the inverse of A” or “x
equals the complement of A.” Each of these is in common
usage, and all indicate that the logic value of ๐‘ฅ = ๐ดาง is
opposite to the logic value of A.
DIGITAL LOGIC GATE
• Boolean Theorem:
UNIVERSAL LOGIC GATE
• NOR gates:
• It is the same as the OR gate symbol except that it has a
small circle on the output.
• The small circle represents the inversion operation. Thus,
the NOR gate operates like an OR gate followed by an
INVERTER.
• The output expression for the NOR gate is ๐‘ฅ = ๐ด + ๐ต (for
two input).
• If a NOR logic gate has n inputs, the output (y) can be
expressed as,
y = (๐’™๐Ÿ +๐’™๐Ÿ + ๐’™๐Ÿ‘ + โ‹ฏ + ๐’™๐’ )
• For any NOR gate if all inputs are logical 0, the output is
1.
UNIVERSAL LOGIC GATE
• NOR gates:
• Determine the waveform at the output of a NOR gate
for the input waveforms
UNIVERSAL LOGIC GATE
• NAND gates:
• It is the same as the AND gate symbol except that it has a
small circle on the output.
• The small circle represents the inversion operation. Thus,
the NAND gate operates like an AND gate followed by an
INVERTER.
• The output expression for the NAND gate is ๐‘ฅ = ๐ด โˆ™ ๐ต (for
two input).
• If a NAND logic gate has n inputs, the output (y) can be
expressed as,
y = (๐’™๐Ÿ โˆ™ ๐’™๐Ÿ โˆ™ ๐’™๐Ÿ‘ … ๐’™๐’ )
• For any NAND gate if any input is logical 0, the output is
1.
UNIVERSAL LOGIC GATE
• NAND gates:
• Determine the waveform at the output of a NAND gate
for the input waveforms
UNIVERSAL LOGIC GATE
• Application of NOR and NAND gates:
•
Power is applied to the circuit only when the ‘geardown’
switch is activated.
•
One NOR gate operates as a negative-AND to detect a
LOW from each of the three landing gear sensors. When
all three of the gate inputs are LOW, the three landing
gears are properly extended and the resulting HIGH
output from the negative-AND gate turns on the green
LED display.
•
The other NOR gate operates as a NOR to detect if one or
more of the landing gears remain retracted when the
‘gear down’ switch is activated. When one or more of the
landing gears remain retracted, the resulting HIGH from
the sensor is detected by the NOR gate, which produces
a LOW output to turn on red LED warning display.
LOGIC GATE
• Implementation of Boolean function with digital logic gates:
1.
2.
3.
4.
5.
๐น
๐น
๐น
๐น
๐น
= ๐‘ฅ ๐‘ฆ ′ + ๐‘ง (๐‘ฅ ′ + ๐‘ฆ + ๐‘ง ′ )
= ๐ด๐ต + ๐ถ ๐ท + ๐ธ
= ๐ด + ๐ต′ ๐ถ + ๐ด๐ท
= ๐ต๐ถ ′ + ๐ด๐ต + ๐ด๐ถ๐ท
= ๐‘ฅ ′ ๐‘ฆ + ๐‘ฅ๐‘ง
LOGIC GATE
• Implementation of Boolean function with digital logic gates:
1.
2.
3.
4.
5.
๐น
๐น
๐น
๐น
๐น
= ๐‘ฅ ๐‘ฆ ′ + ๐‘ง (๐‘ฅ ′ + ๐‘ฆ + ๐‘ง ′ )
= ๐ด๐ต + ๐ถ ๐ท + ๐ธ
= ๐ด + ๐ต′ ๐ถ + ๐ด๐ท
= ๐ต๐ถ ′ + ๐ด๐ต + ๐ด๐ถ๐ท
= ๐‘ฅ ′ ๐‘ฆ + ๐‘ฅ๐‘ง
LOGIC GATE
• Implementation of Boolean function with digital logic gates:
1. ๐น = ๐ด๐ต′ ๐ท + ๐ด๐ต′ ๐ท ′
2. ๐‘ง = (๐ด′ + ๐ต)(๐ด + ๐ต)
3. ๐‘ฅ = ๐ด๐ถ๐ท + ๐ด′ ๐ต๐ถ๐ท
LOGIC GATE
• Implementation of Truth table with digital logic gates:
LOGIC GATE
• Universality of NOR gate:
LOGIC GATE
• Universality of NAND gate:
LOGIC GATE
• Implement the following circuit using NAND and NOR gates only:
LOGIC GATE
• Write the Boolean equations and draw the logic diagram of the circuit whose outputs are
defined by the following truth table using NAND and NOR gates only:
LOGIC GATE
• Exclusive-OR (XOR) gate:
• Consider the logic circuit whose output expression is
x = A′ B + AB′ . This circuit produces a high output
whenever the two inputs are at opposite levels.
• This is the exclusive-Or circuit, which will hereafter
be abbreviated XOR and can be expressed as,
x = A′ B + AB ′ = ๐ด ⊕ ๐ต
• An XOR gate has only two inputs; there are no threeinput or four-input XOR gates.
LOGIC GATE
• Exclusive-NOR (XNOR) gate:
•
The exclusive-NOR circuit (abbreviated XNOR) operates
completely opposite to the XOR circuit. The output
expression is ๐‘ฅ = ๐ด๐ต + ๐ด′ ๐ต′
•
A shorthand way to indicate the output expression of the
XNOR is
๐‘ฅ = ๐ด โŠ™ ๐ต = ๐ด โจ๐ต
•
Very often, a logic designer will obtain the XNOR function
simply by connecting the output of an XOR to an
INVERTER.
EXAMPLE
LOGIC GATE
• Draw the output:
EXAMPLE
Download