SlideShare a Scribd company logo
1 of 19
Module 5: Digital Techniques and
Electronic Instrument Systems
5.6 Basic Computer Structure
5.7 Microprocessors
Basic Computer Structure
 CPU
 Memory
 I/O
 Bus
Bus
 Control bus:
 Signals for maintaining and
status information.
 e.g. sets processor in a
specific operation mode.
 Address bus:
 Unidirectional bus, (16 or
32 bits parallel wires) used
for transmitting addresses
to memory.
 Data bus:
 8 / 16 / 32 / 64 bits bi-
directional bus. Data stored
or loaded to / from the
memory.
Central Processor Unit
 Instructions and data
are stored in RAM.
 CPU loads and
decodes an
instruction.
 Loads data needed
from RAM (according
to the instruction) and
stores them in
registers.
 Make calculations if
necessary in registers,
according to the
instruction.
 Stores data back in
RAM.
ARM Register Set
 Registers:
 Small and very fast memories.
 Usually 32 bits each one.
 R15 is the Program Counter: stores the
address of the next instruction.
 CPSR (Current Program Status Register)
used to monitor and control internal
operations.
 e.g. A calculation has been made (e.g. an
addition). Is the result negative? Did it lead to
overflow? Did a carry occur?
ARM Assembly Example
 Very simple and low level commands.
 The CPU decodes them to machine language (i.e.
binary).
 Each instruction requires a different number of CPU
cycles.
CPU Instruction Set
 Each different kind of CPU has each own set of
instructions.
 4 types of instructions:
 Transfer: e.g. Load data from memory to a CPU register for
processing.
 Arithmetic: e.g. add data stored in two registers and put the
result to a 3rd register.
 Logic: e.g. compare data stored in two registers and set the
appropriate flag in the Status Register.
 Control: Set the program counter to a specific memory address.
Arithmetic Logic Unit
 ALU:
 Addition
 Subtraction
 Multiplication
 Comparison
CPU fetch-decode-execute cycle
 5 basic operations:
 Fetch: load a
memory instruction.
 Decode: decode the
instruction.
 Execute: perform
ALU operations.
 Memory access: (In
fact, usually wait for
one CPU cycle, to
ensure consistency).
 Write back: store
results in a register.
 This is the CPU pipeline.
 The operations of the CPU are
decomposed in independent
steps to allow concurrent
operations and increased CPU
performance.
CPU Clock
 Each time the CPU clock “ticks” CPU moves to the
next pipeline stage.
 So, in an 1GHz CPU each pipeline stage takes
1nsec.
Memory
 Instructions and Data are stored in memories.
Types of Memories
 Most common widths: 8, 16, 32, 64 bits. If the memory width is the
same as the instructions length, the processors needs one memory
access to fetch a new instruction.
 ROM (Read Only Memory): Contains an image set at production time
and cannot be reprogrammed (e.g. boot code).
 Flash ROM: Can be rewritten. Used to store device firmware or long-
term data that needs to be preserved after power is off.
 RAM (Random Access Memory).
 DRAM (Dynamic RAM): The storage cells are refreshed after every few
milliseconds, so it needs a DRAM controller.
 SRAM (Static RAM): faster than DRAM, does not require refreshing. Used
in caches.
 SDRAM (Synchronous DRAM): Very fast, it is clocked and synchronizes
itself with the processor clock.
 Memories that lose their data when power is off are called volatile.
(i.e RAM). ROM is non-volatile.
Read Only Memory
 ROM
 PROM (Programmable ROM):
It’s purchased already
programmed. Once
programmed, can never be
reprogrammed.
 EPROM (Erasable PROM):
 Can be reprogrammed using UV
light.
 EEPROM (Electrically EPROM)
are reprogrammed electrically.
(Flash Memories)
 Flash Memories:
 Designed to replace
ROM and RAM.
 Not as fast as
SRAM and ROM.
Flash EEPROM
 Floating gate
transistors.
 Electrons are
“trapped” inside the
float gate and open
the channel between
the n regions.
Hard Disk Drives &
Solid State Drives
 Two types:
 Hard Disk Drive
 Solid State Drive
 Hard disk Drive:
 They contain a number of
platters.
 The drive head reads or
writes a circular ring of
data.
 One circular ring is called
track.
 Sections within each track
are called sectors (512
bytes).
Cluster
 The smallest part of the
hard disk space that is used
to store a file (also called
“allocation space”).
 A file stored on the hard
disk uses one or more
clusters.
 Fragmentation:
 Unused space inside a
cluster is lost. (e.g. in a file
of 2048Bytes, 512 bytes are
unused). (Internal
fragmentation).
 Clusters used to store a file
may not be contiguous.
(external fragmentation).
 In this case, extra time is
needed to access the whole
file.
Hard Disk vs. Solid State Drive
 Comparison is difficult.
 SSDs do not rotate to seek data, so the access time is much smaller than HDDs time.
However, their performance degrades over time (even few weeks of use).
 HDD drives have larger capacities. However, SSD capacity will increase in the future
and prices will fall.
 HDD drives are more sensitive than SSD. However, in case of an SSD failure, all data
will be lost. There is no recovery process as happens with HDD.
 SSD do not suffer from fragmentation problems. Time to access data does not
depend on their location.
 SSD based on flash technology require half to one third energy in comparison with
HDD.
Software
 Operating System:
 The interface between the user of the
system and the hardware.
 Operations: Scheduling and allocating
tasks to the CPU, allocating and freeing
memory, providing a user interface,
resource management, etc.
 Programming Languages:
 The programming language that tells
the hardware what to do (operating
systems are also written in
programming languages).
 e.g. assembly language command
add r0, 3 tells the CPU to add 3 to the
value stored in register r0 and store
the result to register r0.
 There are high level and low level
languages.
 C, C++, Basic, Java are high level
languages.
#include<stdio.h>
int main(){
int a,b,sum;
scanf("%d %d",&a,&b);
sum = a + b;
printf("%d",sum);
return 0;
}
 Programming languages
make use of a specific
program called “compiler”,
which translates the source
code of the programming
language to assembly code
that the CPU understands.
 The assembler converts the
assembly program to
machine code (i.e. 0 & 1).
What happens when I press “a” in the
keyboard?
 All I/O devices of the computer are “memory mapped”.
 That means that a specific area in RAM is allocated to the specific
I/O device. (The operating system is responsible for mapping the
device to the memory).
 Keyboard drivers are the interface between the keyboard and the
operating system.
 When I press “a” a specific value is written in the memory mapped
area assigned to the keyboard.
 The operating system scans many times per second all the
memory mapped areas of any device for changes. So, when it
detects a keyboard instruction it creates a specific group of
instructions and assigns it to the CPU.
 CPU executes the commands and stores memory data to memory
mapped areas, according to the initial instructions (e.g. the
memory mapped area of the screen).
 Then the operating system, detects memory mapped area
changes and creates new set of instructions to be assigned to the
CPU, and so on…

More Related Content

What's hot

5.4 Data Bus
5.4 Data Bus5.4 Data Bus
5.4 Data Bus
lpapadop
 
5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems
lpapadop
 

What's hot (20)

EASA Part 66 Module 5.13 : Software Management Control
EASA Part 66 Module 5.13 : Software Management ControlEASA Part 66 Module 5.13 : Software Management Control
EASA Part 66 Module 5.13 : Software Management Control
 
EASA Part 66 Module 5 software management control
EASA Part 66 Module 5 software management controlEASA Part 66 Module 5 software management control
EASA Part 66 Module 5 software management control
 
5.4 Data Bus
5.4 Data Bus5.4 Data Bus
5.4 Data Bus
 
EASA PART-66 MODULE 5.12 : ELECTRONICS SENSITIVE DEVICES
EASA PART-66 MODULE 5.12 : ELECTRONICS SENSITIVE DEVICESEASA PART-66 MODULE 5.12 : ELECTRONICS SENSITIVE DEVICES
EASA PART-66 MODULE 5.12 : ELECTRONICS SENSITIVE DEVICES
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessor
 
EASA PART 66 MODULE 5.1 : ELECTRONIC INSTRUMENT SYSTEMS
EASA PART 66 MODULE 5.1 : ELECTRONIC INSTRUMENT SYSTEMSEASA PART 66 MODULE 5.1 : ELECTRONIC INSTRUMENT SYSTEMS
EASA PART 66 MODULE 5.1 : ELECTRONIC INSTRUMENT SYSTEMS
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
B737NG IRS
B737NG IRSB737NG IRS
B737NG IRS
 
EASA Module 4 atomic structure
EASA Module 4 atomic structureEASA Module 4 atomic structure
EASA Module 4 atomic structure
 
EASA PART-66 MODULE 5.3 : DATA CONVERSION
EASA PART-66 MODULE 5.3 : DATA CONVERSIONEASA PART-66 MODULE 5.3 : DATA CONVERSION
EASA PART-66 MODULE 5.3 : DATA CONVERSION
 
EASA PART-66 MODULE 5.14 : ELECTROMAGNETIC ENVIRONMENT
EASA PART-66 MODULE 5.14 : ELECTROMAGNETIC ENVIRONMENTEASA PART-66 MODULE 5.14 : ELECTROMAGNETIC ENVIRONMENT
EASA PART-66 MODULE 5.14 : ELECTROMAGNETIC ENVIRONMENT
 
EASA Part 66 Module 5.2 : Numbering System
EASA Part 66 Module 5.2 : Numbering SystemEASA Part 66 Module 5.2 : Numbering System
EASA Part 66 Module 5.2 : Numbering System
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
EASA Part 66 Module 5.10 : Fibre Optic
EASA Part 66 Module 5.10 : Fibre OpticEASA Part 66 Module 5.10 : Fibre Optic
EASA Part 66 Module 5.10 : Fibre Optic
 
pipelining
pipeliningpipelining
pipelining
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
 
5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems
 
Display systems used in avionics
Display systems used in avionicsDisplay systems used in avionics
Display systems used in avionics
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 

Viewers also liked

5.14 Electromagnetic environment
5.14 Electromagnetic environment5.14 Electromagnetic environment
5.14 Electromagnetic environment
lpapadop
 
5.8 Integrated circuits
5.8 Integrated circuits5.8 Integrated circuits
5.8 Integrated circuits
lpapadop
 
5.9 Multiplexing
5.9 Multiplexing5.9 Multiplexing
5.9 Multiplexing
lpapadop
 
5.11 Electronic displays
5.11 Electronic displays5.11 Electronic displays
5.11 Electronic displays
lpapadop
 
5.13 Software management control
5.13 Software management control5.13 Software management control
5.13 Software management control
lpapadop
 
5.2 Numbering systems
5.2 Numbering systems5.2 Numbering systems
5.2 Numbering systems
lpapadop
 
5.12 Electrostatic sensitive devices
5.12 Electrostatic sensitive devices5.12 Electrostatic sensitive devices
5.12 Electrostatic sensitive devices
lpapadop
 
5.10 Fiber optics
5.10 Fiber optics5.10 Fiber optics
5.10 Fiber optics
lpapadop
 
5.5 Logic circuits
5.5 Logic circuits5.5 Logic circuits
5.5 Logic circuits
lpapadop
 
Wire harness & cable assembly 進階瞭解
Wire harness & cable assembly 進階瞭解Wire harness & cable assembly 進階瞭解
Wire harness & cable assembly 進階瞭解
Yung Jui Chen 陳泳睿
 
microprocessor
microprocessormicroprocessor
microprocessor
illpa
 

Viewers also liked (20)

5.14 Electromagnetic environment
5.14 Electromagnetic environment5.14 Electromagnetic environment
5.14 Electromagnetic environment
 
5.8 Integrated circuits
5.8 Integrated circuits5.8 Integrated circuits
5.8 Integrated circuits
 
5.9 Multiplexing
5.9 Multiplexing5.9 Multiplexing
5.9 Multiplexing
 
5.11 Electronic displays
5.11 Electronic displays5.11 Electronic displays
5.11 Electronic displays
 
5.13 Software management control
5.13 Software management control5.13 Software management control
5.13 Software management control
 
5.2 Numbering systems
5.2 Numbering systems5.2 Numbering systems
5.2 Numbering systems
 
5.12 Electrostatic sensitive devices
5.12 Electrostatic sensitive devices5.12 Electrostatic sensitive devices
5.12 Electrostatic sensitive devices
 
5.10 Fiber optics
5.10 Fiber optics5.10 Fiber optics
5.10 Fiber optics
 
5.5 Logic circuits
5.5 Logic circuits5.5 Logic circuits
5.5 Logic circuits
 
ESD PRESENTATION
ESD PRESENTATIONESD PRESENTATION
ESD PRESENTATION
 
Bai 04 vi xu ly cpu
Bai 04  vi xu ly cpuBai 04  vi xu ly cpu
Bai 04 vi xu ly cpu
 
Soal latihan kapasitor
Soal latihan kapasitorSoal latihan kapasitor
Soal latihan kapasitor
 
Designing A Wire Harness: An Information Guide
Designing A Wire Harness: An Information GuideDesigning A Wire Harness: An Information Guide
Designing A Wire Harness: An Information Guide
 
Microprocessors
MicroprocessorsMicroprocessors
Microprocessors
 
Wire harness & cable assembly 進階瞭解
Wire harness & cable assembly 進階瞭解Wire harness & cable assembly 進階瞭解
Wire harness & cable assembly 進階瞭解
 
Microprocessor Fundamentals
Microprocessor FundamentalsMicroprocessor Fundamentals
Microprocessor Fundamentals
 
ARM- Programmer's Model
ARM- Programmer's ModelARM- Programmer's Model
ARM- Programmer's Model
 
microprocessor
microprocessormicroprocessor
microprocessor
 
Instrument & Control Introduction
Instrument & Control IntroductionInstrument & Control Introduction
Instrument & Control Introduction
 
Electro Static Discharge Basics
Electro Static Discharge BasicsElectro Static Discharge Basics
Electro Static Discharge Basics
 

Similar to 5.6 Basic computer structure microprocessors

11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
New Era University
 
Multilevel arch & str org.& mips, 8086, memory
Multilevel arch & str org.& mips, 8086, memoryMultilevel arch & str org.& mips, 8086, memory
Multilevel arch & str org.& mips, 8086, memory
Mahesh Kumar Attri
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
Naruin
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
Naruin
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
ekul
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
Kyle
 
Lesson three hardware basics
Lesson three hardware basicsLesson three hardware basics
Lesson three hardware basics
Mik Endale
 

Similar to 5.6 Basic computer structure microprocessors (20)

Coa presentation3
Coa presentation3Coa presentation3
Coa presentation3
 
notes2 memory_cpu
notes2 memory_cpunotes2 memory_cpu
notes2 memory_cpu
 
Components of the System Unit.pdf
Components of the System Unit.pdfComponents of the System Unit.pdf
Components of the System Unit.pdf
 
Unit 1 four part pocessor and memory
Unit 1 four part pocessor and memoryUnit 1 four part pocessor and memory
Unit 1 four part pocessor and memory
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
 
Computer System.ppt
Computer System.pptComputer System.ppt
Computer System.ppt
 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
 
Multilevel arch & str org.& mips, 8086, memory
Multilevel arch & str org.& mips, 8086, memoryMultilevel arch & str org.& mips, 8086, memory
Multilevel arch & str org.& mips, 8086, memory
 
Lecture#06 inner workings of the cpu
Lecture#06   inner workings of the cpuLecture#06   inner workings of the cpu
Lecture#06 inner workings of the cpu
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
 
Lecture 2 - Computer Hardware & Operating Systems
Lecture 2 - Computer Hardware & Operating SystemsLecture 2 - Computer Hardware & Operating Systems
Lecture 2 - Computer Hardware & Operating Systems
 
nasm_final
nasm_finalnasm_final
nasm_final
 
Introduction to Computer Hardware slides ppt
Introduction to Computer Hardware slides pptIntroduction to Computer Hardware slides ppt
Introduction to Computer Hardware slides ppt
 
18. the components of the system unit
18. the components of the system unit18. the components of the system unit
18. the components of the system unit
 
16ce075 and 16ce076
16ce075 and 16ce07616ce075 and 16ce076
16ce075 and 16ce076
 
Lesson three hardware basics
Lesson three hardware basicsLesson three hardware basics
Lesson three hardware basics
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

5.6 Basic computer structure microprocessors

  • 1. Module 5: Digital Techniques and Electronic Instrument Systems 5.6 Basic Computer Structure 5.7 Microprocessors
  • 2. Basic Computer Structure  CPU  Memory  I/O  Bus
  • 3. Bus  Control bus:  Signals for maintaining and status information.  e.g. sets processor in a specific operation mode.  Address bus:  Unidirectional bus, (16 or 32 bits parallel wires) used for transmitting addresses to memory.  Data bus:  8 / 16 / 32 / 64 bits bi- directional bus. Data stored or loaded to / from the memory.
  • 4. Central Processor Unit  Instructions and data are stored in RAM.  CPU loads and decodes an instruction.  Loads data needed from RAM (according to the instruction) and stores them in registers.  Make calculations if necessary in registers, according to the instruction.  Stores data back in RAM.
  • 5. ARM Register Set  Registers:  Small and very fast memories.  Usually 32 bits each one.  R15 is the Program Counter: stores the address of the next instruction.  CPSR (Current Program Status Register) used to monitor and control internal operations.  e.g. A calculation has been made (e.g. an addition). Is the result negative? Did it lead to overflow? Did a carry occur?
  • 6. ARM Assembly Example  Very simple and low level commands.  The CPU decodes them to machine language (i.e. binary).  Each instruction requires a different number of CPU cycles.
  • 7. CPU Instruction Set  Each different kind of CPU has each own set of instructions.  4 types of instructions:  Transfer: e.g. Load data from memory to a CPU register for processing.  Arithmetic: e.g. add data stored in two registers and put the result to a 3rd register.  Logic: e.g. compare data stored in two registers and set the appropriate flag in the Status Register.  Control: Set the program counter to a specific memory address.
  • 8. Arithmetic Logic Unit  ALU:  Addition  Subtraction  Multiplication  Comparison
  • 9. CPU fetch-decode-execute cycle  5 basic operations:  Fetch: load a memory instruction.  Decode: decode the instruction.  Execute: perform ALU operations.  Memory access: (In fact, usually wait for one CPU cycle, to ensure consistency).  Write back: store results in a register.  This is the CPU pipeline.  The operations of the CPU are decomposed in independent steps to allow concurrent operations and increased CPU performance.
  • 10. CPU Clock  Each time the CPU clock “ticks” CPU moves to the next pipeline stage.  So, in an 1GHz CPU each pipeline stage takes 1nsec.
  • 11. Memory  Instructions and Data are stored in memories.
  • 12. Types of Memories  Most common widths: 8, 16, 32, 64 bits. If the memory width is the same as the instructions length, the processors needs one memory access to fetch a new instruction.  ROM (Read Only Memory): Contains an image set at production time and cannot be reprogrammed (e.g. boot code).  Flash ROM: Can be rewritten. Used to store device firmware or long- term data that needs to be preserved after power is off.  RAM (Random Access Memory).  DRAM (Dynamic RAM): The storage cells are refreshed after every few milliseconds, so it needs a DRAM controller.  SRAM (Static RAM): faster than DRAM, does not require refreshing. Used in caches.  SDRAM (Synchronous DRAM): Very fast, it is clocked and synchronizes itself with the processor clock.  Memories that lose their data when power is off are called volatile. (i.e RAM). ROM is non-volatile.
  • 13. Read Only Memory  ROM  PROM (Programmable ROM): It’s purchased already programmed. Once programmed, can never be reprogrammed.  EPROM (Erasable PROM):  Can be reprogrammed using UV light.  EEPROM (Electrically EPROM) are reprogrammed electrically. (Flash Memories)  Flash Memories:  Designed to replace ROM and RAM.  Not as fast as SRAM and ROM.
  • 14. Flash EEPROM  Floating gate transistors.  Electrons are “trapped” inside the float gate and open the channel between the n regions.
  • 15. Hard Disk Drives & Solid State Drives  Two types:  Hard Disk Drive  Solid State Drive  Hard disk Drive:  They contain a number of platters.  The drive head reads or writes a circular ring of data.  One circular ring is called track.  Sections within each track are called sectors (512 bytes).
  • 16. Cluster  The smallest part of the hard disk space that is used to store a file (also called “allocation space”).  A file stored on the hard disk uses one or more clusters.  Fragmentation:  Unused space inside a cluster is lost. (e.g. in a file of 2048Bytes, 512 bytes are unused). (Internal fragmentation).  Clusters used to store a file may not be contiguous. (external fragmentation).  In this case, extra time is needed to access the whole file.
  • 17. Hard Disk vs. Solid State Drive  Comparison is difficult.  SSDs do not rotate to seek data, so the access time is much smaller than HDDs time. However, their performance degrades over time (even few weeks of use).  HDD drives have larger capacities. However, SSD capacity will increase in the future and prices will fall.  HDD drives are more sensitive than SSD. However, in case of an SSD failure, all data will be lost. There is no recovery process as happens with HDD.  SSD do not suffer from fragmentation problems. Time to access data does not depend on their location.  SSD based on flash technology require half to one third energy in comparison with HDD.
  • 18. Software  Operating System:  The interface between the user of the system and the hardware.  Operations: Scheduling and allocating tasks to the CPU, allocating and freeing memory, providing a user interface, resource management, etc.  Programming Languages:  The programming language that tells the hardware what to do (operating systems are also written in programming languages).  e.g. assembly language command add r0, 3 tells the CPU to add 3 to the value stored in register r0 and store the result to register r0.  There are high level and low level languages.  C, C++, Basic, Java are high level languages. #include<stdio.h> int main(){ int a,b,sum; scanf("%d %d",&a,&b); sum = a + b; printf("%d",sum); return 0; }  Programming languages make use of a specific program called “compiler”, which translates the source code of the programming language to assembly code that the CPU understands.  The assembler converts the assembly program to machine code (i.e. 0 & 1).
  • 19. What happens when I press “a” in the keyboard?  All I/O devices of the computer are “memory mapped”.  That means that a specific area in RAM is allocated to the specific I/O device. (The operating system is responsible for mapping the device to the memory).  Keyboard drivers are the interface between the keyboard and the operating system.  When I press “a” a specific value is written in the memory mapped area assigned to the keyboard.  The operating system scans many times per second all the memory mapped areas of any device for changes. So, when it detects a keyboard instruction it creates a specific group of instructions and assigns it to the CPU.  CPU executes the commands and stores memory data to memory mapped areas, according to the initial instructions (e.g. the memory mapped area of the screen).  Then the operating system, detects memory mapped area changes and creates new set of instructions to be assigned to the CPU, and so on…