Professional Documents
Culture Documents
Chapter # 1: William Stallings
Chapter # 1: William Stallings
William Stallings
1.1 Distinction between computer organization and
computer architecture
Computer architecture refers to those attributes of a system visible to a
programmer or, put another way, those attributes that have a direct impact on
the logical execution of a program.
Examples of architectural attributes include the instruction set, the number
of bits used to represent various data types (e.g., numbers, characters), I/O
mechanisms, and techniques for addressing memory.
Input
Transferring of information into the system. This may be through a user
input device - i.e. keyboard, mouse, scanner etc.. Or though previously
loaded software/program, cd etc.
Output
Output is the exact opposite of input. Output is the function that allows a
computer to display information, from the system, for the user. This can be
accomplished through the monitor (or other graphical display), printer,
speakers etc.
Processing
This is where the computer actually does the 'work' - manipulating and
controlling data over the entire system.
Storage
Most computers are able to store data both temporarily (in order to
process), but also long-term (i.e., permanently). Storage takes place on
hard-drives or external storage devices.
1.4 List and define the main structural components of
a computer
5. Is the assembly language for x86 processors the same as those for computer
systems such as the Vax or Motorola 68x00?
No. Each assembly language is based on either a processor family or a specific
computer
1.1.3 Section Review
10. Why would a high-level language not be an ideal tool for writing a program that
directly accesses a particular brand of printer?
A high-level language may not provide for direct hardware access. Even if it does,
awkward coding techniques must often be used, resulting in possible maintenance
problems.
11. Why is assembly language not usually used when writing large application
programs?
Assembly language has minimal formal structure, so structure must be imposed by
programmers who have varying levels of experience. This leads to difficulties
maintaining existing code
1.2.1 Section Review
1. In your own words, describe the virtual machine concept?
Virtual machine concept: Computers are constructed in layers, so that
each layer represents a translation layer from a higher-level instruction
set to a lower-level instruction set.
7. Name the four virtual machine levels named in this section, from lowest
to highest.
Digital logic, instruction set architecture, assembly language, high-level
language.
1.2.1 Section Review
10. Statements at the assembly language level of a virtual machine are translated
into statements at which other level?
Level 2
1.3.7 Section Review
25. What are the hexadecimal and decimal representations of the ASCII
character capital X?
58h and 88d
26. What are the hexadecimal and decimal representations of the ASCII
character capital M?
4Dh and 77d.
1.3.7 Section Review
28. Challenge: What is the largest value you can represent using a 256-bit
unsigned integer?
2^256 -1
29. Challenge: What is the largest positive value you can represent using a
256-bit signed integer?
+2^255 -1
CHAPTER # 2
William Stallings
2.1 What is a stored program computer
Transistors
Resistors
Capacitors
2.4. Explain Moores law.
Clock speeds
Bus width
Number of transistors (microns)
Addressable memory
Virtual memory
CHAPTER # 2
x86_processors
2.1.5 Section Review
1. The central processor unit (CPU) contains registers and what other basic elements?
Control Unit
Arithmetic Logic Unit
The clock.
2. The central processor unit is connected to the rest of the computer system using what
three buses?
Data Bus
Control Bus
Address Bus
3. Why does memory access take more machine cycles than register access?
Conventional memory is outside the CPU, and it responds more slowly to access
requests. Registers are hard-wired inside the CPU.
2.1.5 Section Review
4. What are the three basic steps in the instruction execution cycle?
Fetch
Decode,
Execute.
8. After a program has been loaded into memory, how does it begin execution?
The OS executes a branch (like a GOTO) to the first machine instruction in the
program.
9. Define multitasking
The CPU executes multiple tasks (programs) by rapidly switching from one
program to the next.This gives the impression that all programs are executing at
the same time
2.1.5 Section Review
10. What is the function of the OS scheduler?
The OS scheduler determines how much time to allot to each task, and it
switches between tasks.
11. When the processor switches from one task to another, what values in
the first tasks state must be preserved?
The program counter, the tasks variables, and the CPU registers.
7. In protected mode, which register references the descriptor for the stack
segment?
SS Register
11. Challenge: Can you think of a reason why MS-DOS was not designed to
support protected mode programming?
This is an open-ended question, of course. It is a fact that MS-DOS first
had to run on the 8086/8088 processors, which only supported Real-
address mode. When later processors came out that supported Protected
mode, my guess is that Microsoft wanted MS-DOS to continue to run on
the older processors. Otherwise, customers with older computers would
refuse to upgrade to new versions of MS-DOS.
12. Challenge: In real-address mode, demonstrate two segment-offset
addresses that point to the same linear address?
The following segment-offset addresses point to the same linear address:
0640:0100 and
0630:0200.
2.4.5 Section Review