Title: CSE 1520 Computer Use: Fundamentals
1CSE 1520 -- Computer Use Fundamentals
- Week 5
- Glade Manual Chapter 4
- Gates and Circuits (Dale Lewis Ch. 4)
2Combinational Circuits
CSE 1520 -- Computer Use Fundamentals
- Recall the following logic circuit (called
circuit 1)
Logic diagram Symbol
Boolean expression
3Combinational Circuits
CSE 1520 -- Computer Use Fundamentals
- Now, we want to investigate the following Boolean
expression
X A(BC)
- How do we want to create the logic diagram
(called circuit 2) of the above Boolean
expression?
- We have an inner function which consists of an
OR gate between B and C - We then have an
outer function which is an AND gate between
A and (BC)
Logic diagram Symbol (circuit 2)
A(BC)
BC
4Combinational Circuits
CSE 1520 -- Computer Use Fundamentals
X A(BC)
Boolean expression
Logic diagram Symbol
A(BC)
BC
A B C BC A(BC)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A B C BC A(BC)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
A B C BC A(BC)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
Truth table
5Combinational Circuits
CSE 1520 -- Computer Use Fundamentals
A(BC)
BC
A B C BC A(BC)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
A B C D E X
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 0 0 0
1 0 1 0 1 1
1 1 0 1 0 1
1 1 1 1 1 1
- Their results are identical!
6Combinational Circuits
CSE 1520 -- Computer Use Fundamentals
- We have therefore demonstrated circuit equivalence
- That is, both circuits produce the same results
for each input combination
- Boolean algebra allows us to apply provable
mathematical principles to help us design logical
circuits
- From the previous example
X AB AC A(BC)
7Properties of Boolean Algebra
CSE 1520 -- Computer Use Fundamentals
- DeMorgans law, in particular, is very useful in
Boolean algebra.
- For instance, it means that
___ ___ ___
1 NAND gate is equivalent to 2 NOT gates with an
OR gate
8Properties of Boolean Algebra
CSE 1520 -- Computer Use Fundamentals
- Suppose we have the following logic diagram
3T
A
2T
Requires 8 transistors in total to implement
B
3T
C
D
- Recall that a NAND gate needs 2 transistors
Vout
Vin1
Vin2
9Properties of Boolean Algebra
CSE 1520 -- Computer Use Fundamentals
- If we apply DeMorgans law
___ ___ ___
- So, we will obtain the following logic diagram
2T
A
3T
B
Requires 7 transistors in total to implement
2T
C
D
10Addition
CSE 1520 -- Computer Use Fundamentals
- One of the most basic operations a computer can
perform is to add two numbers together
- Addition operations in binary are carried out by
special circuits called adders
11Adder
CSE 1520 -- Computer Use Fundamentals
- A circuit that computes the sum of two single
bits and produces the correct carry bit is called
a half adder
- How do we implement the circuit?
- Recall adding two binary digits
Sum
Carry
12Half Adder
CSE 1520 -- Computer Use Fundamentals
- Based on the previous results, we obtain 2 output
results Sum, Carry
- The next step is to create a truth table that
consists A, B, Sum and Carry
Sum
Carry
13Half Adder
CSE 1520 -- Computer Use Fundamentals
- Based on the previous results, we obtain the
following truth table with 2 output results Sum,
Carry
Corresponds to AND gate
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Corresponds to XOR gate
14Half Adder
CSE 1520 -- Computer Use Fundamentals
- Based on the previous results, the circuit for a
half adder is
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
- Because the circuit produces two distinct output
values, we represent the half adder with 2
Boolean expressions
15Half Adder
CSE 1520 -- Computer Use Fundamentals
- A half adder does not take into account a
possible carry value into the calculation
(carry-in)
- For example if we want to perform another
addition based on the following result, the Carry
bit is ignored
Sum
Carry
- Half adder is only good for adding 2 single bits,
but cannot be used to compute the sum of 2 binary
values with multiple digits each
16Full Adder
CSE 1520 -- Computer Use Fundamentals
- A circuit called full adder takes the carry-in
value into account
- Based on the logic diagram, we should then create
the truth table for the full adder