Professional Documents
Culture Documents
Based On Slides From Discrete Mathematical Structures: Theory and Applications and by
Based On Slides From Discrete Mathematical Structures: Theory and Applications and by
3:
Logic Gates
Learning Objectives
10
11
12
13
14
15
16
17
18
19
Thus, we get:
x
F(x,y)
F(x,y) = xy + x'y'
21
22
23
24
25
26
27
28
29
30
An OR gate can be
implemented using
NAND gates (c).
31
32
33
Carry Sum
Carry is x AND y
Sum is x XOR y
The circuit to compute this is called a half-adder
34
= s (sum)
c (carry)
x y s c
1 1 0 1
1 0 1 0
0 1 1 0
0 0 0 0
35
A full adder is a circuit that accepts as input thee bits x, y, and c, and
produces as output the binary sum cs of a, b, and c.
s (sum)
c (carry)
0
36
37
0
1
1
0
0
0 0
1 0
1 0
38
39
40
41
Flip-flops
Consider the following
circuit:
R
Q
Function
Reset
Set
Hold
1/1
Q
S
Memory
A flip-flop holds a single bit of memory
The bit flip-flops between the two NAND
gates
In reality, flip-flops are a bit more complicated
Have 5 (or so) logic gates (transistors) per flipflop
Consider a 1 Gb memory chip
1 Gb = 8,589,934,592 bits of memory
Thats about 43 million transistors!
In reality, those transistors are split into 9 ICs of
about 5 million transistors each
43