Anda di halaman 1dari 7

PCS222: INTRODUCTION TO COMPUTER ARCHITECTURE

Q1. Virtually all contemporary computers are based on concepts developed by John
von Neumann who designed the von Neumann architecture, briefly describe this
architecture indicating the following:
a. Its basic hardware subsystems
b. Its characteristics
c. The functions of the major subsystems within the CPU

Ans:

The von Neumann architecture has the following characteristics.

It contains three basic hardware subsystems


1. a CPU
2. a main-memory system
3. an I/O system

Its characteristics
Both programs and data are stored in the single memory system.

Instructions are executed in a sequential fashion unless the flow of control is explicitly altered by
a branch type instruction.
There is a single path between the main memory and the control unit of the CPU.
The functions of the major subsystems within the CPU

The major subsystems within the CPU are:


the control unit (CU): which selects and interprets machine instructions and coordinates
the various parts of the computer in executing these instructions.
the arithmetic logic unit (ALU): which performs arithmetic, logical and shift operations
on the operands and generates the results.
a register set: which serves as internal storage within the CPU to hold operands and
intermediate values during instruction fetch and execution

Q.2(a) using a practical example compare computer Architecture and Computer


Organization.
Ans:

To clarify the difference between implementation and architecture, the following examples can
be considered:

The architecture of a piano is defined by the user visible interface which is the layout of
the keyboard. The keyboard consists of 88 keys, 36 black and 52 white keys. Each key
corresponds to a specified note. Once a player learns this correspondence, then the player
can use any piano that adheres to this architecture. The implementation, on the other
hand, could employ the striking of strings or the electrical stimulation of oscillators to
generate the sounds produced by the piano. The implementation could be in the form of a
grand piano or an upright; it could employ plastic or ivory keys.

The architecture of an analog clock specifies that there are at least two hands, a minute
hand (the larger hand) and an hour hand (the smaller hand). The relative positions of
these hands on the face of the clock indicate the time of day. Once the correspondence
between the positions of the hands and the indicated time are understood (i.e. once the
architecture is known) any analog clock may be used to tell the time. The implementation
of the clock on the other hand, may specify that Arabic or roman numerals or some other
type of marks be used on the face of the clock. The implementation would also determine
whether a spring or a battery powered oscillator is used to power the clock.

(b).

Suppose that a program runs in 10 seconds on computer A, which has a 100 MHz clock. If a
technique is employed to increase the clock rate of the computer, but the technique causes the
modified computer to require 1.2 times as many clock cycles as the original machine, what new
clock rate would be needed to yield an execution time on the modified machine of 6 seconds?
Ans:

Solution:
The number of clock cycles required on the original machine is given by:
CPU Clock Cycles = CPU Time x Clock Rate
- 10 seconds x 100 x 106 Cycles / Second
CPU clock cycles = 109 cycles
The clock rate required for a 6 second CPU time is given by:
Clock Rate =

CPU Cycles
CPU Time

1.210 9
6 seconds

= 200 MHz

The modified machine would therefore require twice the clock rate to run the
program in 6 seconds.

Q3.

Suppose that a program runs in 10 seconds on computer A, which has a 100 MHz clock. If a
technique is employed to increase the clock rate of the computer, but the technique causes the
modified computer to require 1.2 times as many clock cycles as the original machine, what new
clock rate would be needed to yield an execution time on the modified machine of 6 seconds?
Ans:

Solution:
The number of clock cycles required on the original machine is given by:
CPU Clock Cycles = CPU Time x Clock Rate
- 10 seconds x 100 x 106 Cycles / Second
CPU clock cycles = 109 cycles
The clock rate required for a 6 second CPU time is given by:
Clock Rate =

CPU Cycles
CPU Time

1.210
6 seconds

= 200 MHz

The modified machine would therefore require twice the clock rate to run the
program in 6 seconds.

Q4. Outline EIGHT (8) characteristic differences between RISC and CISC.
Table 1: Characteristics of RISC and CISC
RISC
Simple instructions taking 1 cycle
Only LOADS/STORES reference Memory
Highly Pipeline
Instructions executed by hardware
Fixed format instructions
Few instructions and addressing modes
Complexity is in the compiler

CISC
Complex instructions taking multiple cycle
Any instruction may reference memory
Less pipelined (some are not pipelined at all)
Instructions are interpreted by microcode
Variable format used for instructions
Numerous instructions and addressing modes
Complexity is in the microcode

Multiple register sets

Single register set

Q5(a). What is the single precision IEEE floating point representation of the decimal value 0.1?

Multiplying repeatedly by 16 to convert to a hex fraction yields:


0.1 x 16 = 1.6 = first digit in hex fraction is 1
0.6 x 16 = 9.6 = next digit in hex fraction is 9
0.6 x 16 = 9.6 = all remaining digits will be 9s
Hence 0.110 = 0. l99999916 = l.10011001100110011001100 x 2-4
The characteristic is -4 + 127 = l2310 = 011110112
Therefore the IEEE single precision representation is
s
characteristic
mantissa
0
01111011
10011001100110011001100
Converting this pattern back to the represented decimal number yields
l.l00l1001l001l0011001102 x 24 = l.l00l1001l001l0011001102 x 2-22 x 2-4
= 66666616 x 2-26 = 0.09999999410

Q5(b).

Suppose that a program runs in 10 seconds on computer A, which has a 100 MHz clock. If a
technique is employed to increase the clock rate of the computer, but the technique causes the
modified computer to require 1.2 times as many clock cycles as the original machine, what new
clock rate would be needed to yield an execution time on the modified machine of 6 seconds?
Ans:

Solution:
The number of clock cycles required on the original machine is given by:
CPU Clock Cycles = CPU Time x Clock Rate
- 10 seconds x 100 x 106 Cycles / Second
CPU clock cycles = 109 cycles
The clock rate required for a 6 second CPU time is given by:

CPU Cycles
CPU Time

Clock Rate =

1.210
6 seconds

= 200 MHz

The modified machine would therefore require twice the clock rate to run the
program in 6 seconds.

Q6.(a) In communicating with the memory system, the CPU must supply three types of
information, state them.

1. The address within memory to be accessed


2. The type of operation to be performed (read or write)
3. The data to be written (in the case of writes)

(b) Explain the Big-and Little Endian Memory Organizations


a. Big-and Little Endian Memory Organizations
For operands that are more than one byte in size, the CPU expects the byes to be in a certain
order when fetching the data. There are generally two ways of organizing the bytes in memory.
One is called Big-Endian byte ordering and corresponds to the data being stored with the most
significant byte at the lowest address and the least significant byte at the highest address. For
example, consider the 32-bit hex integer 12345678. If this value were stored beginning at
location 0, it would occupy byte locations 0, 1, 2 and 3 on a byte-addressable system and be
stored as shown below:
12

34

56

78

03
Big-endian ordering of hex value 12345678

With Little-Endian byte ordering the least significant byte of the data item would be stored at the
lowest address and the most significant byte would be stored at the highest address:
78
1

56

34

12
03

Little-Endian Ordering of the hex value 12345678

Anda mungkin juga menyukai