Nothing Special   »   [go: up one dir, main page]

Computer Org. WRK 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

OCKOURI BARNES

COMPUTER ORGANIZATION #1
COMPUTER SCIENCE
MODULE 1

[1] State the function of the following registers:


 PC: The program counter, PC is a special purpose register that is used by the processor to
hold the address of the next instruction to be executed.

 2. MAR: The memory address register (MAR) is the CPU register that either stores
the memory address from which data will be fetched to the CPU, or the address to which data
will be sent and stored.

 3. MDR: Memory data register holds the contents found at the address held in the MAR or
data which is to be transferred to primary memory.

 4. CIR: Current instruction register holds the instruction that is currently being decoded and
executed. 

 5. Accumulator: It acts as a temporary storage location which holds an intermediate value in


mathematical and logical calculations. Intermediate results of an operation are progressively
written to the accumulator, overwriting the previous value.

[2] i Explain how cache memory works.


When the processor needs an instructon or data it searches memory in the order L1 cache, then
L2 cache, L3 cache (if it exists) then RAM with a greater delay in processing for each level of
memory it must search. I f the instruction or data is not found in memory then it must search a
slower speed storage medium such as a hard disk or optical disc.
[ii] Explain ONE benefit of cache memory.

Cache speeds up processing time because it stores frequently used instructions and data.

[iii] Describe the MAIN activities that take place in an instruction cycle.

 The CPU fetches the information one at a time from the main memory into registers.
 The CPU decodes the instruction.
 The CPU executes the instruction.
 Repeat until there are no more instructions.

[3i] Name and state the function of THREE registers found in the Central Processing Unit
(CPU).

 MDR: Memory data register holds the contents found at the address held in the MAR or data
which is to be transferred to primary memory.

 IR: An instruction register is an element in the central processing unit (CPU) of a computer
or other device that holds the programming instruction that will be executed at the start of the
next clock cycle as dictated by other parts of the CPU.

 MAR: The memory address register (MAR) is the CPU register that either stores
the memory address from which data will be fetched to the CPU, or the address to which data
will be sent and stored.

[ii] Besides registers name TWO other components in the CPU and state the function of EACH.

CU – This unit controls the operations of all parts of the computer but does not carry out any
actual data processing operations.
Functions of this unit are −
 It is responsible for controlling the transfer of data and instructions among other units of
a computer.
 It manages and coordinates all the units of the computer.
 It obtains the instructions from the memory, interprets them, and directs the operation of
the computer.
 It communicates with Input/Output devices for transfer of data or results from storage.
 It does not process or store data.

ALU- Function of arithmetic section is to perform arithmetic operations like addition,


subtraction, multiplication, and division. All complex operations are done by making repetitive
use of the above operations.

Function of logic section is to perform logic operations such as comparing, selecting, matching,
and merging of data.

[iii] Define the term ‘cache memory’ and explain how it increases the efficiency of data retrieval.

A CPU cache is a hardware cache used by the central processing unit of a computer to reduce the
average cost to access data from the main memory. A cache is a smaller, faster memory, located
closer to a processor core, which stores copies of the data from frequently used main memory
locations. 

Cache memory increases a computer’s performance. The cache memory is located very close to
the CPU, either on the CPU chip itself or on the motherboard in the immediate vicinity of the
CPU and connected by a dedicated data bus. So instructions and data can be read from it (and
written to it) much more quickly than is the case with normal RAM. That means that the CPU is
much less likely to be kept waiting or waiting times will be dramatically reduced. The result is
that a very small amount of cache memory can result in a significant increase in the computer’s
performance.

[4] Explain how the ‘fetch’ ‘decode’ ‘execute’ cycle works in a computer.

 The processor checks the program counter to see which instruction to run next.
 The program counter gives an address value in the memory of where the next instruction is.
 The processor fetches the instruction value from this memory location.
 Once the instruction has been fetched, it needs to be decoded and executed. For example, this
could involve taking one value, putting it into the ALU, then taking a different value from
a register and adding the two together.
 Once this is complete, the processor goes back to the program counter to find the next
instruction.
 This cycle is repeated until the program ends.

[5i] Describe TWO main functions of the CPU. Include in your description a definition of the
CPU.

A central processing unit (CPU) also called a central processor, main processor or just processor,


is the electronic circuitry that executes instructions comprising a computer program. The CPU
performs basic arithmetic, logic, controlling, and input/output operations specified by the
instructions in the program.

 Fetch instructions from memory


 Decode into binary instructions
 Execute action and move to the next step
 Stores output to memory

[ii] State the purpose of the fetch operation.

The purpose of the fetch operation is that the computer retrieves a program instruction from its
memory. 

[iii] State the purpose of the decode and execute operations.

The purpose of the decode operation is to establish the action that needs to be done and the
execute operation carries out the instructions.

[iv] Define the term instruction set.


An instruction set is a group of commands for a CPU in machine language. The term can refer to
all possible instructions for a CPU or a subset of instructions to enhance its performance in
certain situations.
[6] There are several registers found in the CPU

[i] What is the collective purpose of these registers?


The collective purpose of registers are to quickly accept, store, and transfer data and instructions
that are being used immediately by the CPU.

[ii] Name THREE registers found in the CPU and for EACH describe its function.
 MDR: Memory data register holds the contents found at the address held in the MAR or data
which is to be transferred to primary memory.

 IR: An instruction register is an element in the central processing unit (CPU) of a computer
or other device that holds the programming instruction that will be executed at the start of the
next clock cycle as dictated by other parts of the CPU.

 MAR: The memory address register (MAR) is the CPU register that either stores
the memory address from which data will be fetched to the CPU, or the address to which data
will be sent and stored.

[7] Define the term clock speed as it relates to the processor. Give two examples of CPU clock
speed using different units of measure.
The speed at which the CPU can carry out instructions is called the clock speed. This is
controlled by a clock. With every tick of the clock, the CPU fetches and executes one
instruction. The clock speed of computers is usually measured in megahertz (MHz) or gigahertz
(GHz). One megahertz equals one million ticks per second, and one gigahertz equals one billion
ticks per second.

You might also like