SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
Programming Methodology 
By: 
Anh Duong
Programming Methodology 
By: 
Anh Duong 
Online: 
< http://cnx.org/content/col10450/1.1/ > 
C O N N E X I O N S 
Rice University, Houston, Texas
This selection and arrangement of content as a collection is copyrighted by Anh Duong. It is licensed under the 
Creative Commons Attribution 2.0 license (http://creativecommons.org/licenses/by/2.0/). 
Collection structure revised: August 22, 2007 
PDF generated: October 26, 2012 
For copyright and attribution information for the modules contained in this collection, see p. 5.
Table of Contents 
1 Introduction 
1.1 PC Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 
2 Basic C++ 
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 
Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
iv 
Available for free at Connexions <http://cnx.org/content/col10450/1.1>
Chapter 1 
Introduction 
1.1 PC Architecture 
1.1.1 computer architecture1 
1.1.1.1 Computer Hardware 
A computer may be divided into six logical units. 
Input Unit 
 Obtain information from input devices: keyboards and mouse devices. 
 Place the information at the disposal of the other units to be processed. 
Output Unit 
 Take information that has been processed. 
 Place it on output devices: displayed on screens, printed on paper. 
Memory Unit 
 RAM (random access memory) is volatile, stores program and data. 
 ROM (read only memory) is non-volatile, contains fundamental instructions. 
Arithmetic and Logic Unit (ALU) 
 Perform all the arithmetic and logic operations: addition, subtraction, comparison, etc.. 
CPU 
 Tell the input unit when information should be read into the memory unit. 
 Tell the ALU when information from the memory should be used in calculations. 
 Tell the output unit when to send information from the memory unit to certain output devices. 
Secondary Storage. 
 Permanent storage areas for programs and data: magnetic tapes, magnetic hard disks, oppy disk, CD 
ROM 
1This content is available online at http://cnx.org/content/m15039/1.1/. 
Available for free at Connexions http://cnx.org/content/col10450/1.1 
1
2 CHAPTER 1. INTRODUCTION 
1.1.1.2 Computer Software 
 A computer program: set of instructions used to operate a computer to produce a specic result. 
 Computer programming: writing computer programs. 
 Programming languages: languages used to create computer programs. 
Machine Languages 
Example: 0101010 000000000001 000000000010 
 The lowest level of computer languages. 
 Programs consist of entirely of 1s and 0s. 
 Programs can control directly to the computer's hardware. 
 Machine language instructions consist of two parts: 
 Instruction part (opcode) is the leftmost group of bits and tells the computer the operation to be 
performed. 
 Address part species the memory address of the data to be used in the instruction. 
Assembly Languages 
Example: 
LOAD BASEPAY 
ADD OVERPAY 
STORE GROSSPAY 
 Perform the same tasks as machine languages, but use symbolic names for opcodes and operands. 
 An assembly language program must be translated into a machine language program. 
Translation program (assembler)Machine languageprogramAssembly languageprogram 
 Machine languages and assembly languages are called low-level languages since they are closest to 
computer hardware. 
High-level Programming Languages 
 Create computer programs using instructions that much easier to understand: English-like included 
with mathematical notations. 
 Programs written in high-level languages must be translated into a low level language using a program 
called a compiler. 
 Each line in a high-level language program is called a statement. 
Ex: Result = (First + Second)*Third. 
Application and System Software 
 Application software: perform particular tasks required by the users. 
 System software: must be available to any computer system to operate. The most important system 
software is the operating system (MS-DOS, UNIX, MS WINDOWS, MS WINDOWS NT) 
 Multitasking systems: operating systems allow user to run multiple programs. 
Available for free at Connexions http://cnx.org/content/col10450/1.1
Chapter 2 
Basic C++ 
Available for free at Connexions http://cnx.org/content/col10450/1.1 
3
4 INDEX 
Index of Keywords and Terms 
Keywords are listed by the section with that keyword (page numbers are in parentheses). Keywords 
do not necessarily appear in the text of the page. They are merely associated with that section. Ex. 
apples, Ÿ 1.1 (1) Terms are referenced by the page they appear on. Ex. apples, 1 
A architecture, Ÿ 1.1.1(1) C computer, Ÿ 1.1.1(1) 
Available for free at Connexions http://cnx.org/content/col10450/1.1
ATTRIBUTIONS 5 
Attributions 
Collection: Programming Methodology 
Edited by: Anh Duong 
URL: http://cnx.org/content/col10450/1.1/ 
License: http://creativecommons.org/licenses/by/2.0/ 
Module: computer architecture 
By: Anh Duong 
URL: http://cnx.org/content/m15039/1.1/ 
Pages: 1-2 
Copyright: Anh Duong 
License: http://creativecommons.org/licenses/by/2.0/ 
Available for free at Connexions http://cnx.org/content/col10450/1.1
Programming Methodology 
This course provides students with methodology in programming, using C++ in almost examples. 
About Connexions 
Since 1999, Connexions has been pioneering a global system where anyone can create course materials and 
make them fully accessible and easily reusable free of charge. We are a Web-based authoring, teaching and 
learning environment open to anyone interested in education, including students, teachers, professors and 
lifelong learners. We connect ideas and facilitate educational communities. 
Connexions's modular, interactive courses are in use worldwide by universities, community colleges, K-12 
schools, distance learners, and lifelong learners. Connexions materials are in many languages, including 
English, Spanish, Chinese, Japanese, Italian, Vietnamese, French, Portuguese, and Thai. Connexions is part 
of an exciting new information distribution system that allows for Print on Demand Books. Connexions 
has partnered with innovative on-demand publisher QOOP to accelerate the delivery of printed course 
materials and textbooks into classrooms worldwide at lower prices than traditional academic publishers.

Weitere ähnliche Inhalte

Ähnlich wie Programming methodology-1.1

Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageRai University
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c languageRai University
 
introduction to c language
 introduction to c language introduction to c language
introduction to c languageRai University
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageRai University
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageRai University
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerIOSR Journals
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerIOSR Journals
 
M11Cde Skills-Based Assessment
M11Cde Skills-Based AssessmentM11Cde Skills-Based Assessment
M11Cde Skills-Based AssessmentMegan Jones
 
Report windows 8.1 presentation
Report windows 8.1 presentationReport windows 8.1 presentation
Report windows 8.1 presentationAnkitKumarBansal5
 
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptxPT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptxAngelikaSolomon
 
Chapter_1_Computer_Abstractions_and_Tech.ppt
Chapter_1_Computer_Abstractions_and_Tech.pptChapter_1_Computer_Abstractions_and_Tech.ppt
Chapter_1_Computer_Abstractions_and_Tech.pptnivine7
 
Inptools Manual
Inptools ManualInptools Manual
Inptools ManualMawar 99
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThAram Mohammed
 
Introduction
IntroductionIntroduction
IntroductionKamran
 

Ähnlich wie Programming methodology-1.1 (20)

Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c language
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c language
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c language
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c language
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop Computer
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop Computer
 
Python_Module_1.pdf
Python_Module_1.pdfPython_Module_1.pdf
Python_Module_1.pdf
 
Book ppt
Book pptBook ppt
Book ppt
 
M11Cde Skills-Based Assessment
M11Cde Skills-Based AssessmentM11Cde Skills-Based Assessment
M11Cde Skills-Based Assessment
 
Activity 5
Activity 5Activity 5
Activity 5
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Report windows 8.1 presentation
Report windows 8.1 presentationReport windows 8.1 presentation
Report windows 8.1 presentation
 
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptxPT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
 
C programming part1
C programming part1C programming part1
C programming part1
 
Chapter_1_Computer_Abstractions_and_Tech.ppt
Chapter_1_Computer_Abstractions_and_Tech.pptChapter_1_Computer_Abstractions_and_Tech.ppt
Chapter_1_Computer_Abstractions_and_Tech.ppt
 
C 1
C 1C 1
C 1
 
Inptools Manual
Inptools ManualInptools Manual
Inptools Manual
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
Introduction
IntroductionIntroduction
Introduction
 

Mehr von NYversity

3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-distNYversity
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28NYversity
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27NYversity
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26NYversity
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25NYversity
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24NYversity
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23NYversity
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22NYversity
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20NYversity
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19NYversity
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18NYversity
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17NYversity
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16NYversity
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15NYversity
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14NYversity
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13NYversity
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12NYversity
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11NYversity
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10NYversity
 
Programming methodology lecture09
Programming methodology lecture09Programming methodology lecture09
Programming methodology lecture09NYversity
 

Mehr von NYversity (20)

3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-dist
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10
 
Programming methodology lecture09
Programming methodology lecture09Programming methodology lecture09
Programming methodology lecture09
 

Kürzlich hochgeladen

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Kürzlich hochgeladen (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

Programming methodology-1.1

  • 2.
  • 3. Programming Methodology By: Anh Duong Online: < http://cnx.org/content/col10450/1.1/ > C O N N E X I O N S Rice University, Houston, Texas
  • 4. This selection and arrangement of content as a collection is copyrighted by Anh Duong. It is licensed under the Creative Commons Attribution 2.0 license (http://creativecommons.org/licenses/by/2.0/). Collection structure revised: August 22, 2007 PDF generated: October 26, 2012 For copyright and attribution information for the modules contained in this collection, see p. 5.
  • 5. Table of Contents 1 Introduction 1.1 PC Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Basic C++ Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  • 6. iv Available for free at Connexions <http://cnx.org/content/col10450/1.1>
  • 7. Chapter 1 Introduction 1.1 PC Architecture 1.1.1 computer architecture1 1.1.1.1 Computer Hardware A computer may be divided into six logical units. Input Unit Obtain information from input devices: keyboards and mouse devices. Place the information at the disposal of the other units to be processed. Output Unit Take information that has been processed. Place it on output devices: displayed on screens, printed on paper. Memory Unit RAM (random access memory) is volatile, stores program and data. ROM (read only memory) is non-volatile, contains fundamental instructions. Arithmetic and Logic Unit (ALU) Perform all the arithmetic and logic operations: addition, subtraction, comparison, etc.. CPU Tell the input unit when information should be read into the memory unit. Tell the ALU when information from the memory should be used in calculations. Tell the output unit when to send information from the memory unit to certain output devices. Secondary Storage. Permanent storage areas for programs and data: magnetic tapes, magnetic hard disks, oppy disk, CD ROM 1This content is available online at http://cnx.org/content/m15039/1.1/. Available for free at Connexions http://cnx.org/content/col10450/1.1 1
  • 8. 2 CHAPTER 1. INTRODUCTION 1.1.1.2 Computer Software A computer program: set of instructions used to operate a computer to produce a specic result. Computer programming: writing computer programs. Programming languages: languages used to create computer programs. Machine Languages Example: 0101010 000000000001 000000000010 The lowest level of computer languages. Programs consist of entirely of 1s and 0s. Programs can control directly to the computer's hardware. Machine language instructions consist of two parts: Instruction part (opcode) is the leftmost group of bits and tells the computer the operation to be performed. Address part species the memory address of the data to be used in the instruction. Assembly Languages Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY Perform the same tasks as machine languages, but use symbolic names for opcodes and operands. An assembly language program must be translated into a machine language program. Translation program (assembler)Machine languageprogramAssembly languageprogram Machine languages and assembly languages are called low-level languages since they are closest to computer hardware. High-level Programming Languages Create computer programs using instructions that much easier to understand: English-like included with mathematical notations. Programs written in high-level languages must be translated into a low level language using a program called a compiler. Each line in a high-level language program is called a statement. Ex: Result = (First + Second)*Third. Application and System Software Application software: perform particular tasks required by the users. System software: must be available to any computer system to operate. The most important system software is the operating system (MS-DOS, UNIX, MS WINDOWS, MS WINDOWS NT) Multitasking systems: operating systems allow user to run multiple programs. Available for free at Connexions http://cnx.org/content/col10450/1.1
  • 9. Chapter 2 Basic C++ Available for free at Connexions http://cnx.org/content/col10450/1.1 3
  • 10. 4 INDEX Index of Keywords and Terms Keywords are listed by the section with that keyword (page numbers are in parentheses). Keywords do not necessarily appear in the text of the page. They are merely associated with that section. Ex. apples, Ÿ 1.1 (1) Terms are referenced by the page they appear on. Ex. apples, 1 A architecture, Ÿ 1.1.1(1) C computer, Ÿ 1.1.1(1) Available for free at Connexions http://cnx.org/content/col10450/1.1
  • 11. ATTRIBUTIONS 5 Attributions Collection: Programming Methodology Edited by: Anh Duong URL: http://cnx.org/content/col10450/1.1/ License: http://creativecommons.org/licenses/by/2.0/ Module: computer architecture By: Anh Duong URL: http://cnx.org/content/m15039/1.1/ Pages: 1-2 Copyright: Anh Duong License: http://creativecommons.org/licenses/by/2.0/ Available for free at Connexions http://cnx.org/content/col10450/1.1
  • 12. Programming Methodology This course provides students with methodology in programming, using C++ in almost examples. About Connexions Since 1999, Connexions has been pioneering a global system where anyone can create course materials and make them fully accessible and easily reusable free of charge. We are a Web-based authoring, teaching and learning environment open to anyone interested in education, including students, teachers, professors and lifelong learners. We connect ideas and facilitate educational communities. Connexions's modular, interactive courses are in use worldwide by universities, community colleges, K-12 schools, distance learners, and lifelong learners. Connexions materials are in many languages, including English, Spanish, Chinese, Japanese, Italian, Vietnamese, French, Portuguese, and Thai. Connexions is part of an exciting new information distribution system that allows for Print on Demand Books. Connexions has partnered with innovative on-demand publisher QOOP to accelerate the delivery of printed course materials and textbooks into classrooms worldwide at lower prices than traditional academic publishers.