0% found this document useful (0 votes)
16 views

Chapter 3

The document discusses the hardware components of a computer system including the CPU, memory, buses, and virtual memory. It describes what each component is, its functions, and characteristics like volatile vs non-volatile memory.

Uploaded by

Hein
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Chapter 3

The document discusses the hardware components of a computer system including the CPU, memory, buses, and virtual memory. It describes what each component is, its functions, and characteristics like volatile vs non-volatile memory.

Uploaded by

Hein
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Hardware

 Hardware is the physical part of the computer system.


 Example of hardware is CPU, RAM, ROM, secondary storage, keyboard,
mouse and so on.

CPU
 CPU means central processing unit.
 CPU is the main device of the computer that controls the manipulation of
data that come from the computer’s hardware or software.
 CPU contains three different parts that are Arithmetic/Logic
Unit(ALU),Control Unit(CU) and Registers.

Embedded system
 The system can only work specific task that is also called Embedded system.

Arithmetic/Logic Unit(ALU)
 The circuits that perform the operations on the data.
 ALU carries out calculations and makes logical decisions and the immediate
access store(RAM)

Control Unit(CU)
 The circuit coordinates the activities of the CPU.
 CU controls the input and output devices.
 The circuits send the control signal to another part of the CPU.
 A control unit receives data from another peripheral device and translates
it into control signals that are delivered to the processor.
 The control unit fetches internal program instructions from the main
memory to the processor instruction register and generates a control signal
based on the contents of this register to supervise the execution of this
instruction.

Registers
 Quick,small stores of data within the CPU.
 Storage location inside the CPU used to hold an instruction, an address, or
other data.
 That are extremely fast to access but there are usually only a relatively
small number of them.

Common Register
 Accumulator holds the result of calculations performed by the ALU.All input
and output from the CPU pass through the accumulator.
 Program counter holds the memory address of the next instruction to be
fetched.
 Current Instruction register holds the instruction currently being executed.
Main Memory
 Main memory is directly accessible by the CPU.
 Main memory also includes RAM,ROM ,but in practice usually refers to
RAM

Volatile memory loses its data when power is lost.


Non-volatile memory retains its data when power is
lost.

 RAM is volatile type memory.


 Storage devices are non-volatile type memory.
 Main memory is also called primary storage.

RAM
 RAM means Random accesss memory.
 RAM is the primary storage device.
 RAM has quick read/write times,and its function is to load open programs
and operating system data currently in use from the slower secondary
storage,so it can be accessed directly by the CPU.
 It is volatile memory.
ROM
 ROM can only be read., can’t be changed once programmed.
 Use to store the start-up instruction which tells the computer what to do
when it is started up.
 ROM is a non-volatile memory type so that can retain data when power is
lost.
 It is used to store the permanent data.

Cache
 Cache is a type of memory that stores copies of
frequently used data.
 Cache is much faster than RAM, though has a much
lower capacity.
 Cache is physically closer to the processor.

Virtual Memory
 A memory management procedure needed
when the RAM is full
 The OS(operating system) creates a temporary
section of volatile memory in the secondary
storage.
 Data from processes not currently being used
are sent as pages from the RAM to the virtual
memory. When they are needed they are swapped back.
 It is much slower than RAM so it cannot use for real-time applications.

How works(Virtual Memory)


 A process running on the computer may need to store data in the physical
memory(RAM).
 If there is no free space, he memory manager will swap out some of the
data stored in RAM to the swap area on the hard disk drive. Then,it will
swap in the requested data into the free area.
 Least recently used stored data is swapped out.
Disadvantage(Virtual memory)
 Read/write speed is slower than RAM, hard disk is not designed for small
pieces of data.
 the software performance will be drop.
Can be caused disk thrashing which means that a hard disk is being
overworked by moving information between the system memory and
virtual memory excessively.

Flash Memory
 Flash memory is non-volatile storage.
 Flash memory is solid state device which means that there is no moving
part.
Von Neumann Architecture
 The computer in which the processing
instructions are stored in memory with the
data is called a stored-program
computer(stored program concept) or a von
Neumann architecture computer.
 Instruction are executed sequently.
 One instruction at a time is fetched from memory and passed to the CPU.

Clock
 Computers have a system clock that provides timing signals to synchronize
circuits and also in shown in Hz
 The speed of the CPU is measured in clock frequency.
 The faster the clock speed,the faster the rate of processing.
 Generally 3Mhz clock CPU is more faster than 2Mhz CPU.

The disadvantage of a higher clock speed


 The processor generate a large amount of heat and this increases as the
clock speed increase.
 More expensive to install because fan and heat sink is required to protect
against excess heat of the CPU.
 Processors with clocks speeds of 9 GHz require cooling by liquid nitrogen.
Fetch-Execute Cycle
Fetch
The next instruction is retrieved by the CPU from the main memory.
Decode

The instruction is broken down to its individual components to determine


What the instruction is and what data is being used.

Execute

The instruction is completed by the CPU.

The fetch-decode-execute cycle


The fetch-decode-execute cycle is a key feature of the von Neumann
architecture and consists of seven stages.
1. The memory address held in the program counter PC is copied into
the memory address register (MAR).
2. The address in the program counter is incremented by one.The
program counter now holds the address of the next instruction to be
fetched.
3. The processor sends a signal along the address bus to the memory
address held in the MAR.
4. The instruction or data held in that memory address is sent along the
data bus to memory data register (MDR).
5. The instruction or data held in the MDR is copied into the current
instruction register(CIR).
6. The instruction or data held in the CIR is decoded and then executed.
Results of processing are stored in the accumulator (ACC).
7. The cycle returns to step one.
Address,Data and Control Buses
Bus
 Bus is a collection of wires through which data is transmitted.
 The speed of a bus is measured in Megahertz(Mhz) or Gegahertz(GHz).
 The size of a bus (its width) is how many bits it can transfer at a time.Eg. 64 bits
computer has buses with 64-bit widths.
 Bus can be unidirectional or bidirectional.
 Bus can be classified into three types which are Address, Data and Control bus.

Address bus
 An address bus sends a memory
address along the bus from the CPU
to the memory.
 To fetch/write data, the CPU needs
to tell the RAM the address
 The address bus type is
unidirectional.

Data bus
 A data bus sends the actual data to
and from the memory.
 The data bus type is bidirectional.

Control bus
 A control bus carries commands from the CPU and status message from
other hardware devices.
 The control bus type is bidirectional.

You might also like