SlideShare a Scribd company logo
C H A P T E R 1
O V E R V I E W O F C O M P U T E R S A N D L O G I C
PROG0101
FUNDAMENTALS OF
PROGRAMMING
PROG0101
FUNDAMENTALS OF PROGRAMMING
CHAPTER 1
COMPUTER AND MACHINE CYCLE
2
Definition of Computer
 Computer can be define as a computer is a programmable
machine.
 A computer program is a collection of instructions that
performs a specific task when executed by a computer.
 A computer requires programs to function.
 A computer program is usually written by a computer
programmer in a programming language.
3
Definition of Computer
 What computers can do?
 Office works (documents, letters, memos etc …)
 Entertainment
 Access information
 Education
 Online shopping
 Video conferencing
 Desktop publishing
 Etc …
4
Definition of Computer
Computer Parts
 Computer can be divided into two parts:
 Hardware
System Unit
Input devices
Output devices
 Software
System software
Programming software
Application software
5
Basic Computer Operations
Basic Computer Operations
DATA
(INPUT)
PROCESS DATA
INFORMATION
(OUTPUT)
STORE
DATA, INFORMATION & INSTRUCTION
6
Basic Computer Operations
Basic Computer Operations
The computer performs four basic operations:
 Receive input data
 Process data
 Produce output information
 Store data, information and instructions.
7
Machine Cycle
Machine Cycle
 Machine cycle is the basic operation cycle of a computer
processor.
 It is the process by which a computer processor retrieves a
program instruction from its memory, determines what
actions the instruction requires, and carries out those
actions.
 This cycle is repeated continuously from bootup to when
the computer is shut down.
8
Machine Cycle
Machine Cycle
 There are four steps in machine cycle:
 Instruction Phase:
Fetch - get an instruction from Main Memory
Decode - translate it into computer commands
 Execution Phase
Execute - actually process the command
Store - write the result to Main Memory
9
Machine Cycle
Machine Cycle
10
Machine Cycle
Machine Cycle
For example, to add the numbers 5 and 6 and display the answer on the
screen requires the following steps:
1. Fetch instruction: "Get number at address 123456"
2. Decode instruction.
3. Execute: ALU finds the number. (which happens to be 5)
4. Store: The number 5 is stored in a temporary spot in Main Memory.
5 - 8 Repeat steps for another number (= 6)
9. Fetch instruction: "Add those two numbers"
10. Decode instruction.
11. Execute: ALU adds the numbers.
12. Store: The answer is stored in a temporary spot.
13. Fetch instruction: "Display answer on screen."
14. Decode instruction.
15. Execute: Display answer on screen.

More Related Content

Similar to Fundamentals of Programming Chapter 1

components of computer
components of computercomponents of computer
components of computer
swatihans
 
Cpu
CpuCpu
Functional units of computer
Functional units of computerFunctional units of computer
Functional units of computer
gaurav jain
 
Comp App Lect 2.pptx
Comp App Lect 2.pptxComp App Lect 2.pptx
Comp App Lect 2.pptx
MehwishKanwal14
 
Fundamentals
FundamentalsFundamentals
Fundamentals
myrajendra
 
Fundamental units of computer
Fundamental units of computerFundamental units of computer
Fundamental units of computer
Sandeep Menon
 
Lesson 1 anatomy of a digital computer (230 kb)
Lesson 1  anatomy of a digital computer (230 kb)Lesson 1  anatomy of a digital computer (230 kb)
Lesson 1 anatomy of a digital computer (230 kb)
IMRAN KHAN
 
Fundamentals.1
Fundamentals.1Fundamentals.1
Fundamentals.1
myrajendra
 
Components of computer, CPU computer funfament ppt
Components of computer, CPU computer funfament pptComponents of computer, CPU computer funfament ppt
Components of computer, CPU computer funfament ppt
DeepuVishwakarma
 
Cpu.9
Cpu.9Cpu.9
Cpu.9
myrajendra
 
Msc chemistry previous
Msc chemistry previousMsc chemistry previous
Msc chemistry previous
mshoaib15
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
Education Front
 
Data processing
Data processingData processing
Data processing
Dr. Shalini Pandey
 
C q 1
C q 1C q 1
L A2 Cpu
L A2 CpuL A2 Cpu
L A2 Cpu
Cma Mohd
 
introductio ti ai.pptx
introductio ti ai.pptxintroductio ti ai.pptx
introductio ti ai.pptx
KarrarIbrahimAbdAlam
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
ssusera8c91a
 
Fundamentals.1
Fundamentals.1Fundamentals.1
Fundamentals.1
myrajendra
 
lec01.pdf
lec01.pdflec01.pdf
The functionality of a pc
The functionality of a pcThe functionality of a pc
The functionality of a pc
Waleed Alharbi
 

Similar to Fundamentals of Programming Chapter 1 (20)

components of computer
components of computercomponents of computer
components of computer
 
Cpu
CpuCpu
Cpu
 
Functional units of computer
Functional units of computerFunctional units of computer
Functional units of computer
 
Comp App Lect 2.pptx
Comp App Lect 2.pptxComp App Lect 2.pptx
Comp App Lect 2.pptx
 
Fundamentals
FundamentalsFundamentals
Fundamentals
 
Fundamental units of computer
Fundamental units of computerFundamental units of computer
Fundamental units of computer
 
Lesson 1 anatomy of a digital computer (230 kb)
Lesson 1  anatomy of a digital computer (230 kb)Lesson 1  anatomy of a digital computer (230 kb)
Lesson 1 anatomy of a digital computer (230 kb)
 
Fundamentals.1
Fundamentals.1Fundamentals.1
Fundamentals.1
 
Components of computer, CPU computer funfament ppt
Components of computer, CPU computer funfament pptComponents of computer, CPU computer funfament ppt
Components of computer, CPU computer funfament ppt
 
Cpu.9
Cpu.9Cpu.9
Cpu.9
 
Msc chemistry previous
Msc chemistry previousMsc chemistry previous
Msc chemistry previous
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Data processing
Data processingData processing
Data processing
 
C q 1
C q 1C q 1
C q 1
 
L A2 Cpu
L A2 CpuL A2 Cpu
L A2 Cpu
 
introductio ti ai.pptx
introductio ti ai.pptxintroductio ti ai.pptx
introductio ti ai.pptx
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
Fundamentals.1
Fundamentals.1Fundamentals.1
Fundamentals.1
 
lec01.pdf
lec01.pdflec01.pdf
lec01.pdf
 
The functionality of a pc
The functionality of a pcThe functionality of a pc
The functionality of a pc
 

More from Mohd Harris Ahmad Jaal

Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7
Mohd Harris Ahmad Jaal
 
Fundamentals of Programming Chapter 6
Fundamentals of Programming Chapter 6Fundamentals of Programming Chapter 6
Fundamentals of Programming Chapter 6
Mohd Harris Ahmad Jaal
 
Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4
Mohd Harris Ahmad Jaal
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
Mohd Harris Ahmad Jaal
 
Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
Mohd Harris Ahmad Jaal
 
Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 8
Web Application Development using PHP Chapter 8Web Application Development using PHP Chapter 8
Web Application Development using PHP Chapter 8
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 7
Web Application Development using PHP Chapter 7Web Application Development using PHP Chapter 7
Web Application Development using PHP Chapter 7
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 3
Web Application Development using PHP Chapter 3Web Application Development using PHP Chapter 3
Web Application Development using PHP Chapter 3
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2
Mohd Harris Ahmad Jaal
 
Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 10
Fundamentals of Computing Chapter 10Fundamentals of Computing Chapter 10
Fundamentals of Computing Chapter 10
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 9
Fundamentals of Computing Chapter 9Fundamentals of Computing Chapter 9
Fundamentals of Computing Chapter 9
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 8
Fundamentals of Computing Chapter 8Fundamentals of Computing Chapter 8
Fundamentals of Computing Chapter 8
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 6
Fundamentals of Computing Chapter 6Fundamentals of Computing Chapter 6
Fundamentals of Computing Chapter 6
Mohd Harris Ahmad Jaal
 
Fundamentals of Computing Chapter 5
Fundamentals of Computing Chapter 5Fundamentals of Computing Chapter 5
Fundamentals of Computing Chapter 5
Mohd Harris Ahmad Jaal
 

More from Mohd Harris Ahmad Jaal (20)

Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7
 
Fundamentals of Programming Chapter 6
Fundamentals of Programming Chapter 6Fundamentals of Programming Chapter 6
Fundamentals of Programming Chapter 6
 
Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
 
Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5
 
Web Application Development using PHP Chapter 8
Web Application Development using PHP Chapter 8Web Application Development using PHP Chapter 8
Web Application Development using PHP Chapter 8
 
Web Application Development using PHP Chapter 7
Web Application Development using PHP Chapter 7Web Application Development using PHP Chapter 7
Web Application Development using PHP Chapter 7
 
Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6
 
Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5
 
Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4
 
Web Application Development using PHP Chapter 3
Web Application Development using PHP Chapter 3Web Application Development using PHP Chapter 3
Web Application Development using PHP Chapter 3
 
Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2
 
Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1
 
Fundamentals of Computing Chapter 10
Fundamentals of Computing Chapter 10Fundamentals of Computing Chapter 10
Fundamentals of Computing Chapter 10
 
Fundamentals of Computing Chapter 9
Fundamentals of Computing Chapter 9Fundamentals of Computing Chapter 9
Fundamentals of Computing Chapter 9
 
Fundamentals of Computing Chapter 8
Fundamentals of Computing Chapter 8Fundamentals of Computing Chapter 8
Fundamentals of Computing Chapter 8
 
Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7
 
Fundamentals of Computing Chapter 6
Fundamentals of Computing Chapter 6Fundamentals of Computing Chapter 6
Fundamentals of Computing Chapter 6
 
Fundamentals of Computing Chapter 5
Fundamentals of Computing Chapter 5Fundamentals of Computing Chapter 5
Fundamentals of Computing Chapter 5
 

Recently uploaded

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 

Fundamentals of Programming Chapter 1

  • 1. C H A P T E R 1 O V E R V I E W O F C O M P U T E R S A N D L O G I C PROG0101 FUNDAMENTALS OF PROGRAMMING PROG0101 FUNDAMENTALS OF PROGRAMMING CHAPTER 1 COMPUTER AND MACHINE CYCLE
  • 2. 2 Definition of Computer  Computer can be define as a computer is a programmable machine.  A computer program is a collection of instructions that performs a specific task when executed by a computer.  A computer requires programs to function.  A computer program is usually written by a computer programmer in a programming language.
  • 3. 3 Definition of Computer  What computers can do?  Office works (documents, letters, memos etc …)  Entertainment  Access information  Education  Online shopping  Video conferencing  Desktop publishing  Etc …
  • 4. 4 Definition of Computer Computer Parts  Computer can be divided into two parts:  Hardware System Unit Input devices Output devices  Software System software Programming software Application software
  • 5. 5 Basic Computer Operations Basic Computer Operations DATA (INPUT) PROCESS DATA INFORMATION (OUTPUT) STORE DATA, INFORMATION & INSTRUCTION
  • 6. 6 Basic Computer Operations Basic Computer Operations The computer performs four basic operations:  Receive input data  Process data  Produce output information  Store data, information and instructions.
  • 7. 7 Machine Cycle Machine Cycle  Machine cycle is the basic operation cycle of a computer processor.  It is the process by which a computer processor retrieves a program instruction from its memory, determines what actions the instruction requires, and carries out those actions.  This cycle is repeated continuously from bootup to when the computer is shut down.
  • 8. 8 Machine Cycle Machine Cycle  There are four steps in machine cycle:  Instruction Phase: Fetch - get an instruction from Main Memory Decode - translate it into computer commands  Execution Phase Execute - actually process the command Store - write the result to Main Memory
  • 10. 10 Machine Cycle Machine Cycle For example, to add the numbers 5 and 6 and display the answer on the screen requires the following steps: 1. Fetch instruction: "Get number at address 123456" 2. Decode instruction. 3. Execute: ALU finds the number. (which happens to be 5) 4. Store: The number 5 is stored in a temporary spot in Main Memory. 5 - 8 Repeat steps for another number (= 6) 9. Fetch instruction: "Add those two numbers" 10. Decode instruction. 11. Execute: ALU adds the numbers. 12. Store: The answer is stored in a temporary spot. 13. Fetch instruction: "Display answer on screen." 14. Decode instruction. 15. Execute: Display answer on screen.