Goal 1 Textbook Notes Flashcards
Digital computer
A machine that can do work for people by carrying out
instructions given to it.
Program
A sequence of instructions describing how to perform a certain task
Machine Language
The people designing a new computer must decide what instructions to include in its machine language. Usually, they try to make the primitive instructions
as simple as possible consistent with the computer’s intended use and performance
requirements, in order to reduce the complexity and cost of the electronics needed.
Because most machine languages are so simple, it is difficult and tedious for people to use them
L1 are executed by the computer, which, after all, can only execute programs written in its machine language,____.
L0
Translation
One method of executing a program written in L1 is first to replace each instruction in it by an equivalent sequence of instructions in L0. The resulting program consists entirely of L0 instructions. The computer then executes the new L0
program instead of the old L1 program.
Interpretation
write a program in L0 that takes programs in L1 as
input data and carries them out by examining each instruction in turn and executing
the equivalent sequence of L0 instructions directly. This technique does not require first generating a new program in L0.
Interpreter
Program that carries out interpretation
Translation and interpretation are similar. In both methods, the computer carries out instructions in L1 by executing _____ _____ of instructions in L0
equivalent sequences
Translation and interpretation are different, in that, in translation, the entire L1 program is first converted to an ___ program, the L1 program is thrown away, and then the new L0 program is loaded into the computer’s memory and ______. During execution, the newly generated L0 program is running and in control of the computer
L0
executed
In ______, after each L1 instruction is examined and decoded, it is carried out immediately. No translated program is generated. Here, the interpreter is
in control of the computer. To it, the L1 program is just data. Both methods, and
increasingly, a combination of the two, are widely used.
interpretation
Virtual machine (level)
Language is L1 for the machine
People write L2 which can be translated to L1 or executed by an interpreter written in L1
a computer with n levels can be regarded as n different ____ _____, each one with a different machine language.
virtual machines
Level n
Level 3
Level 2
Level 1
Level 0
Virtual machine Mn, with
machine language Ln
Virtual machine M3, with
machine language L3
Virtual machine M2, with
machine language L2
Virtual machine M1, with
machine language L1
Actual computer M0, with
machine language L0
Only programs written
in language L0 can be directly carried out by the ____ _____, without the
need for intervening translation or interpretation.
electronic circuits
Programs written in L1, L2, …, Ln must be either interpreted by an interpreter running on a ___ ___ or translated to another language corresponding to a lower level.
lower level
device level
At this level, the designer sees individual transistors, which are the lowest-level primitives for computer designers.
Digital logic level:
gates
built from analog components, such as transistors,
gates can be accurately modeled as digital devices.
Each gate is built up of at most a handful
of ______. A small number of gates can be combined to form a 1-bit memory,
which can store a 0 or a 1. The 1-bit memories can be combined in groups of (for
example) 16, 32, or 64 to form _____
transistors
registers
register
hold a single binary number up to some maximum
At this level we see a collection of (typically) 8 to 32 registers that form a local memory and a circuit called an
ALU (Arithmetic Logic Unit)
Microarchitecture Level
The registers are connected to the ALU to form a ___ ____, over
which the data flow
data path
On some machines the operation of the data path is controlled by a program called a _____. On other machines the data path is controlled directly by ______
microprogram
hardware
Level 2 AKA
e Instruction Set Architecture level (ISA level).
The new facilities added at level 3 are carried out by an interpreter running at
level 2, which, historically, has been called an ___ ___
operating system
some of the
level 3 instructions are interpreted by the operating system and some are interpreted directly by the microprogram (or hardwired control). This is what we mean
by ‘‘hybrid’’ level. Throughout this book we will call this level the ___ ____ ____ _____
Operating system machine level
interpreters and translators are written by people called _____ _____ who specialize in designing and implementing new virtual machines.
systems programmers
Levels 2 and 3 are always ______. Levels 4, 5, and above are usually, although not always, supported by _______.
interpreted
translation
Machine languages of Levels 1, 2, & 3 is _____. Level 4 is more readable.
numeric
Programs in assembly language are first translated to level 1,
2, or 3 language and then interpreted by the appropriate virtual or actual machine.
The program that performs the translation is called an _______
assembler
Level 5 usually consists of languages designed to be used by applications programmers with problems to solve. Such languages are often called ______ _____
higher-level languages
Programs written in high-level languages are generally
translated to level 3 or level 4 by translators known as _____, although occasionally they are interpreted instead. Programs in Java, for example, are usually
first translated to an ISA-like language called Java byte code, which is then _______.
compilers
interpreted
The set of data types, operations, and features of each level is called its _______
* deals with aspects visible to user of certain levels
* EX) memory numerical amount shown
Architecture
Implementation aspects, such as what kind of
technology is used to implement the memory, are not part of the architecture. The
study of how to design those parts of a computer system that are visible to the programmers is called ____ _____
Computer architecture
electronic circuits, along
with the memory and input/output devices, form the computer’s ______
hardware
Software
consists of algorithms (detailed instructions telling how
to do something) and their computer representations—namely, programs. Programs can be stored on hard disk, CD-ROM, or other media, but the essence of
software is the set of instructions that makes up the programs, not the physical
media on which they are recorded.
Analytical Engine
The analytical engine had four components: the store
(memory), the mill (computation unit), the input section (punched-card reader),
and the output section (punched and printed output). The store consisted of 1000
words of 50 decimal digits, each used to hold variables and results. The mill could
accept operands from the store, then add, subtract, multiply, or divide them, and finally return the result to the store. Like the difference engine, it was entirely mechanical.
The von Neumann machine had five basic parts:
the memory, the arithmetic
logic unit, the control unit, and the input and output equipment.
Together, the arithmetic logic unit and the control unit formed the
‘‘brain’’ of the computer. In modern computers they are combined onto a single
chip called the _______
CPU (Central processing Unit)
Inside the arithmetic logic unit was a special internal 40-bit register called the
_______. A typical instruction added a word of memory to the accumulator
or stored the contents of the accumulator in memory.
accumulator
bus
a collection of parallel
wires used to connect the components of a computer. This architecture was a
major departure from the memory-centered IAS machine and has been adopted by
nearly all small computers since
Moore’s law has created what economists call a ____ _____. Advances in
technology (transistors/chip) lead to better products and lower prices. Lower
prices lead to new applications.
virtuous circle
Cloud computing
mainframe computing V2.0. The idea here is that everyone will have one or more simple devices, including PCs, notebooks, tablets, and smartphones that are essentially user interfaces to the cloud
cache memory
used to hold the most commonly used memory words inside or
close to the CPU, in order to avoid (slow) accesses to main memory.
CPU (Central Processing Unit)
‘‘brain’’ of the computer. Its function is to
execute programs stored in the main memory by fetching their instructions, examining them, and then executing them one after another.
The components are connected by a _____, which is a collection of parallel wires for transmitting address,
data, and control signals. Buses can be external to the CPU, connecting it to memory and I/O devices, but also internal to the CPU, as we will see shortly. Modern
computers have multiple buses.
bus
CPU:
control unit
responsible for fetching instructions from main memory and determining their type.
CPU:
arithmetic logic unit
performs operations such as addition and Boolean AND needed to
carry out the instructions.
CPU:
high-speed memory
used to store temporary
results and certain control information. This memory is made up of a number of
registers, each having has a certain size and function. Usually, all the registers
have the same size. Each register can hold one number, up to some maximum determined by its size. Registers can be read and written at high speed since they are internal to the CPU.
CPU register:
Program Counter (PC)
points to the next instruction to be fetched for execution. ( The name ‘‘program counter’’ is somewhat misleading because it has nothing to do with counting anything, but the term is universally used.)
CPU register:
Instruction Register (IR)
holds the instruction currently being executed.
data path
consists of the registers (typically 1 to 32), the ALU (Arithmetic Logic Unit), and several buses connecting the pieces.
Register-memory
allow memory words to be
fetched into registers, where, for example, they can be used as ALU inputs in subsequent instructions. (‘‘Words’’ are the units of data moved between memory and
registers. A word might be an integer.
The process of running two operands through the ALU and storing the result
Data path cycle
Fetch-decode-execute cycle-
CPU executes these instructions in a series of small steps:
- Fetch the next instruction from memory into the instruction register.
- Change the program counter to point to the following instruction.
- Determine the type of instruction just fetched.
- If the instruction uses a word in memory, determine where it is.
- Fetch the word, if needed, into a CPU register.
- Execute the instruction.
- Go to step 1 to begin executing the following instruction.
A program that fetches, examines, and executes the instructions of another
program
interpreter
A direct hardware (i.e., not interpreted) implementation was used only on the most expensive models.
Simple computers with interpreted instructions also some had other benefits.
Among the most important were
- The ability to fix incorrectly implemented instructions in the field, or
even make up for design deficiencies in the basic hardware. - The opportunity to add new instructions at minimal cost, even after
delivery of the machine. - Structured design that permitted efficient development, testing, and
documenting of complex instructions.