SLIDE 1
Digital Logic and Transistors The invention of the transistor made - - PowerPoint PPT Presentation
Digital Logic and Transistors The invention of the transistor made - - PowerPoint PPT Presentation
Digital Logic and Transistors The invention of the transistor made binary logic the cheapest and most effective way to implement logic gates. Both inputs are on. At least one input is on. The input is off. What is an
SLIDE 2
SLIDE 3
What is an “Instruction”?
Let’s consider the simple operation of adding two numbers. Adder
add x, y, z
01010010010 11100100011 Why are numbers represented in binary? How would we add binary numbers?
SLIDE 4
Adding on a CPU
Adder
Every instruction in a CPU is composed of logic gates. With current technology, gates are about 200 nm - roughly 300 times smaller than the diameter of a human hair.
x y z
SLIDE 5
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers 2-bit numbers 00 + 00 = 00 00 + 01 = 01 00 + 11 = 11 01 + 00 = 01 ... How many entries? How many possible sums can two n-bit numbers have? What does an adding circuit look like? Let’s consider adding in binary: 1
carry
input
- utput
SLIDE 6
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers What does an adding circuit look like? Let’s consider adding in binary: 1
carry
x y 0 1 1 0 1 1 0 0 Adder c z 1 1 1
input
- utput
input
carry
- utput
SLIDE 7
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers What does an adding circuit look like? Let’s consider adding in binary: 1
carry
x y 0 1 1 0 1 1 0 0 Adder
input
- utput
input
c z 1 1 1
carry
- utput
SLIDE 8
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers What does an adding circuit look like? Let’s consider adding in binary: 1
carry
x y 0 1 1 0 1 1 0 0
input
- utput
input
c z 1 1 1
carry
- utput
Can we calculate z and c using logic gates?
? c = z = ?
SLIDE 9
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers What does an adding circuit look like? Let’s consider adding in binary: 1
carry
x y 0 1 1 0 1 1 0 0
input
- utput
input
c z 1 1 1
carry
- utput
Can we calculate z and c using logic gates?
? c = z = x y
SLIDE 10
Circuits and Boolean Logic
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers What does an adding circuit look like? Let’s consider adding in binary: 1
carry
x y 0 1 1 0 1 1 0 0
input
- utput
input
c z 1 1 1
carry
- utput
c = z =
Can we calculate z and c using logic gates?
x y x y = (xy) (xy)
SLIDE 11
Circuits and Boolean Logic
What does an adding circuit look like? Let’s consider adding in binary: A one-bit adder needs 4 gates. How do we add numbers with more bits?
z = (xy) (xy) c = x y x y c z
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 1-bit numbers 1
carry
input
- utput
SLIDE 12
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 01010010010 11100100011
x y z c
SLIDE 13
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 1 01010010010 11100100011 00
x y z c
SLIDE 14
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 01 01010010010 11100100011 100
x y z c
SLIDE 15
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 101 01010010010 11100100011 0100
x y z c
SLIDE 16
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 0101 01010010010 11100100011 00100
x y z c
SLIDE 17
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 10101 01010010010 11100100011 000100
x y z c
SLIDE 18
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 110101 01010010010 11100100011 0000100
x y z c
SLIDE 19
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 0110101 01010010010 11100100011 00000100
x y z c
SLIDE 20
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 10110101 01010010010 11100100011 000000100
x y z c
SLIDE 21
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 110110101 01010010010 11100100011 0000000100
x y z c
SLIDE 22
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 0110110101 01010010010 11100100011 10000000100
x y z c
SLIDE 23
Adder Logic
We need to modify our 1-bit adder slightly to use it in series: 100110110101 01010010010 11100100011 10000000100
x y z c
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x y z cin cout
SLIDE 24