0% found this document useful (0 votes)
20 views71 pages

CH 3-Hardware 3.1 Comp Architecture

The document provides an overview of computer hardware architecture, focusing on the central processing unit (CPU) and its components, including microprocessors, the von Neumann architecture, and the fetch-execute cycle. It explains the roles of the control unit, arithmetic logic unit, registers, and buses in processing instructions and data. Additionally, it discusses factors affecting CPU performance, such as clock speed, bus width, cache memory, and the number of cores.

Uploaded by

Rusty Engine
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)
20 views71 pages

CH 3-Hardware 3.1 Comp Architecture

The document provides an overview of computer hardware architecture, focusing on the central processing unit (CPU) and its components, including microprocessors, the von Neumann architecture, and the fetch-execute cycle. It explains the roles of the control unit, arithmetic logic unit, registers, and buses in processing instructions and data. Additionally, it discusses factors affecting CPU performance, such as clock speed, bus width, cache memory, and the number of cores.

Uploaded by

Rusty Engine
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/ 71

UNIT 3 : 3.

1 COMPUTER
HARDWARE ARCHITECTURE
3.1.1 The central processing unit (CPU)

 Thecentral processing unit (CPU) is


responsible for the execution or processing
of all the instructions and data in a
computer application
 CPU is very often installed as an integrated
circuit on a single microchip.
Microprocessor

A microprocessor is an integrated circuit


(microchip) – also referred to as a
processor or CPU.
 The microprocessor contains the ALU and
control unit to enable it to interpret and
execute all instructions and carry out
arithmetic operations.
Von Neumann Architecture: Main
Features
The von Neumann architecture had the following main
novel features (none of which were available in computers
prior to the mid-1940s):
 The concept of a central processing unit (CPU or
processor)
 The CPU was able to access the memory directly
 Computer memories could store programs as well as data
 Stored programs were made up of instructions which
could be executed in sequential order.
4
Von Neumann Architecture

5
Stored –Program Concept

The von Neumann architecture is based on the concept of a stored-


program computer.
 A modern stored-program computer is one that keeps its program
instructions and data in RAM.
 Computer follows the instruction in program to read, process and produce results
 The program will state what processing is required.

6
3.1.2 Components of the central
processing unit (CPU)

Arithmetic &
Control Unit
Logic Unit Registers
(CU)
(ALU)

System
Buses
clock
Control unit Main Function

The control unit Signals are The control unit


reads generated ensures
Controls the
instructions from during the synchronisation
interaction
memory. PC Fetch-Decode- of data flow
between
stores stores the Execute cycle and program
different parts of
address of to control all instructions
the CPU.
instruction to be components of throughout the
executed the computer. computer.

8
Arithmetic Logic Unit (ALU)

ALU performs The arithmetic part Multiplication


arithmetic (+, - uses the operators and division are
It is possible for
and shifting) or such as multiply, carried out by a
a computer to
logic (e.g. AND, divide, add and sequence of
subtract. The logic
have more than
OR) operations. addition,
part carries out one ALU to carry
Values needs to subtraction and
comparison such as out specific
be placed in left or right
‘equal to’, ‘greater functions.
accumulator for logical shift
calculations. than’, ‘less than’. operations

9
Function of System clock

A system clock is
The clock ensures
used to produce
without the clock that the various
timing signals on
the computer circuits inside a
the control bus to
would simply computer work
ensure this vital
crash! together at the
synchronisation
same time.
takes place

10
Role of Immediate Access Store In
Processing
 Immediate access store (IAS) is a memory that holds all data and
programs needed to be accessed by the control unit
 The RAM is often referred to as the Immediate Access Store (IAS).
 The CPU takes data and programs held in backing store (e.g. a
hard disk drive) and puts them into RAM temporarily. This is done
because read/write operations carried out using the RAM
 The key data needed by an application will be stored
temporarily in RAM to speed up operations.
11
Buses

 system buses – a connection between major component in a


computer that can carry data, addresses or control signals.
 The components of the model need to be connected to one
another and this is usually done through buses.
 (System) buses are used in computers as parallel transmission
components; each wire in the bus transmits one bit of data.
 There are three common buses used in the von Neumann
architecture known as: address bus, data bus and control bus.

12
Function Of Three Buses
13
Processor (This
includes the control Memory Unit
unit)

Type of Description of Bus Data/Signal


Bus Direction I/O
Device
Input and
Address Carries signals relating to unidirectional Output

bus addresses between memory and I/O


Device
processor

Data bus Sends data between the Bi-directional


processor, the memory unit

Control Carries signal relating to the Both


bus control and coordination of all unidirectional
activities within the computer. and bi-
E.g. read and write functions directional
One of the key features of von Neumann computer architecture is
the use of buses. Three buses and three descriptions are shown
below. Draw a line to connect each bus to its correct description
[Q 7 (a) 2210/11/M/J/15]
PAST
PAPERS
QUESTIONS

[2]
(b) The seven stages in a von Neumann fetch-execute cycle are shown in
the table below. Put each stage in the correct sequence by writing the
numbers 1 to 7 in the right hand column. The first one has been done for
you [Q 7 (b) 2210/11/M/J/15]
PAST
PAPERS
QUESTIONS
Register

These are internal memory locations within


the CPU. They temporarily hold
data and instructions during processing. A
register can be general or specific in its use; it
holds data or instructions as part of the
Fetch–Decode–Execute cycle

17
18
Von Neumann Architecture:
Concept of a Register
Register Meaning

PC Program Counter

CIR Current Instruction Register

MAR Memory Address Register

MDR Memory Data Register

IR/IX Index Register

Accumulator Holds results


Registers

• It contains the address of the next instruction to


Program Counter(PC) be executed. It is in control unit

Current Instruction • It contains the current instruction being


Register(CIR) processed. It is in control unit
Memory Address • It is used to hold the memory address that
contains either the next piece of data or an
Register(MAR) instruction that is to used. It is in processor.
• It acts like a buffer and holds anything that is
Memory Data Register copied from memory ready for the processor to use
it. It is in processor.
• temporary general-purpose register that stores
Accumulator
19
numerical values at any part of a given operation
Registers : Von Neumann Architecture

C
20
Memory Unit

The computer memory unit is made up of a


Address Content
number of partitions. Each partition consists
1111 0000 0111 0010
of an Address and its contents. An address is
1111 0001 0101 1011
the location of where data can be found in 1111 0010 1101 1101
Computer memory. 1111 0011 01111011

1111 1100 1110 1010


1111 1101 1001 0101
1111 1110 1000 0010
1111 1111
21
0101 0101
22
Read Operation
Address Content

1111 0000 0111 0010 Read Operation: To read the contents of


11110001
1111 0001 0101 1011
• The address of the location 11110001 is
1111 0010 1101 1101 written in MAR.
1111 0011 01111011 MAR 1 1 1 1 0 0 0 1

• A ‘read signal’ is sent to the computer


memory using the control bus. Then the
1111 1100 1110 1010 contents of 11110001 are put into MDR
1111 1101 1001 0101 MDR
1111 1110 1000 0010 0 1 0 1 1 0 1 1
1111 1111 0101 0101
Write Operation
Address Content

1111 0000 0111 0010


Write Operation: To write a 10010101 into
the location 11111101
1111 0001 0101 1011 • Data stored is first written into the MDR
1111 0010 1101 1101 MDR 1 0 0 1 0 1 0 1
1111 0011 01111011
• This data has to be written into memory
location with the address 1111 1101; so
this address is now written into MAR
1111 1100 1110 1010 MAR
1111 1101 1001 0101 1 1 1 1 1 1 0 1
1111 1110 1000 0010
• A write signal is sent to memory using
1111 1111 0101 0101 control bus
23
Read Cycle

 Place the address of the location to be read on the address


bus via MAR.
 Activate the memory read control signal on the control bus.
 Wait for the memory to retrieve the data from the addressed
memory location.
 Read the data from the data bus into MDR.
 Drop the memory read control signal to terminate the read
cycle.

24
Write Cycle

 Place the address of the location to be written on the


address bus
 Place the data to be written on the data bus
 Activate the memory write control signal on the control bus
 Wait for the memory to store the data at the addressed
location,
 Drop the memory write control signal to terminate the write
cycle.

25
4.1.6 Fetch-execute cycle

Fetch
 The next instruction is fetched from the memory address currently stored in the program
counter (PC) and is then stored in the current instruction register (CIR).
 The PC is then incremented (increased by 1) so that the next instruction can be processed.
 This is decoded so that each instruction can be interpreted in the next part of the cycle.
Execute
 The processor passes the decoded instruction as a set of control signals to the appropriate
components within the computer system.
 This allows each instruction to be carried out in its logical sequence.
FETCH-DECODE-EXECUTE CYCLE
The Fetch-Execute Cycle
The program counter(PC) contains the address of the memory location of the next 30
instruction which has to be fetched.

This address is then copied from PC to the memory address register(MAR); this is done
using the address bus.

The contents (instruction) at the memory location (address) contained in MAR are then
copied temporarily into the memory data register (MDR)

The contents (instructions) of the MDR are then copied and placed into the current
instruction register (CIR)

The value in the PC is then incremented by 1 so that it now points to the next instruction,
which has to be fetched.

The instruction is finally decoded and then executed by sending out signals(via the control
bus) to the various components of the computer system.
(b) The seven stages in a von Neumann fetch-execute cycle are shown in
the table below. Put each stage in the correct sequence by writing the
numbers 1 to 7 in the right hand column. The first one has been done for
you [Q 7 (b) 2210/11/M/J/15]
PAST
PAPERS
QUESTIONS
Q The computer processes instructions using the fetch–decode–execute
(FDE) cycle. Draw and annotate a diagram to show the process of the fetch
stage of the FDE cycle.
Terms to be Used

cache •Temporary memory using static RAM to hold frequently


used data/instructions.

•Changing the clock speed of a system clock to a value


Overclocking higher than the factory/recommended setting

Core •A unit on a CPU made up of an ALU, control unit and


registers; a CPU may contain a number of cores

Dual core •A CPU containing two cores

Quad core •A CPU containing four cores


System
clock
Factors to Determine CPU Performance

Width
Use of
of
Cores
buses
CPU
PERFORMANCE

Use of cache
Overclocking
memories
Role of System Clock

 By increasing clock speed, the processing speed of the


computer is also increased (a typical current value is 3.5 GHz –
which means 3.5 billion clock cycles a second).
 Although the Increase in speed of the computer may not
indicate that computer’s overall performance is increased by
using a higher clock speed
Width of buses

 The width of the address bus and data bus can also affect computer
performance.
 The wider the address bus, the more memory locations that can be directly
addressed at any given time, e.g. a bus of width 16 bits can address 2^16 (65
536) memory locations whereas a bus width of 32 bits allows 4 294 967 296
memory locations to be simultaneously addressed.
 The wider the data bus the larger the word length that can be transported.
(Word =group of bits which can be regarded as a single unit e.g. 16-bit, 32-bit
or 64-bit word lengths are the most common.)
 Larger word lengths can improve the computer’s overall performance
39
Overclocking

 Overclocking is a factor to consider. The clock speed can be


changed by accessing the BIOS (Basic Input/Output System)
and altering the settings.
 Higher clock speed can lead to following problems:
 Unsyncronised operations
 Overheating

An instruction is unable to
complete in time before the next
one is due to be executed
40
Use of Cache

 The use of cache memories can also improve CPU performance.


 Cache memory is located within the CPU itself, which means it has
much faster data access times than RAM.
 Cache memory stores frequently used instructions and data that need
to be accessed faster, which improves CPU performance.
 When a CPU wishes to read memory, it will first check out the cache
and then move on to main memory/RAM if the required data isn’t
there.
 The larger the cache memory size the better the CPU performance.
41
Use of Cores

 The use of a different number of cores can improve computer


performance.
 One core is made up of an ALU, a control unit and the registers.
 Many computers are dual core (the CPU is made up of two cores) or quad
core (the CPU is made up of four cores).
 Doubling the number of cores doesn’t necessarily double the computer’s
performance as CPU needs to communicate with each core reducing
overall performance.
Use of Cores :Example

 with a dual core the CPU communicates with


both cores using one channel reducing some
of the potential increase in its performance:
 with a quad core the CPU communicates with
all four cores using six channels, considerably
reducing potential performance
 So all these factors need to be taken into
account when considering computer
performance.
43
Lets Summarize : Factors affecting
CPU Performance

 Increasing bus width (data and address buses) increases the


performance and speed of a computer system
 Increasing clock speed will potentially increase the speed of a
computer
 A computer’s performance can be changed by altering bus width,
clock speed and use of multi-core CPUs
 Use of cache memories can also speed up a CPU’s performance.

45
Terms Used to be used

• Part of a machine code instruction that


opcode identifies what action the CPU has to perform

• Part of a machine code instruction that


operand identifies what data is to be used

• The complete set of all the instructions in


instruction set machine code that can be recognized and executed
by CPU
3.1.4 Instruction Set

 A computer instructions are a set of operations which are decoded in sequence.


 Each operation will instruct the ALU and CU.
 An operation is made up of an opcode and an operand.
 The Fetch–Decode–Execute cycle is the sequence of steps used by the CPU to
process each instruction in sequence.
 One example of an instruction set is the X86, a common CPU standard used in
many modern computers.
 Different computer manufacturers will adopt their own internal electronic design, if
the computer is based on the X86 CPU then all designs will share almost identical
instruction sets.
 Some examples of instruction set operations include: ADD, JMP, LDA, and so48
on.)
Difference between Instruction Set
and programming code

Instruction sets are the low-level language


instructions that instruct the CPU how to carry out
an operation where as program is a set of
instruction used to solve a task and is converted
into instruction set using compiler or interpreter.

49
3.1.5 Embedded systems

An embedded system is
a combination of
hardware and software
which is designed to
carry out a specific set
of functions
3.1.5 Embedded systems

 Embedded systems are computers that are built within other


devices to perform a single specific task within a larger system.
 Embedded computers use usually micro-controller devices,
such as the Raspberry Pi or Arduino, and are often used
‘headless’ – the device operates without a monitor / mouse /
keyboard.
 Embedded systems usually come with operating systems pre-
installed, often on ROM memory chips, rather than HDD Drives.
Embedded Systems can based on

• It is a CPU with RAM and ROM and other


Microcontrollers peripherals all embedded onto one single chip
(together they carry out a specific task)

• integrated circuit which only has a CPU on the


Microprocessor chip (there is no RAM, ROM or peripherals –
these need to be added)

System on chips • this may contain a microcontroller as one of its


components (they almost always will include
(SoC) CPU, memory, input/output (I/O) ports
53
How embedded systems work?
54
Embedded Systems: Inputs & outputs

• Manual using a keypad/dial on an oven control panel)

Inputs
• Automatic source, such as a sensor.
• This sensor input will be analogue or digital in nature, for
example, inputs such as oxygen levels or fuel pressure in a
car’s engine management system.

• Carrying out the function of the embedded system by

Outputs
sending signals to the components that are being
controlled (for example, increase the power to the heating
elements in an oven or reduce fuel levels in the engine).
Methods of upgrading programmable Devices 55

Connecting the
device to a computer
update the maps
for the download of
on a GPS system
updates to the
software
Embedded Systems

Programmable Upgraded
updates to
Automatic updates engine
via a Wi-Fi, satellite or management
cellular (mobile phone systems and
network) link other
components

Non Cannot be To be replaced


Programmable upgraded
56
Benefits and Drawbacks
57
Embedded Systems

 Embedded systems can be connected to the internet, therefore devices


can be controlled remotely using a smartphone or computer.
Examples:

1- Setting the central heating system to switch on or off while away from
home
2- Remotely instructing a set top box to record a television programme.
 Applications :
 single microcontroller in an MP3 player
 complex array of multiple units in a medical imaging system
Are computers embedded systems?

A computer is not an example of an embedded


system. Computers are multi-functional (that is,
they can carry out many different tasks which
can be varied by using different software) which
means they can’t be classed as embedded
systems.
3.1.5 Examples of the use of embedded
systems

 Motor vehicles
 Set-top box
 Security systems
 Lighting systems
 Vending systems
 Washing machines
60
Motor vehicles

 Modern cars
have many
parts that rely
on
embedded
systems to
function
correctly
Set-top box

 Embedded system records and playbacks television programmes.


 Can be operated remotely by the user when not at home using an
internet-enabled device or by using the interface panel when at home.
 The embedded system will look after many of the functions involving
inputs from a number of sources such as a Solid State Device (SSD)
(where television programmes can be stored or retrieved) or a satellite
signal (where it will be necessary to decode the incoming signal).

61
Set-top box

62
Security systems

 The security code is set in RAM and the alarm activated or


deactivated using the keypad.
 Data from sensors is sent to the controller which checks against
values stored on the SSD (these settings are on SSD rather than
RAM in case the sensitivity needs to be adjusted).
 An output can be a signal to flash lights, sound an alarm or send a
message to the home owner via their mobile phone.
 The home owner can interface with the system remotely if
necessary.
63
Security systems

64
Lighting systems

 There are many internal and external lighting systems that could be controlled by
embedded systems : Examples are
 In a large office to safe energy
 A fountain light display or a light show on a building to commemorate a special
occasion.
 Emergency lighting for example, aeroplanes in case of an emergency.
 Some lighting systems use Bluetooth light bulbs. This allows the embedded system to
control each bulb independently. Many of the bulbs available today use LEDs and
many come in a number of colours to change the mood.
 An embedded system can automatically control the lighting using a number of inputs
(such as light sensors) and key data stored in memory. 65
Lighting systems In Offices

 In a large office. The system needs to control the lighting taking into
account:
 The time of day or day of the week : To save energy
 whether the room is occupied : low lighting when unoccupied
 the brightness of the natural light : on bright sunny days dim the
light

66
Vending systems

 Vending machine is an embedded system in the form of a microcontroller.


 Inputs to this system come from the keypad (item selection) and from sensors (used to
count the coins inserted by the customer, the temperature inside the machine and a ‘tilt
sensor’ for security purposes). The outputs are:
 actuators to operate the motors, which drive the helixes to give the customers their selected
item(s)
 signals to operate the cooling system if the temperature is too high
 item description and any change due shown on an LCD display panel
 data sent back to the vending machine company so that they can remotely Check sales
activity (which could include instructions to refill the machine) without the need to visit each
machine.
 All of this is controlled by an embedded system which makes the whole operation
automatic but also gives immediate sales analysis.
Vending systems

70
Washing Machines

 Many ‘white goods’ (such as refrigerators, washing


machines, microwave ovens, and so on) are controlled
by embedded systems.
 They all come with a keypad or dials that are used to
select the temperature, wash cycle or cooking
duration.
 This data forms the input to the embedded system,
which then carries out the required task without any
further human intervention.
 These ‘white goods’ can also be operated remotely
using an internet-enabled smartphone or computer. 71

You might also like