Connecting with Computer Science, 2e Chapter 3 Computer ArchitectureConnecting with Computer Science, 2e 2 Objectives • In this chapter you will: – Learn why you need to understand how computers work – Learn what a CPU is and what it’s made of – Learn how digital logic circuits are constructed – Learn the basic Boolean operators – Understand how basic logic gates operate and are used to build complex computer circuits – Learn the importance of Von Neumann architecture – Understand how a computer uses memoryConnecting with Computer Science, 2e 3 Objectives (cont’d.) • In this chapter you will (cont’d.): – Learn what a system bus is and what its purpose is – Understand the difference between memory and storage – Be able to describe basic input/output devices – Understand how a computer uses interrupts and pollingConnecting with Computer Science, 2e 4 Why You Need to Know About…Computer Architecture • Computer – Hardware designed to run software – Purpose is to accomplish desired tasks – Professionals need to understand logical connection between hardware and software • Computer architecture – Organization of hardware components into a computer systemConnecting with Computer Science, 2e 5 Inside the Box • Computer system external view – Monitor – Keyboard and mouse – Computer case • CPU (central processing unit) – Resides in case on main board, or motherboard – Computational center served by all other parts – Touch point for the study of computer architectureConnecting with Computer Science, 2e 6 Figure 3-2, Main board with labeled components Inside the Box (cont’d.) Courtesy of Intel Corporation"Connecting with Computer Science, 2e 7 Table 3-1, Main board components Inside the Box (cont’d.)Connecting with Computer Science, 2e 8 The CPU • CPU is the computer – Contains digital components that do processing • Transistor – Fundamental component • Electronic switch accommodates binary values • Millions of transistors per chip • Organized into a higher level called a circuit – Four basic functions • Adding, decoding, shifting, and storingConnecting with Computer Science, 2e 9 The CPU (cont’d.) • Four corresponding transistor circuits – Adder: adds, subtracts, multiplies, divides – Decoder: reacts to specific bit patterns – Shifter: moves bits to right or left – Flip-flop (latch): used to store memory bitsConnecting with Computer Science, 2e 10 How Transistors Work • Material composition – Silicon or germanium • Logically organized into three parts – Emitter, collector, and base • Transistor as electronic switch – Base used to turn current on and off • Capacity to control current translates into capacity to manipulate binary values of 1 and 0 • Size considerations – Typical transistor 130 nanometers wide (Pentium IV)Connecting with Computer Science, 2e 11 Figure 3-3, Transistors are used to build basic logic circuits, such as this circuit that reverses (NOTs) the input signal How Transistors Work (cont’d.)Connecting with Computer Science, 2e 12 Digital Logic Circuits • Logic circuit – Next level of organization above transistor – Leverages switching function of transistor – Performs operations of Boolean algebra • Boolean algebra – Functions relating binary input and output – Chief operators: AND, OR, NOT – Boolean variables: true (1) or false (0) – Boolean expressions • Use Boolean operators and variablesConnecting with Computer Science, 2e 13 Digital Logic Circuits (cont’d.) • Truth tables – Convenient tabular representations of Boolean expressions – Column(s) represent inputs and output(s) – Rows correspond to each possible combination of inputs • 2n rows needed for n inputs (n is a positive integer) • Example: two inputs require 22 = 4 rowsConnecting with Computer Science, 2e 14 The Basic Boolean Operators • AND operator – Takes two values as input (x and y) and generates one output (z) – Both inputs must be true (1) for output to be true (1) – Any other combination yields output of false (0) – Equivalent Boolean expression: xy = zConnecting with Computer Science, 2e 15 Figure 3-4, Truth table for the AND operator The Basic Boolean Operators (cont’d.) Copy editor:!OK to use “The Basic Boolean Operators” though this appears before actual head?Connecting with Computer Science, 2e 16 The Basic Boolean Operators (cont’d.) • OR operator – Takes two values as input (x and y) and generates one output (z) – Either input valued true (1) will cause output to be valued true (1) – When both inputs valued false (0), output will be valued false (0) – Equivalent Boolean expression: x + y = zConnecting with Computer Science, 2e 17 Figure 3-5, Truth table for the OR operator The Basic Boolean Operators (cont’d.)Connecting with Computer Science, 2e 18 The Basic Boolean Operators (cont’d.) • NOT operator – Takes one value as input (x) and generates one output (z) – Reverses value of input • When x = 1, z = 0 • When x = 0, z = 1 – Equivalent Boolean expression: x′ = z or x = zConnecting with Computer Science, 2e 19 Figure 3-6, Truth table for the NOT operator The Basic Boolean Operators (cont’d.)Digital Building Blocks • Circuit hierarchy – Gates: transistor circuits that implement Boolean operators • Can be grouped into more complex circuits carrying out computer tasks • Reliability – Binary values are maintained with consistent voltage levels – Gate output is completely determined by input • Six fundamental gates – AND, OR, NOT, NAND, NOR, XOR Connecting with Computer Science, 2e 20Digital Building Blocks (cont’d.) • AND gate – Allows for two inputs and has one output – Truth table identical to that of AND Boolean operator • OR gate – Allows for two inputs and has one output – Truth table identical to that of Boolean OR operator • NOT gate – Allows for one input and one output – Truth table identical to Boolean NOT operator Connecting with Computer Science, 2e 21Connecting with Computer Science, 2e 22 Digital Building Blocks (cont’d.) •
View Full Document