4. TransisTors and LOGIC GATeS Rocky K. C. Chang Version 0.1, 14 October 2017
Rocky K. C. Chang Version 0.1, 14 October 2017
GOAIS OF THIS LECTURE Have a basic understanding of how transistors are used to implement the basic logic gates Know how to obtain Boolean function and logic circuit for a given truth table Know how to simplify a boolean function by applying various boolean laws Know how to simplify a boolean function by the Karnaugh map
▪Have a basic understanding of how transistors are used to implement the basic logic gates. ▪Know how to obtain Boolean function and logic circuit for a given truth table. ▪Know how to simplify a Boolean function by applying various Boolean laws. ▪Know how to simplify a Boolean function by the Karnaugh map. 2
LEVEIS OF REPRESENTATION/ INTERPRETATION High Level Language temp =v[k] Program(e.g, C) k+1] +11= temp; Compiler Sto, o(S2) Anything can be represented Assembly Language Iw st,4($2) as a numbe Program(e. g, MIPS) st1,O($2) SW O,4($2 Le data or instructions Assembler 00001001110001101010111101011000 Machine Language 10101111010110000000100111000110 Program( MIPS) 11000110101011110101100000001001 01011000000010011100011010101111 Machine Interpretation Hardware Architecture Description (e. g block diagrams) ALU Architecture Implementation 回 Logic Circuit Description (Circuit Schematic Diagrams) 回
3 lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) High Level Language Program (e.g., C) Assembly Language Program (e.g., MIPS) Machine Language Program (MIPS) Hardware Architecture Description (e.g., block diagrams) Compiler Assembler Machine Interpretation temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; 0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111 Logic Circuit Description (Circuit Schematic Diagrams) Architecture Implementation Anything can be represented as a number, i.e., data or instructions
WHY STUDY HARDWARE DESIGN? Every Cs student should understand how a computer (not only a program) works. But it is not necessary to know verilog to design hardware and the nitty-gritty electronic stuff Every CS student should also understand the capabilities and limitations of hardware in general and processors in particular Every Cs student should be able to evaluate the tradeoffs of different computing systems
▪Every CS student should understand how a computer (not only a program) works. ▪ But it is not necessary to know Verilog to design hardware and the nitty-gritty electronic stuff. ▪Every CS student should also understand the capabilities and limitations of hardware in general and processors in particular. ▪Every CS student should be able to evaluate the tradeoffs of different computing systems. 4
SYNCHRONOUS DIGITAL SYSTEMS Hardware of a processor, such as the MiPs, is an example of a Synchronous digital System Synchronous All operations coordinated by a central clock (heartbeat of the system!) Digital Represent all values by discrete values two binary digits: I and o Electrical signals are treated as Is ando,s(high/low voltage for 1/0)
▪Hardware of a processor, such as the MIPS, is an example of a Synchronous Digital System ▪Synchronous: All operations coordinated by a central clock (“heartbeat” of the system!) ▪Digital: • Represent all values by discrete values • Two binary digits: 1 and 0 • Electrical signals are treated as 1’s and 0’s (high/low voltage for 1/0) 5
TWO TYPES OF LOGIC CIRCUIS Combinational At any point in time, the output of the circuit is related to its current input signals by some Boolean expression(e.g, multiplexer, ROM, adder, etc) Sequential Its output is not only a function of the current input data, but also of previous values of the input signals(e.g, registers, counters and memory) Combinational Combinational Out Out Circuit (a) Combinatio (b) Sequential
▪Combinational ▪ At any point in time, the output of the circuit is related to its current input signals by some Boolean expression (e.g., multiplexer, ROM, adder, etc). ▪Sequential ▪ Its output is not only a function of the current input data, but also of previous values of the input signals (e.g., registers, counters and memory). 6
SWITCHES Implementing a simple circuit (arrow shows action if wire changes to 1” or is asserted): Open switch(if A is0"or unasserted)and turn off light bub(4 Close switch(if A is"1"or asserted) and turn on light bub( 4 Z= A
A Z ▪ Implementing a simple circuit (arrow shows action if wire changes to “1” or is asserted): 7 Z A A Z Close switch (if A is “1” or asserted) and turn on light bulb (Z) Open switch (if A is “0” or unasserted) and turn off light bulb (Z)
SWITCHES (CONTD Compose switches into more complex ones(Boolean functions): AND AB Z≡ A and b AND B A OR Z≡AorB OR B
AND OR Z A and B Z A or B A B A B ▪Compose switches into more complex ones (Boolean functions): 8 A B AND C OR A B C
HOW TO MAKE ELECTRONIC SWITCHES? Idea: Use voltage to represent 0 and l High voltage (Vdd) represents 1.0 Volt Low voltage(0 Volt or Ground) represents O Pick a midpoint voltage to decide if ao or a l Voltage greater than midpoint =1 Voltage less than midpoint =0 This removes noise as signals propagate-a big advantage of digital systems over analog systems
▪ Idea: Use voltage to represent 0 and 1 ▪ High voltage (Vdd) represents 1 (Vdd ~ 1.0 Volt). ▪ Low voltage (0 Volt or Ground) represents 0. ▪Pick a midpoint voltage to decide if a 0 or a 1 ▪ Voltage greater than midpoint = 1 ▪ Voltage less than midpoint = 0 ▪ This removes noise as signals propagate – a big advantage of digital systems over analog systems 9
CMOS TRANSISTORS Modern digital systems designed in CMOs MOS: Metal-Oxide on semiconductor C for complementary: use pairs of normally-open and normally-closed switches 5V CMOS transistors act as voltage-controlled switches N-type MOSFET Switch is closed when input is 5V NMOS transistors Switch closed(open) for a high(low)voltage PMOS transistors 5V P-type MOSFET Switch closed(open) for a low(high) voltage Switch is closed when input is OV
▪Modern digital systems designed in CMOS ▪ MOS: Metal-Oxide on Semiconductor ▪ C for complementary: use pairs of normally-open and normally-closed switches ▪ CMOS transistors act as voltage-controlled switches. ▪NMOS transistors ▪ Switch closed (open) for a high (low) voltage ▪PMOS transistors ▪ Switch closed (open) for a low (high) voltage 10