_Digital_Electronics_II.pdf circuits and circuit diagrams

Clarence86 21 views 31 slides Sep 18, 2024
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

Logic gates pdf notes


Slide Content

Digital Electronics
NOR and NAND as Universal Gates
NOR and NAND gates are called "universal gates"
because they can be combined to form any other
kind of logic gate.

We start with the NOR Gate

A NOR gate is logically an inverted OR gate.

Digital Electronics
NOR AS NOT
This is made by joining the inputs of a NOR gate. As a NOR
gate is equivalent to an OR gate followed by a NOT gate,
this automatically sees to the "OR" part of the NOR gate,
eliminating it from consideration and leaving only the NOT
part.
Proof: ??????=�+�
But �+�=�
⟹??????=�

Digital Electronics
NOR AS OR
The OR gate is simply a NOR gate followed by a NOT gate.
Proof: Obtain the output function ??????
(You learnt this earlier) and prove it!!
Method 1: Let’s use Boolean Algebra.
??????=�+�+�+�
=�+� �??????����+�+�+�
=�+�
⟹??????=�+�(������ ??????�����??????��)

Digital Electronics
Method 2:Using Truth Table
� � �+� �+� �+�+�+� ??????
0 0 0 1 1 0
0 1 1 0 0 1
1 0 1 0 0 1
1 1 1 0 0 1
You can provide proofs for the remaining NOR
constructions similarly.

Digital Electronics
NOR AS AND
An AND gate gives a 1 output when both inputs are 1; a NOR gate
gives a 1 output only when both inputs are 0. Therefore, an AND
gate is made by inverting the inputs to a NOR gate.

Digital Electronics
NOR AS NAND
A NAND gate is made using an AND gate in series with a
NOT gate.

Digital Electronics
NOR AS XOR
An XOR gate is made by connecting the output of three NOR gates
(connected as an AND gate) and the output of a NOR gate to the
respective inputs
of a NOR gate.

Digital Electronics
NOR AS XNOR
An XNOR gate is made using an XOR gate in series with a NOT gate.
Alternatively, an XNOR gate can be constructed
from four NOR
gates as shown.

Digital Electronics
We move on to the NAND Gate

Digital Electronics

Digital Electronics

Digital Electronics

Digital Electronics

Digital Electronics

Digital Electronics
Binary Addition
Half Adders and Full Adders
We are going to construct combinational
logic circuits that perform binary addition.
First let’s define the terms bit and byte. A bit
is a single numeric value, either 1 or 0, which
stands for a single unit of digital information.
On the other hand, a byte is a sequence or
group of bits, in general eight bits stand for
one byte.

Digital Electronics
First, let’s consider adding two 3-bit numbers.
1 1 0
+ 0 1 1
-----------
We add numbers right to left. We start at the
rightmost column (the least significant bit) and
work our way to the left.

Digital Electronics
1 1 0
+ 0 1 1
-----------
1
As we add, we may need to carry. We add 0 to 1. What
should we carry? You might answer "Nothing".
Technically, you don't have to carry anything. However,
hardware isn't that simple. In general, once you decide
there is an output (such as carry), you need to generate
that output all the time. Thus, we need to find a
reasonable carry, even when there's "no need" to carry.

Digital Electronics
In this case, a reasonable carry is to carry a 0, into the next
column, and then add that column.
0
1 1 0
+ 0 1 1
-----------
0 1
This time, when we add the middle column, we get 0 + 1 +1 which
sums to 0, with a carry of 1.
1 0
1 1 0
+ 0 1 1
-----------
(1) 0 0 1

Digital Electronics
Typically, when we perform an addition
of two k-bit numbers, we expect the
answer to be k-bits. If the numbers are
represented in unsigned binary (UB),
the result can be k+1 bits. To handle that
case, we have a carry bit (the one
written in parentheses).

Digital Electronics
Half Adders
As you look at how numbers are added, it seems that they
are added column by column. While we might create an
addition circuit which adds two 3-bit values at once, it
might not allow us to generalize to adding two k-bit
values. It makes some sense to design a circuit that adds
in "columns". To begin, let's consider adding the rightmost
column. We're adding two bits. So, the adder we want to
create should have two inputs bits. It generates a sum bit
for that column, plus a carry. So there should be two bits
of output. This device is called a half-adder. Its
characteristics are as follows:

Digital Electronics
Data inputs: 2 (call them A and B)
Outputs: 2 (call them S, for Sum, and C, for Carry)
Here is a truth table for the half adder.
Look closely at
the values for Sum
and Carry.
Do they look like any
of the gates you
have learnt?

Digital Electronics
Let's see what's happening. Look at the bottom most
row. We add A + B = 1 + 1. This has a Sum of 0, and a
Carry of 1.

Constructing the logic circuit for the Half Adder

The first step to converting a truth table to a logic circuit
is to write a Boolean expression and you learnt that we
use the Sum of Products Rule.


Sum= A B+AB
Carry= AB

Digital Electronics
The diagram shows how the circuit can be
implemented

Digital Electronics
Note that the Sum is an output of the Exclusive OR
gate so the same circuit can be represented as
shown below

Digital Electronics
Full Adders
The problem with a half-adder is that it doesn't
handle carries. When you look at the left column
of the addition you see that you add three bits.
1 0
1 1 0
+ 0 1 1
-----------
(1) 0 0 1
Half adders only add two bits.

Digital Electronics
The half adder can add only two input bits (A and
B) and has nothing to do with the carry if there is
any in the input. So if the input to a half adder has
a carry, then it will be neglected and it adds only
the A and B bits. That means the binary addition
process is not complete and that’s why it is called
a half adder. We need a circuit that can add three
bits. That circuit is called a full adder.

Digital Electronics
Here are the characteristics of a full adder.
Data inputs: 3 (call them A, B, and C
in, for Carry in)
Outputs: 2 (call them S, for Sum, and C
out, for
Carry out).

Notice that we now need to make a distinction
whether the carry is an input (C
in) or an output
(C
out). Carry in's in the next column are due to
carry outs from the adjacent column when we add
from right to left.

Digital Electronics
Here is a truth table for the full adder
A B C
in Sum C
out
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Digital Electronics
Constructing the logic circuit for the Half Adder

Applying the Sum of Products Rule:

??????��=� � �+� �� +�� � +���

�
??????��=���+��� +�� �+� ��

�
??????��=��+��+��(�??????���??????�??????��)

Digital Electronics
The diagram
shows how
the
circuit can be
implemented

Digital Electronics
We can implement a full adder circuit using two half adder
circuits. A first half adder will be used to add A and B to
produce a partial Sum and a second half adder can be used
to add C
in to the Sum produced by the first half adder to get
the final Sum output.
If any of the half
adders produces a
carry, there will be an
output carry. So, C
out
will be an OR function
of the half-adder
Carry outputs.
Tags