Upload
colleen-agatha-bates
View
228
Download
0
Embed Size (px)
Citation preview
Electronic Circuits
Two types of circuit diagrams See pp. 238 in The Analytical Engine by Decker
and Hirshfield for the "mechanical switch" type of diagram.
Second style (which we will call "symbolic diagrams") uses pictures for the boolean logic operators. These pictures are called gates.
Truth Table to Gates
First, build the Boolean algebra expression that gives Z Z = AB + A’B’ Z = (A AND B) OR
(NOT A AND NOT B)
A B Z
T T T
T F F
F T F
F F T
Truth Table to Gates
Z = AB + A’B’ Next, build the
circuit that goes with the Boolean algebra expression Z
A B Z
T T T
T F F
F T F
F F T
Binary Arithmetic
We can add binary numbers just like decimal numbers only using base two arithmetic.
For example:
5 101
1110
101
+ 7 + 111 + 111
12 1100 1100
Binary Addition
Notice in addition:
0 0 1 1
+ 0 + 1 + 0 + 1
0 1 1 10
False True True False
False False False True
Sum
Carry
A B Sum
(1) T (1) T (0) F
(1) T (0) F (1) T
(0) F (1) T (1) T
(0) F (0) F (0) F
Full Adder
Takes a carry in and produces the result and carry out.
So, we have 3 inputs and two outputs. Combine two half-adders together with an or
gate to get a full adder for each binary digit. How many half adders would we need to add
two 8-digit binary numbers? How many gates?
Binary Subtraction
We do binary subtraction like decimal subtraction only the borrowing is done in 2’s instead of 10’s.
122 1111010
- 7 - 111
115 1110011
Binary Multiplication
Again, just like decimal except we add and multiply in binary.
* 0 1
0 0 0
1 0 1
5 101
x 7 x 111
35 100011
Exercises
1 - From the book, p 266, Construct circuits with the following properties (using AND, OR or NOT gates):
Exercises
A) B)A B Z
1 1 0
1 0 1
0 1 1
0 0 1
A B C Z
1 1 1 1
1 1 0 0
1 0 1 1
1 0 0 0
0 1 1 0
0 1 0 1
0 0 1 0
0 0 0 1