0% found this document useful (0 votes)
5 views5 pages

Memory and CPU

Primary memory, primarily referring to RAM, is directly accessed by the CPU and temporarily stores data while a computer is running. The fetch-decode-execute cycle is the fundamental operation of a computer, where the CPU retrieves, decodes, and executes instructions continuously. Cache memory acts as a fast intermediary between the CPU and RAM, enhancing processing speed by reducing wait times for data retrieval.

Uploaded by

hnineiphyu2710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Memory and CPU

Primary memory, primarily referring to RAM, is directly accessed by the CPU and temporarily stores data while a computer is running. The fetch-decode-execute cycle is the fundamental operation of a computer, where the CPU retrieves, decodes, and executes instructions continuously. Cache memory acts as a fast intermediary between the CPU and RAM, enhancing processing speed by reducing wait times for data retrieval.

Uploaded by

hnineiphyu2710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Primary memory is computer memory that is accessed directly by the CPU.

This
includes several types of memory, such as the processor cache and system ROM.
However, in most cases, primary memory refers to system RAM.RAM, or random
access memory, consists of one or more memory modules that temporarily store
data while a computer is running. RAM is volatile memory, meaning it is erased
when the power is turned off. Therefore, each time you start up your computer,
the operating system must be loaded from secondary memory (such as a hard
drive) into the primary memory, or RAM

whenever you launch an application on your computer, it is loaded into RAM. The
operating system and applications are loaded into primary memory, since RAM
can be accessed much faster than storage devices. In fact, the data can be
transferred between CPU and RAM more than a hundred times faster than
between the CPU and the hard drive.
Cache memory is a small amount of fast, expensive memory that is used between
two devices that communicate at different speeds, most often the CPU and RAM.
The CPU accesses the cache memory at its own, faster speed. This means the CPU
isn’t slowed by having to wait for data from the RAM.

Fetch-Decode-Execute
- Register
Inside the CPU are a number of memory locations is called register.
five examples of registers
• MAR memory address register
• MDR memory data register
• ALU arithmetic and logic unit
• PC program counter
• CIR current instruction register.
. Program counter (PC): Program counter is sometimes called sequence control register. It stores the
address of the next instruction to be fetched.

Memory address register (MAR): When the next instruction is needed, its address is copied from the PC
and placed in the memory address register.

Memory data registers (MDR): It is sometime called the memory buffer register (MBR) because it acts
like a buffer, temporarily storing a data value before passing it on to e.g. CIR..

Current instruction register (CIR): Holds the instruction that is about to be executed.

The fetch-execute cycle

An instruction cycle (sometimes called fetch-and-execute cycle, fetch-decode-execute cycle, or FDX) is


the basic operation cycle of a computer. It is the process by which a computer retrieves a program
instruction from its memory, determines what actions the instruction requires, and carries out those
actions. This cycle is repeated continuously by the central processing unit (CPU), from boot-up to when
the computer is shut down.
Fetch Phase:-

1. The PC copies the address of the next instruction to be fetched into the Memory Address Register.

2. The Memory Address Register places the address on the Address Bus (one directional channel from
processor to main memory for

transferring addresses of memory locations)

3. The MAR triggers are read signal that causes main memory to place instruction being asked on the
Data Bus (two way channel b/w CPU

and RAM that is used for transferring programs and data).

4. The instruction on the data bus is sent to the MDR/MBR.

5. This instruction is then copied to the Current Instruction Register.

Decode Phase:-

o The CPU will now examine the instruction in the CIR and “decodes” it. This means that a special part of
CPU known as the Decode Unit

will make the rest of the CPU ready to carry out the instruction by sending out microinstructions. Every
CPU has its own set of legitimate

instructions known as the Instruction Set. All software eventually ends up being instructions from this
instruction set.

Execute Phase:-

o After decoding the instruction a special part of the CPU known as the Execute Unit will carry out
execution. After execution the PC will

point towards the next instruction.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy