Computer Organization Douglas Comer Computer Science Department Purue University 25 N. University Street West Lafayette, IN 4797-266 http://www.cs.purue.eu/people/comer Copyright 26. All rights reserve. This ocument may not be reprouce by any means without written consent of the author.
II Funamentals Of Digital Logic CS25 -- Chapt. 2 26
Our Goal Unerstan Funamentals an basics Concepts How computers work at the lowest level Avoi whenever possible Complexity Implementation etails Engineering esign rules CS25 -- Chapt. 2 2 26
Electrical Terminology Voltage Quantifiable property of electricity Measure of potential force Unit of measure: volt Current Quantifiable property of electricity Measure of electron flow along a path Unit of measure: ampere (amp) CS25 -- Chapt. 2 3 26
Analog For Electricity Voltage is analogous to water pressure Current is analogous to flow of water Can have High pressure with little flow Large flow with little pressure CS25 -- Chapt. 2 4 26
Voltage Device use to measure calle voltmeter Can only be measure as ifference between two points To measure voltage Assume one point represents zero volts (known as groun) Express voltage of secon point wrt groun CS25 -- Chapt. 2 5 26
In Practice Typical igital circuit operates on five volts Two wires connect each chip to power supply Groun (zero volts) Power (five volts) Digital logic iagrams o not usually show power an groun connections CS25 -- Chapt. 2 6 26
Transistor Basic builing block of igital circuits Operates on electrical current Acts like a miniature switch small input current controls flow of large current Three external connections Emitter Base (control) Collector Current between base an emitter controls current between collector an emitter CS25 -- Chapt. 2 7 26
Illustration Of A Transistor small current flows from here to point E C B large current flows from point C to point E E CS25 -- Chapt. 2 8 26
Boolean Logic Mathematical basis for igital circuits Three basic functions: an, or, an not A B A an B A B A or B A not A CS25 -- Chapt. 2 9 26
Digital Logic Can implement Boolean functions with transistors Five volts represents Boolean Zero volts represents Boolean CS25 -- Chapt. 2 26
Transistor Implementing Boolean Not +5 volts resistor output input volts When input is zero volts, output is five volts When input is five volts, output is zero volts CS25 -- Chapt. 2 26
Logic Gate Harware component Consists of integrate circuit Implements an iniviual Boolean function To reuce complexity, provie inverse of Boolean functions Nan gate implements not an Nor gate implements not or Inverter implements not CS25 -- Chapt. 2 2 26
Truth Tables For Nan an Nor Gates A B A nan B A B A nor B CS25 -- Chapt. 2 3 26
Symbols Use In Schematic Diagrams nan gate nor gate inverter CS25 -- Chapt. 2 4 26
Example Of Internal Gate Structure (Nor Gate) 4 k 4 k.6 k 3 5 volts input output input 2 k ioe volts Soli ot inicates electrical connection CS25 -- Chapt. 2 5 26
Technology For Logic gates Most popular technology known as Transistor-Transistor Logic (TTL) Allows irect interconnection (a wire can connect output from one gate to input of another) Single output can connect to multiple inputs Calle fanout Limite to a small number CS25 -- Chapt. 2 6 26
Example Interconnection Of TTL Gates Two logic gates neee to form logical an Output from nan gate connecte to input of inverter input from power button input from isk output CS25 -- Chapt. 2 7 26
Consier The Following Circuit X C output Y A B Z Question: what oes the circuit implement? CS25 -- Chapt. 2 8 26
Two Ways To Describe Circuit Boolean expression Often use when esigning circuit Can be transforme to equivalent version that takes fewer gates Truth table Enumerates inputs an outputs Often use when ebugging a circuit CS25 -- Chapt. 2 9 26
Describing A Circuit With Boolean Algebra X C output Y A B Z Value at point A is not Y Value at B is: Z nor (not Y) CS25 -- Chapt. 2 2 26
Describing A Circuit With Boolean Algebra (continue) X C output Y A B Z Output is: X an (Z nor (not Y)) CS25 -- Chapt. 2 2 26
Describing A Circuit With Boolean Algebra (continue) X C output Y A B Z Output is (alternative): X an not (Z or (not Y)) CS25 -- Chapt. 2 22 26
Describing A Circuit With A Truth Table (continue) X Y Z A B C output Table lists all possible inputs an output for each Can also state values for intermeiate points CS25 -- Chapt. 2 23 26
Avoiing Nan / Nor Operations Circuits use nan an nor gates Sometimes easier for humans to use an an or operations Example circuit or truth table output can be escribe by Boolean expression: X an Y an (not Z)) CS25 -- Chapt. 2 24 26
In Practice Only a few connections neee per gate Chip has many pins for external connections Result: can package multiple gates place on each chip CS25 -- Chapt. 2 25 26
Example Of Logic Gates 74 family of chips Package is about one-half inch long Implement TTL logic Powere by five volts Contain multiple gates per chip CS25 -- Chapt. 2 26 26
Examples Of Gates On 74-Series Chips 4 3 2 9 8 4 3 2 9 8 4 3 2 9 8 2 3 4 5 6 7 2 3 4 5 6 7 2 3 4 5 6 7 74 742 744 Pins 7 an 4 connect to groun an power CS25 -- Chapt. 2 27 26
Circuits That Maintain State More sophisticate than combinatorial circuits Output epens on history of previous input as well as values on input lines CS25 -- Chapt. 2 28 26
Example Of Circuit That Maintains State Basic flip-flop Analogous to push-button power switch Each new receive as input causes output to reverse First input pulse causes flip-flop to turn on Secon input pulse causes flip-flop to turn off CS25 -- Chapt. 2 29 26
Output Of A Flip-Flop input flip-flop output in: out: time increases Note: output only changes when input makes a transition from zero to one CS25 -- Chapt. 2 3 26
Flip-Flop Action Plotte As Transition Diagram in: out: time increases Output changes on leaing ege of input Also calle rising ege CS25 -- Chapt. 2 3 26
Binary Counter Counts input pulses Output is binary value Inclues reset line to start count at zero Example: 4-bit counter available as single integrate circuit CS25 -- Chapt. 2 32 26
Illustration Of Counter input outputs ecimal counter input outputs time increases 2 2 2 3 (a) 3 4 4.. 5 (b) CS25 -- Chapt. 2 33 26
Clock Electronic circuit that pulses regularly Measure in cycles per secon (Hz) Digital output of clock is sequence of... Permits active circuits CS25 -- Chapt. 2 34 26
Demultiplexor Takes binary value as input Uses input to select one output CS25 -- Chapt. 2 35 26
Illustration Of Demultiplexor emultiplexor x y z inputs outputs CS25 -- Chapt. 2 36 26
Example Circuit That Executes A Sequence Of Steps Desire sequence Test the battery Power on an test the memory Start the isk spinning Power up the monitor Rea boot sector from isk into memory Start the CPU CS25 -- Chapt. 2 37 26
Circuit To Execute Sequence emultiplexor not use clock counter test battery test memory start isk start monitor rea boot blk start CPU not use CS25 -- Chapt. 2 38 26
Feeback Output of circuit use as an input Allows more control Example: stop sequence when output F becomes active Boolean algebra CLOCK an (not F) CS25 -- Chapt. 2 39 26
Illustration Of Feeback For Termination emultiplexor clock these two gates perform the Boolean an function counter not use test battery test memory start isk start monitor rea boot blk start CPU feeback stop Note aitional input neee to restart sequence CS25 -- Chapt. 2 4 26
Spare Gates Note: because chip contains multiple gates, some gates may be unuse May be able to substitute spare gates in place of aitional chip Example uses spare nan gate as inverter by connecting one input to five volts: nan x = not x CS25 -- Chapt. 2 4 26
Practical Engineering Concerns Power consumption (wiring must carry sufficient power) Heat issipation (chips must be kept cool) Timing (gates take time to settle after input changes) Clock synchronization (clock signal must reach all chips simultaneously) CS25 -- Chapt. 2 42 26
Illustration Of Clock Skew clock IC IC 3 IC 2 Length of wire etermines time require for signal to propagate CS25 -- Chapt. 2 43 26
Classification Of Technologies Name Example Use Small Scale Integration (SSI) Basic Boolean gates Meium Scale Integration (MSI) Intermeiate logic such as counters Large Scale Integration (LSI) Small, embee processors Very Large Scale Integration (VLSI) Complex processors CS25 -- Chapt. 2 44 26
Levels Of Abstraction Abstraction Implemente With Computer Circuit boar(s) Circuit boar Components such as processor an memory Processor VLSI chip VLSI chip Many gates Gate Many transistors Transistor Semiconuctor implemente in silicon CS25 -- Chapt. 2 45 26
Summary Computer systems are constructe of igital logic circuits Funamental builing block is gate Digital circuit can be escribe by Boolean algebra (most useful when esigning) Truth table (most useful when ebugging) Clock allows active circuit to perform sequence of operations Feeback allows output to control processing Practical engineering concerns inclue Power consumption an heat issipation Clock skew an synchronization CS25 -- Chapt. 2 46 26
Questions?