SlideShare a Scribd company logo
1 of 21
Computer and programing basics
 Course outline ….
 an over view of computers and programing languages
 Algorithms and flowcharts
 Elements of a computer system
 The language of the computer
 The evolution of programming languages
 Programs / software types
 Road map from zero to hero
Elements of a computer system..
#Hardware
 Central processing unit (cpu)
 Main memory
 Secondary storage
 input/output devices
#Software
 Operating system
 Application software
Central processing unit(CPU)
 The main components of CPU are
 Control unit (cu)
 Arithmetic and logic unit (ALU)
 Registers
Central processing unit (CPU)..
#CU (control unit )
 Fetches and decodes instructions
 Controls flow of information in and out of main memory
 Controls operations of internal CPU components
#ALU (arithmetic logic unit )
 Carries out all arithmetic and logical operations
 #Registers.
 PC (programing counter )points to next instruction to be executed )
 IR(instruction register) holds instruction currently being executed
Main memory ..
 Directly connected to the cpu
 All programs must be loaded into main memory before they can executed
 All data must be brought into main memory before it can be manipulated
 When computer power is turned off , every thing in main memory is lost
Secondary storage ..
 Secondary storage are devices that stores information Permanentlly
 Examples of secondary storage
 Hard disks
 Floppy disks
 CD_Roms
 Tapes
 Flash drivers
Input/output devices
 Input devices feed data and programs into computers they include;
 Keyboard
 Mouse
 Secondary storage
 Output devices display results they include
 Monitor
 Printer
 Secondary storage
Program software ..
 Program that perform a specific task
 Software program /operating system
 Take control of computer and interface between user and machine such as open
windows ,shut down …etc
 Operating system monitors the over all activity of the computer and provides services.
 Application programs perform a specific task
 Social media ( facebook , whats app, tweeter)
 Microsoft office (word , powerpoint, excel)
 Word processors , spreadsheets , games
The languages of acomputer ..
 Digital signals are sequences of 0s and 1s
 Machine language; the language of a computer
 Early computers were programmed in machine language
 To calculate wages= rates *hours (in machine language )
 100100 010001 // load
 100110 010010 // multiply
 100010 010011 // store
 Oops such a hard work
Assembly landguages ..
 Assembly language are instructions easy to remember
 Assembler translates a program written in assembly into machine language
 Examples of instructions in assembly language /machine language
Assembly language Machine code
Load 100100
Store 100010
mult 100110
add 100101
High level languages
 High level languages include basic ;
 Fortran , cobol , pascal , c++ , c , java
 Notes …..a compiler translates a program written in a high level language into
machine code
 A c++ line code for example
 cout<<“hello world”<<endl;
 cout this is a c++ output statement. it causes the computer to evaluate the
expression after the pair of symbles << and display the result in screen .
 endl causes the insertion point to move to the beginning of the next line .
 C++ contains various of expressions such as arithmetic ,logical operators and
strings
Processing a program
 The following steps are necessary to process a program in c++
 Step1
 Use text editor to create a c++ program. This program is called source code or source
program.
 Step2
 In a c++ program , statements that begins with # are called preprocessor directives.
These statements are processed by a program called preprocessor.
 step3
 Compiler is used to ;
 Verifies that the program obey the rules of programming language and check the
source program for syntax errors.
 Translte the program into equivalent machine language (object program).
Processing a program…
 Step4
 Programs in high level languages are developed using a software development kit
(SDK)
 SDK contains programs that are useful in creating your program such as
mathematical functions , The prewritten code resides in a library .
 Linker combines the object code with program from libraries .
 step5
 You must load the executable program into main memory for execution.
 Loader ; a program that loads an executable program into main memory .
 Step6
 The final step is to execute the program.
Problem solving ..
 Programing is a process of problem solving..
 Problem solving techniques
 Analyze the problem
 Outline the problem requirements
 Design steps 9(algorithm) to solve the problem
 Algoithm
 Step by step problem solving process
 Solution achieved in finite amount of time
Problem solving process…
 the problem
 outline the problem and its requirements
 Design steps (algorithm) to solve the problem
 Step2 Implement the algorithm
 Implement the algorithm in code
 Verify that the algorithm works
 Step3 Maintenance
 Use and modify the program if the problem domain changes
Compiling and linking ..
 Run the code through compiler
 If compiler generates errors
 Look at code and remove errors
 Run code again through compiler
 If there are no syntax errors
 Compiler generates equivalent machine code
 Linker links machine code with system resourcs
ANSI/ISO standard c++
 C++ is evolved from c
 C++ designed by Bjarne stroustrup at bell laboratories in early 1980s
 C++ programs were not always portable from one compiler to an other
 In mid 1998 ,ANSI/ISO c++ language Standards were approved
extra notes …What is software!!
 Software consists of a set of machine readable instructions called programs , that
cause the computer to perform a task.
 There are two basic types of software
 Application software
 Designed to satisfy users needs .
 May be custom or packaged (off the shelf)
 System software
 Without hardware and applications are useless
 Operating system coordinate all hardware components
 compilers translate source program into object program
extra notes..Programing languages
 Enables a programmer to write programs that are more or less independent of a
particular type of computer .
 Considered high level languages because they are closer to human language and
far further from machine code .
 Generations of computer languages are ;
 1st generation is ; binary language / machine code
 2nd generation is ; assembly / low level language
 3rd generation Is ; high level languages as c , c++
 4th generation is ; query language ; used to access database as SQL
 5th generation is ; artificial intelligence languages , as prolog and lisp
extra notes.. History of algorithm
 Named after the persian mathematician muhammad ibn musa al-Khwarizmi (780-
850) in (Khwarizmi, Uzbekistan )developed a strategy for calculating heritage
proportions using algebraic methods
 His name was turned into algorithm and that evolved algorism
summary
 Computer is an electronic device that can perform arithmetic and logical
operations
 Computer system has hardware and software
 Central processing unit (CPU) is brain of machine
 Primary storage (main memory) is volatile ,secondary storage is permanent
 Operating system monitors the overall activity of the computer and provides
services
 Various kind of languages classifyded as ; assembly , medium , high level and
machine code

More Related Content

Similar to Computer and programing basics.pptx

Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
NSU-Biliran Campus
 
Introduction To Computer and Java
Introduction To Computer and JavaIntroduction To Computer and Java
Introduction To Computer and Java
PRN USM
 
Programming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdfProgramming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdf
BernardVelasco1
 

Similar to Computer and programing basics.pptx (20)

Introductiontocomputerprogramming 140713205433-phpapp02 (1)
Introductiontocomputerprogramming 140713205433-phpapp02 (1)Introductiontocomputerprogramming 140713205433-phpapp02 (1)
Introductiontocomputerprogramming 140713205433-phpapp02 (1)
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Software Concepts Notes
Software Concepts NotesSoftware Concepts Notes
Software Concepts Notes
 
Introduction To Computer and Java
Introduction To Computer and JavaIntroduction To Computer and Java
Introduction To Computer and Java
 
Savitch ch 01
Savitch ch 01Savitch ch 01
Savitch ch 01
 
Savitch ch 01
Savitch ch 01Savitch ch 01
Savitch ch 01
 
L2 ch1
L2  ch1L2  ch1
L2 ch1
 
Lecture 2 - Introductory Concepts
Lecture 2 - Introductory ConceptsLecture 2 - Introductory Concepts
Lecture 2 - Introductory Concepts
 
Understanding Computer Systems
Understanding Computer SystemsUnderstanding Computer Systems
Understanding Computer Systems
 
Computer program, computer languages, computer software
Computer program, computer languages, computer softwareComputer program, computer languages, computer software
Computer program, computer languages, computer software
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programming
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
Lecture01
Lecture01Lecture01
Lecture01
 
UNIT 2 ECSE-2.pptx
UNIT 2 ECSE-2.pptxUNIT 2 ECSE-2.pptx
UNIT 2 ECSE-2.pptx
 
Programming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdfProgramming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdf
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
 
Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic concepts
 
6272 cnote
6272 cnote6272 cnote
6272 cnote
 
C progrmming
C progrmmingC progrmming
C progrmming
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 

Recently uploaded

一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
ayoqf
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
ougvy
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
wsppdmt
 
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy CytotecAbortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
uodye
 
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
ougvy
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
uodye
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
uodye
 
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
vwymvu
 
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
DUBAI (+971)581248768 BUY ABORTION PILLS IN ABU dhabi...Qatar
 
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
wpkuukw
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
ahmedjiabur940
 
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotecAbortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
uodye
 

Recently uploaded (20)

Test bank for consumer behaviour buying having and being eighth canadian edit...
Test bank for consumer behaviour buying having and being eighth canadian edit...Test bank for consumer behaviour buying having and being eighth canadian edit...
Test bank for consumer behaviour buying having and being eighth canadian edit...
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
 
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy CytotecAbortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy Cytotec
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
一比一原版(RMIT毕业证书)墨尔本皇家理工大学毕业证成绩单学位证靠谱定制
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
 
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
 
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
 
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotecAbortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
 
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdfDell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
 
NO1 Pakistan Best vashikaran specialist in UK USA UAE London Dubai Canada Ame...
NO1 Pakistan Best vashikaran specialist in UK USA UAE London Dubai Canada Ame...NO1 Pakistan Best vashikaran specialist in UK USA UAE London Dubai Canada Ame...
NO1 Pakistan Best vashikaran specialist in UK USA UAE London Dubai Canada Ame...
 

Computer and programing basics.pptx

  • 1. Computer and programing basics  Course outline ….  an over view of computers and programing languages  Algorithms and flowcharts  Elements of a computer system  The language of the computer  The evolution of programming languages  Programs / software types  Road map from zero to hero
  • 2. Elements of a computer system.. #Hardware  Central processing unit (cpu)  Main memory  Secondary storage  input/output devices #Software  Operating system  Application software
  • 3. Central processing unit(CPU)  The main components of CPU are  Control unit (cu)  Arithmetic and logic unit (ALU)  Registers
  • 4. Central processing unit (CPU).. #CU (control unit )  Fetches and decodes instructions  Controls flow of information in and out of main memory  Controls operations of internal CPU components #ALU (arithmetic logic unit )  Carries out all arithmetic and logical operations  #Registers.  PC (programing counter )points to next instruction to be executed )  IR(instruction register) holds instruction currently being executed
  • 5. Main memory ..  Directly connected to the cpu  All programs must be loaded into main memory before they can executed  All data must be brought into main memory before it can be manipulated  When computer power is turned off , every thing in main memory is lost
  • 6. Secondary storage ..  Secondary storage are devices that stores information Permanentlly  Examples of secondary storage  Hard disks  Floppy disks  CD_Roms  Tapes  Flash drivers
  • 7. Input/output devices  Input devices feed data and programs into computers they include;  Keyboard  Mouse  Secondary storage  Output devices display results they include  Monitor  Printer  Secondary storage
  • 8. Program software ..  Program that perform a specific task  Software program /operating system  Take control of computer and interface between user and machine such as open windows ,shut down …etc  Operating system monitors the over all activity of the computer and provides services.  Application programs perform a specific task  Social media ( facebook , whats app, tweeter)  Microsoft office (word , powerpoint, excel)  Word processors , spreadsheets , games
  • 9. The languages of acomputer ..  Digital signals are sequences of 0s and 1s  Machine language; the language of a computer  Early computers were programmed in machine language  To calculate wages= rates *hours (in machine language )  100100 010001 // load  100110 010010 // multiply  100010 010011 // store  Oops such a hard work
  • 10. Assembly landguages ..  Assembly language are instructions easy to remember  Assembler translates a program written in assembly into machine language  Examples of instructions in assembly language /machine language Assembly language Machine code Load 100100 Store 100010 mult 100110 add 100101
  • 11. High level languages  High level languages include basic ;  Fortran , cobol , pascal , c++ , c , java  Notes …..a compiler translates a program written in a high level language into machine code  A c++ line code for example  cout<<“hello world”<<endl;  cout this is a c++ output statement. it causes the computer to evaluate the expression after the pair of symbles << and display the result in screen .  endl causes the insertion point to move to the beginning of the next line .  C++ contains various of expressions such as arithmetic ,logical operators and strings
  • 12. Processing a program  The following steps are necessary to process a program in c++  Step1  Use text editor to create a c++ program. This program is called source code or source program.  Step2  In a c++ program , statements that begins with # are called preprocessor directives. These statements are processed by a program called preprocessor.  step3  Compiler is used to ;  Verifies that the program obey the rules of programming language and check the source program for syntax errors.  Translte the program into equivalent machine language (object program).
  • 13. Processing a program…  Step4  Programs in high level languages are developed using a software development kit (SDK)  SDK contains programs that are useful in creating your program such as mathematical functions , The prewritten code resides in a library .  Linker combines the object code with program from libraries .  step5  You must load the executable program into main memory for execution.  Loader ; a program that loads an executable program into main memory .  Step6  The final step is to execute the program.
  • 14. Problem solving ..  Programing is a process of problem solving..  Problem solving techniques  Analyze the problem  Outline the problem requirements  Design steps 9(algorithm) to solve the problem  Algoithm  Step by step problem solving process  Solution achieved in finite amount of time
  • 15. Problem solving process…  the problem  outline the problem and its requirements  Design steps (algorithm) to solve the problem  Step2 Implement the algorithm  Implement the algorithm in code  Verify that the algorithm works  Step3 Maintenance  Use and modify the program if the problem domain changes
  • 16. Compiling and linking ..  Run the code through compiler  If compiler generates errors  Look at code and remove errors  Run code again through compiler  If there are no syntax errors  Compiler generates equivalent machine code  Linker links machine code with system resourcs
  • 17. ANSI/ISO standard c++  C++ is evolved from c  C++ designed by Bjarne stroustrup at bell laboratories in early 1980s  C++ programs were not always portable from one compiler to an other  In mid 1998 ,ANSI/ISO c++ language Standards were approved
  • 18. extra notes …What is software!!  Software consists of a set of machine readable instructions called programs , that cause the computer to perform a task.  There are two basic types of software  Application software  Designed to satisfy users needs .  May be custom or packaged (off the shelf)  System software  Without hardware and applications are useless  Operating system coordinate all hardware components  compilers translate source program into object program
  • 19. extra notes..Programing languages  Enables a programmer to write programs that are more or less independent of a particular type of computer .  Considered high level languages because they are closer to human language and far further from machine code .  Generations of computer languages are ;  1st generation is ; binary language / machine code  2nd generation is ; assembly / low level language  3rd generation Is ; high level languages as c , c++  4th generation is ; query language ; used to access database as SQL  5th generation is ; artificial intelligence languages , as prolog and lisp
  • 20. extra notes.. History of algorithm  Named after the persian mathematician muhammad ibn musa al-Khwarizmi (780- 850) in (Khwarizmi, Uzbekistan )developed a strategy for calculating heritage proportions using algebraic methods  His name was turned into algorithm and that evolved algorism
  • 21. summary  Computer is an electronic device that can perform arithmetic and logical operations  Computer system has hardware and software  Central processing unit (CPU) is brain of machine  Primary storage (main memory) is volatile ,secondary storage is permanent  Operating system monitors the overall activity of the computer and provides services  Various kind of languages classifyded as ; assembly , medium , high level and machine code