SlideShare a Scribd company logo
1 of 32
Computer Architecture and Data
       Manipulation
           Chapter 3
Von Neumann Architecture
• Today’s stored-program computers have the
  following characteristics:
   – Three hardware systems:
     • A central processing unit (CPU)
        – Arithmetic and Logic Unit (ALU)
        – Control Unit
        – Registers
     • A main memory system
     • An I/O system
  – The capacity to carry out sequential instruction
    processing.
  – A single data path between the CPU and main
    memory.
CPU and main memory connected via a
               bus
Stored Program Concept
A program can be encoded as bit patterns and
stored in main memory. From there, the CPU
can then extract the instructions and execute
them. In turn, the program to be executed can
be altered easily.
Terminology
• Machine instruction: An instruction (or
  command) encoded as a bit pattern
  recognizable by the CPU
• Machine language: The set of all instructions
  recognized by a machine
Machine Language Philosophies
• Reduced Instruction Set Computing (RISC)
  – Few, simple, efficient, and fast instructions
  – Examples: PowerPC from Apple/IBM/Motorola
               and SPARC from Sun Microsystems
• Complex Instruction Set Computing (CISC)
  – Many, convenient, and powerful instructions
  – Example: Pentium from Intel
Machine Instruction Types
• Data Transfer: copy data from one location to
  another
• Arithmetic/Logic: use existing bit patterns to
  compute a new bit patterns
• Control: direct the execution of the program
Example - Adding values stored in
            memory
Example - Dividing values stored in
             memory
Program Execution
• Controlled by two special-purpose registers
  – Program Counter: address of next instruction
  – Instruction Register: current instruction
• Machine Cycle
  – Fetch
  – Decode
  – Execute
The machine cycle
Program Execution
• Controlled by two special-purpose registers
  – Program counter: address of next instruction
  – Instruction register: current instruction
• Machine Cycle
  – Fetch
  – Decode
  – Execute
The architecture of the machine described in
                 Appendix C
Start of the Fetch Execute cycle
All of the instructions were fetched and executed as part of the machine cycle
Performing the fetch step of the
        machine cycle
Performing the fetch step of the
     machine cycle (cont’d)
Parts of a Machine Instruction
• Op-code: Specifies which operation to execute
• Operand: Gives more detailed information
  about the operation
  – Interpretation of operand varies depending on op-
    code
The composition of an instruction
     for the machine in Appendix C




3 means to                From register   To memory address A7
store the contents        5
of a register to memory
Appendix C: A Simple Machine
                   Language
Op-code     Operand   Description
    1       RXY       LOAD reg. R from cell XY.
    2       RXY       LOAD reg. R with XY.
    3       RXY       STORE reg. R at XY.
    4       0RS       MOVE R to S.
    5       RST       ADD S and T into R. (2’s comp.)
    6       RST       ADD S and T into R. (floating pt.)
    7       RST       OR S and T into R.
    8       RST       AND S and T into R.
    9       RST       XOR S and T into R.
    A       R0X       ROTATE reg. R X times.
    B       RXY       JUMP to XY if R = reg. 0.
    C       000       HALT.
    D       0XY       JUMP to XY always
Sample Machine Program
• PC = 0
• Mem Address   Contents
  0             1506
  1             1607
  2             5056
  3             3008
  4             C000
  5             0001
  6             0002
  7             0003
  8             0000
Exercise
• PC = 0
• Write a program that subtracts 1 from the
  value in memory address FF
Another Program – What’s it do?
• PC = 0   Address   Contents
           0         20FF
           1         2102
           2         2200
           3         130A
           4         5223
           5         5110
           6         B108
           7         D004
           8         320A
           9         C000
           A         0003
Exercise
• Write a program that computes the opposite
  of the value in memory address FF
  – E.g. if the value is +5 then it becomes -5
Communicating with Other Devices
• Controller: An intermediary apparatus that handles
  communication between the computer and a device
   – Specialized controllers for each type of device
   – General purpose controllers (USB and FireWire)
• Port: The point at which a device connects to a
  computer
• Memory-mapped I/O: CPU communicates with
  peripheral devices as though they were memory cells
Controllers attached to a machine’s bus
A conceptual representation of memory-mapped
                      I/O
Communicating with Other Devices
                  (continued)

• Direct memory access (DMA): Main memory
  access by a controller over the bus
• Von Neumann Bottleneck: Insufficient bus
  speed impedes performance
• Handshaking: The process of coordinating the
  transfer of data between components
Communicating with Other Devices
                   (continued)

• Parallel Communication: Several
  communication paths transfer bits
  simultaneously.
• Serial Communication: Bits are transferred
  one after the other over a single
  communication path.
Data Communication Rates
• Measurement units
  – Bps: Bits per second
  – Kbps: Kilo-bps (1,000 bps)
  – Mbps: Mega-bps (1,000,000 bps)
  – Gbps: Giga-bps (1,000,000,000 bps)
• Bandwidth: Maximum available rate
Increasing Performance
• Technologies to increase throughput:
  – Faster clock speed
  – Bigger word size
  – Larger cache memory
  – Pipelining: Overlap steps of the machine cycle
Pipelining
• Why not start fetching the next instruction while we’re
  decoding the current instruction?
• Why not decode the next instruction while we’re executing
  the current instruction?
                           Time
                           0 1 2 3 4 5 6 7 8 9 10 11 12

           Instruction 1 FFFDDDEEE

           Instruction 2     FFFDDDEEE

           Instruction 3        FFFDDDEEE

           …


 What if Instruction 1 is the JUMP to XY if R = reg. 0 instruction and we JUMP?
Increasing Performance
– Parallel Processing: Use multiple processors
  simultaneously
   • SISD: No parallel processing
   • MIMD: Different programs, different data
      – Dual core, quad core
   • SIMD: Same program, different data
      – SSE, MMX

More Related Content

What's hot

Pipelining, processors, risc and cisc
Pipelining, processors, risc and ciscPipelining, processors, risc and cisc
Pipelining, processors, risc and ciscMark Gibbs
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
Fetch Execute Cycle
Fetch Execute CycleFetch Execute Cycle
Fetch Execute Cyclepy7rjs
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple dataSyed Zaid Irshad
 
isa architecture
isa architectureisa architecture
isa architectureAJAL A J
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architectureishapadhy
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInteX Research Lab
 
Introduction to Computer Architecture & Organization
Introduction to Computer Architecture & OrganizationIntroduction to Computer Architecture & Organization
Introduction to Computer Architecture & Organizationbabuece
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipeliningTech_MX
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD) Ali Raza
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
MIPS Assembly Language I
MIPS Assembly Language IMIPS Assembly Language I
MIPS Assembly Language ILiEdo
 

What's hot (19)

Control unit
Control unitControl unit
Control unit
 
Pipelining, processors, risc and cisc
Pipelining, processors, risc and ciscPipelining, processors, risc and cisc
Pipelining, processors, risc and cisc
 
Debate on RISC-CISC
Debate on RISC-CISCDebate on RISC-CISC
Debate on RISC-CISC
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Fetch Execute Cycle
Fetch Execute CycleFetch Execute Cycle
Fetch Execute Cycle
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
isa architecture
isa architectureisa architecture
isa architecture
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architecture
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
Introduction to Computer Architecture & Organization
Introduction to Computer Architecture & OrganizationIntroduction to Computer Architecture & Organization
Introduction to Computer Architecture & Organization
 
1.prallelism
1.prallelism1.prallelism
1.prallelism
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 
Multi cycle cpu
Multi cycle cpuMulti cycle cpu
Multi cycle cpu
 
CO Module 5
CO Module 5CO Module 5
CO Module 5
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD)
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
MIPS Assembly Language I
MIPS Assembly Language IMIPS Assembly Language I
MIPS Assembly Language I
 

Similar to Computer arch

Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxSirRafiLectures
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basicsLucky Sithole
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsButtaRajasekhar2
 
0-Slot02-Introduction-to-PFC.pdf
0-Slot02-Introduction-to-PFC.pdf0-Slot02-Introduction-to-PFC.pdf
0-Slot02-Introduction-to-PFC.pdfssusere19c741
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma Manoharan Ragavan
 
chapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxchapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxjanani603976
 
Principle of Computer Operation.ppt
Principle of Computer Operation.pptPrinciple of Computer Operation.ppt
Principle of Computer Operation.pptAbdulRehman703897
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...Rai University
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Abhishekn84
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaaarshadahmedkkp
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerAmrutaMehata
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxVanshJain322212
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptRuhul Amin
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Rai University
 

Similar to Computer arch (20)

Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptx
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basics
 
CPU.ppd
CPU.ppdCPU.ppd
CPU.ppd
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose Processors
 
0-Slot02-Introduction-to-PFC.pdf
0-Slot02-Introduction-to-PFC.pdf0-Slot02-Introduction-to-PFC.pdf
0-Slot02-Introduction-to-PFC.pdf
 
CPU Architecture
CPU ArchitectureCPU Architecture
CPU Architecture
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma
 
chapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxchapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptx
 
Principle of Computer Operation.ppt
Principle of Computer Operation.pptPrinciple of Computer Operation.ppt
Principle of Computer Operation.ppt
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptx
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.ppt
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Computer arch

  • 1. Computer Architecture and Data Manipulation Chapter 3
  • 2. Von Neumann Architecture • Today’s stored-program computers have the following characteristics: – Three hardware systems: • A central processing unit (CPU) – Arithmetic and Logic Unit (ALU) – Control Unit – Registers • A main memory system • An I/O system – The capacity to carry out sequential instruction processing. – A single data path between the CPU and main memory.
  • 3. CPU and main memory connected via a bus
  • 4. Stored Program Concept A program can be encoded as bit patterns and stored in main memory. From there, the CPU can then extract the instructions and execute them. In turn, the program to be executed can be altered easily.
  • 5. Terminology • Machine instruction: An instruction (or command) encoded as a bit pattern recognizable by the CPU • Machine language: The set of all instructions recognized by a machine
  • 6. Machine Language Philosophies • Reduced Instruction Set Computing (RISC) – Few, simple, efficient, and fast instructions – Examples: PowerPC from Apple/IBM/Motorola and SPARC from Sun Microsystems • Complex Instruction Set Computing (CISC) – Many, convenient, and powerful instructions – Example: Pentium from Intel
  • 7. Machine Instruction Types • Data Transfer: copy data from one location to another • Arithmetic/Logic: use existing bit patterns to compute a new bit patterns • Control: direct the execution of the program
  • 8. Example - Adding values stored in memory
  • 9. Example - Dividing values stored in memory
  • 10. Program Execution • Controlled by two special-purpose registers – Program Counter: address of next instruction – Instruction Register: current instruction • Machine Cycle – Fetch – Decode – Execute
  • 12. Program Execution • Controlled by two special-purpose registers – Program counter: address of next instruction – Instruction register: current instruction • Machine Cycle – Fetch – Decode – Execute
  • 13. The architecture of the machine described in Appendix C
  • 14. Start of the Fetch Execute cycle All of the instructions were fetched and executed as part of the machine cycle
  • 15. Performing the fetch step of the machine cycle
  • 16. Performing the fetch step of the machine cycle (cont’d)
  • 17. Parts of a Machine Instruction • Op-code: Specifies which operation to execute • Operand: Gives more detailed information about the operation – Interpretation of operand varies depending on op- code
  • 18. The composition of an instruction for the machine in Appendix C 3 means to From register To memory address A7 store the contents 5 of a register to memory
  • 19. Appendix C: A Simple Machine Language Op-code Operand Description 1 RXY LOAD reg. R from cell XY. 2 RXY LOAD reg. R with XY. 3 RXY STORE reg. R at XY. 4 0RS MOVE R to S. 5 RST ADD S and T into R. (2’s comp.) 6 RST ADD S and T into R. (floating pt.) 7 RST OR S and T into R. 8 RST AND S and T into R. 9 RST XOR S and T into R. A R0X ROTATE reg. R X times. B RXY JUMP to XY if R = reg. 0. C 000 HALT. D 0XY JUMP to XY always
  • 20. Sample Machine Program • PC = 0 • Mem Address Contents 0 1506 1 1607 2 5056 3 3008 4 C000 5 0001 6 0002 7 0003 8 0000
  • 21. Exercise • PC = 0 • Write a program that subtracts 1 from the value in memory address FF
  • 22. Another Program – What’s it do? • PC = 0 Address Contents 0 20FF 1 2102 2 2200 3 130A 4 5223 5 5110 6 B108 7 D004 8 320A 9 C000 A 0003
  • 23. Exercise • Write a program that computes the opposite of the value in memory address FF – E.g. if the value is +5 then it becomes -5
  • 24. Communicating with Other Devices • Controller: An intermediary apparatus that handles communication between the computer and a device – Specialized controllers for each type of device – General purpose controllers (USB and FireWire) • Port: The point at which a device connects to a computer • Memory-mapped I/O: CPU communicates with peripheral devices as though they were memory cells
  • 25. Controllers attached to a machine’s bus
  • 26. A conceptual representation of memory-mapped I/O
  • 27. Communicating with Other Devices (continued) • Direct memory access (DMA): Main memory access by a controller over the bus • Von Neumann Bottleneck: Insufficient bus speed impedes performance • Handshaking: The process of coordinating the transfer of data between components
  • 28. Communicating with Other Devices (continued) • Parallel Communication: Several communication paths transfer bits simultaneously. • Serial Communication: Bits are transferred one after the other over a single communication path.
  • 29. Data Communication Rates • Measurement units – Bps: Bits per second – Kbps: Kilo-bps (1,000 bps) – Mbps: Mega-bps (1,000,000 bps) – Gbps: Giga-bps (1,000,000,000 bps) • Bandwidth: Maximum available rate
  • 30. Increasing Performance • Technologies to increase throughput: – Faster clock speed – Bigger word size – Larger cache memory – Pipelining: Overlap steps of the machine cycle
  • 31. Pipelining • Why not start fetching the next instruction while we’re decoding the current instruction? • Why not decode the next instruction while we’re executing the current instruction? Time 0 1 2 3 4 5 6 7 8 9 10 11 12 Instruction 1 FFFDDDEEE Instruction 2 FFFDDDEEE Instruction 3 FFFDDDEEE … What if Instruction 1 is the JUMP to XY if R = reg. 0 instruction and we JUMP?
  • 32. Increasing Performance – Parallel Processing: Use multiple processors simultaneously • SISD: No parallel processing • MIMD: Different programs, different data – Dual core, quad core • SIMD: Same program, different data – SSE, MMX