100% found this document useful (1 vote)
3K views

Q # 1 What Is Machine Cycle in Computer and How It Works?

The machine cycle is the basic operation performed by the CPU and consists of three main steps: fetch, decode, and execute. During fetch, the CPU retrieves an instruction from memory. In decode, the instruction is translated into computer commands. Finally, in execute, those commands are carried out. Pipelining improves processor throughput by allowing multiple instructions to be processed simultaneously as they move through different stages of the pipeline. It divides instruction processing into discrete stages, with different instructions in various stages at any given time.

Uploaded by

Coding Expert
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views

Q # 1 What Is Machine Cycle in Computer and How It Works?

The machine cycle is the basic operation performed by the CPU and consists of three main steps: fetch, decode, and execute. During fetch, the CPU retrieves an instruction from memory. In decode, the instruction is translated into computer commands. Finally, in execute, those commands are carried out. Pipelining improves processor throughput by allowing multiple instructions to be processed simultaneously as they move through different stages of the pipeline. It divides instruction processing into discrete stages, with different instructions in various stages at any given time.

Uploaded by

Coding Expert
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Q#1

What is machine cycle in computer and how it works?

The machine cycle also called processer cycle or instruction cycle, is the basic operation
performed by a central processing unit (CPU). Machine cycle is consisting of three steps that a
computers processor executes and whenever it receives a machine language instruction. They are
fetch, decode and execute. In some cases, store is also incorporate into the cycle.

3 Steps of Machine Cycle:

 Fetch - Retrieve the instruction from memory


 Decode - Translate the retrieved instruction into a series of computer command
 Execute - Execute the computer commands

Fetch:

The control unit requests instructions from the main memory that is stored at a memories
location as indicated by the program controller. (Instruction Counter)

Decode:

Received instructions are decoded in the instruction register. This process involves breaking the
operand files into its components based on the instruction’s operation code. (Opcode)

Execute:

The instructions opcode as it specifies the CPU operation required. The program counter
indicated the instruction sequence from computer. Machine language also called machine code,
refers to instructions coded in patterns of bits i.e.; zero and one that is directly readable and
executable by CPU.
Comment:

Starting from fetch cycle, control units looks at the program counter register (PR) to get the
memory address of the next instruction. It then requests this instruction from main memory
and places it in the instruction register after this control unit checks the instruction that is now
stored within the instruction register. It looks at the instruction which is just a sequence of 0s
and 1s and decides what to be done. The control unit interprets the binary instructions to
answer questions now, the control unit sends the signals that tell the ALU, memory and other
components signals to cause them to perform the correct work.

Q#2

What is a pipelining in a computer and how it works?

Pipelining is a process of accumulating instructions from the processor through a pipeline. It


allows storing and executing instructions in an orderly process. It is also known as pipeline
processing. Pipelining is an implementation of technique where multiple instructions are
overlapped in execution. This process Is divided in different stages and these stages are
connected with one another to form a pipe line structure. Instructions enter at one end, process
through the stages and exit at the other end.

Pipeline does not decrease the time from individual instruction execution. Instead, it increases
instruction throughput.

Pipeline stages are hooked together, all the stages must be ready to proceed at the time. We call
the time required to move an instruction one step further in the pipeline a machine cycle. The
length of the machine cycle is determined by the time required for the slowest pipe stage.
Comment:

Pipeline system is like a modern-day assembly line setup in factories. For example, in a car
manufacturing industry, huge assembly lines are setup and at each point, there are robotic arms
to perform a certain task, and then the car moves on ahead to the next arm.

2 Types of Pipeline:

 Arithmetic Pipeline
 Instruction Pipeline

Arithmetic Pipeline:

This pipeline is usually found in most computers. They are used for floating point operations,
multiplication of fixed-point numbers etc.

Floating point addition and subtraction is done in 4 parts:

 Compare the Components


 Align the mantissas
 Add or subtract mantissas
 Produce the results

Instruction Pipeline:
A stream of instructions can be executed by overlapping fetch, decode and execute phase of an
instruction cycle. This type of technique is used to increase the throughput of the computer
system. Pipeline will be more efficient if the instruction cycle is divided into segments of equal
duration.

You might also like