Professional Documents
Culture Documents
Principles of Computer Operation
Principles of Computer Operation
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-2
1-3 1-4
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-3 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-4
• Memory stores the program running and the data on • A commonly used diagram of computer
which the program operates
memory represents the discrete locations
• Properties of memory: as boxes (1 byte each).
– Discrete locations. Each location consists of 1 byte.
• Address of location is displayed above the
– Addresses. Every memory location (byte) has an address (whole
numbers starting with zero). box.
– Values. Memory locations record or store values. • Value or contents of location is shown in
– Finite capacity. Limited size—programmers must remember that the box.
the data may not "fit" in the memory location.
1-5 1-6
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-5 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-6
Memory (cont'd)
1-7 1-8
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-7 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-8
• "Random access" means the computer can • Hardware implementation of the Fetch/Execute Cycle
refer to (access) the memory locations in • Its circuitry fetches an instruction from memory, decodes
any order the instruction, and fetches the operands used in it
– A typical instruction might have the form
• Often measured in ADD 4000, 2000, 2080 op dest, src1, src2
megabytes (MB) – millions of bytes or – This instruction asks that the numbers stored in locations 2000
gigabytes (GB) – billions of bytes and 2080 be added together, and the result stored in location
4000 [4000] = [2000] + [2080]
• Large memory is preferable because there – Data/Operand Fetch step must get these two values and after
they are added, Result Return/Store step will store the answer in
is more space for programs and data location 4000
(which usually equates to less I/O)
1-9 1-10
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-9 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-10
1-11 1-12
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-11 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-12
Input Unit and Output Unit (I/O) The Peripherals
• The wires and circuits through which information • Keyboard encodes keystrokes we type into
moves into and out of a computer binary form for the computer
• The peripherals: Connect to the computer • Monitor decodes information from the computer's
input/output ports. They are not considered part memory and displays it on a lighted, colored
of the computer, but specialized gadgets that screen
encode or decode information between the
computer and the physical world. • Disks drives are used for both input and output—
storage devices where the computer puts away
information when it is not needed, and can
retrieve from when it is needed again
1-13 1-14
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-13 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-14
A Device Driver for Every Peripheral The Program Counter: The Pc's PC
• "Dumb" devices provide basic physical • How does the computer determine which step to execute
translation to or from binary signals. next?
• Address of the next instruction is stored in the control part
• Additional information from the computer is of the computer. It is called the program counter (PC).
needed to make it operate intelligently.
• Because instructions use 4 bytes of memory, the next
• e.g., computer receives information that user instruction must be at PC + 4, 4 bytes further along in the
typed shift and w at the same time. It converts to sequence (in general).
a capital W. The software that converts is called • Computer adds four to the PC, so when the F/E Cycle
the device driver. gets back to Instruction Fetch step, the PC is "pointing at"
the next instruction.
1-15 1-16
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-15 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-16
1-17 1-18
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-17 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-18
Instruction Interpretation (cont'd)
1-19 1-20
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-19 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-20
1-21 1-22
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-21 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-22
1-23 1-24
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-23 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-24
Instruction Interpretation (cont'd)
1-25 1-26
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-25 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-26
1-27 1-28
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-27 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-28
• Computers can only perform about 100 different • Besides ADD, MULT (multiply) and DIV (divide), other
instructions instructions include:
– About 20 different kinds of operations (different – Shift the bits of a word to the left or right, filling the emptied
places with zeros and throwing away bits that fall off the end
instructions are needed for adding bytes, words,
decimal numbers, etc.) – Compute logical AND (test if pairs of bits are both true), and
logical OR (test if at least one of two bits is true)
• Everything computers do must be reduced to
– Test if a bit is zero or non-zero, and jump to new set of
some combination of these primitive, hardwired instructions based on outcome
instructions – Move information around in memory
– Sense signals from input/output devices
1-29 1-30
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-29 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-30
Cycling the F/E Cycle
1-31 1-32
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-31 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-32
1-33 1-34
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-33 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-34
– Alternative form of machine language using letters and – Have special statement forms to help programmers
normal numbers so people can understand it give complicated instructions
• Example: Three-part if statement
– Computer scans assemble code, as it encounters
– Yes/no question to test
words it looks them up in a table to convert to binary,
– Instructions to operate if test is true
converts numbers to binary, then assembles the
– Instructions to operate if test is false
binary pieces into an instruction
1-35 1-36
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-35 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-36
1-37 1-38
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-37 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-38
Operating Systems
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-39 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-40
1-41 1-42
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-41 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-42
Integrated Circuits
• Photolithography
– Printing process. Instead of hand-wiring
circuits together, photograph what is wanted
and etch away the spaces
– Regardless of how complicated the wiring,
cost and amount of work are the same
1-43 1-44
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-43 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-44
• Integration:
– Active components and the wires that connect them
are all made together of similar materials in a single
process
– Saves space and produces monolithic part for the
whole system, which is more reliable
• Silicon is a semi-conductor—sometimes it
conducts electricity, sometimes not
– Ability to control when semi-conductor conducts is the
main tool in computer construction
1-45 1-46
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-45 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-46
• A circuit is set to compute x and y for any logical • Controls the conductivity of the semiconductor
values x and y • Objects can become charged positively or
• If x is true, the x circuit conducts electricity and a negatively
signal passes to the other end of the wire; if x is – Like charges repel each other, but opposites attract.
This effect is called the field effect.
false, no signal passes
• Same process for y
• If both circuits conduct, x and y are true—logical
AND has been computed
1-47 1-48
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-47 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-48
The Field Effect (cont'd) How Does the Channel Conduct?
• The gap between two wires is treated to improve its • The silicon in the channel conducts
conducting and non-conducting properties
• This is called a channel (path for electricity to travel
electricity when it is in a charged field
between the two wires) – Electrons are attracted or repelled in the
• An insulator covers the channel silicon material
• A wire called the gate passes over the insulator
– Charging the gate positively creates a field
• The gate is separated from the channel by the insulator—
does not make contact with the wires or the channel over the channel that conducts electricity
• Electricity is not conducted between the two wires unless
between the two wires
the channel is conducting
1-49 1-50
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-49 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-50
Transistors
1-51 1-52
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-51 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-52
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-53 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-54
Combining the Ideas (cont'd)
1-55 1-56
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-55 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9-56