Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Size: px
Start display at page:

Download "Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program"

Transcription

1 Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program written in a high-level programming language into machine language; 3) formulate an algorithm given a problem; and 4) construct pseudo codes and flowcharts.

2 Computer program set of instructions that the computer follows to solve a problem. Programs must be in machine language.

3 Example of machine language

4 The 0 s and 1 s are stored inside the computer using two levels of electric voltages. 0 volts represent 0. 5 volts represent 1. Other conventions may be used. Q: What is a machine language? A: Machine language is the language which the computer can directly execute. The language consists of a sequence of 0 s and 1 s.

5 High-Level language - consists of Englishlike statements that make it easier for programmers to write programs. Example: C, Pascal, FORTRAN, COBOL FORTRAN - a blend derived from The IBM Mathematical Formula Translating System) COBOL - COmmon Business-Oriented Language

6 #include <stdio.h> int x, y, z; main () { printf("enter two integers: "); scanf("%d %d", &x, &y); z = x*y; printf("product = %d\n", z); }

7 Translators computer programs that translate programs written in high-level language into machine language. - Also known as compilers. High-Level Language Program Translator Fig 2.1 Translation Process Machine Language Program

8 low-level programming language _ a programming language that provides little or no abstraction from a computer's instruction set architecture. - Machine code - Assembly Language

9 There are several different programming languages. Each of these languages has its own vocabulary and rules to form programs. The choice of which programming language to use depends on the kind of program you re going to write.

10 For example, FORTRAN (FORmula TRANslation) - for scientific computations - capable of dealing with very large and very small numbers, making the computations accurate up to, say, the 1018th decimal digit. COBOL (COmmon Business Oriented Language) when writing business applications.

11 Computer Problem-Solving Process: 1) Problem is analyzed. 2) Formulate appropriate algorithm. 3) Write equivalent program in High-Level Language. 4) The translation of the program from highlevel language to machine language follows 5) Program execution to output results.

12 Problem Algorithm analyze program Program written in high-level language translate Program written in machine language execute Output Figure 2.2. Problem-solving process using a computer

13 Algorithm - a solution to the problem and is specified by following a sequence of steps. Example: Compute for the average of 2 numbers Algorithm 1. Obtain the first number. 2. Obtain the second number. 3. Add the two numbers. 4. Divide the sum by two. 5. Display the quotient.

14 Variable - an entity that contains a value. 2 ways of formally representing algorithms: 1) using pseudo codes 2) using flowcharts Pseudo code - consists of English-like phrases written in a sequence of lines.

15 Pseudo code of the algorithm would be: 1. Input the first number. Store it in variable X. 2. Input the second number. Store it in variable Y. 3. SUM X + Y 4. AVE SUM/2 5. Output the value of AVE. 4 Variables: X, Y, SUM, AVE means we set the value of the variable in the left hand side equal to the value of the expression on the right hand side. The pseudo code above can actually be made shorter by deleting the 3rd line and changing the 4th line to AVE (X + Y)/2.

16 Another way to represent an algorithm is to use a flowchart. Flowchart - a pictorial representation. - allows us to easily visualize the structure of the algorithm.

17 Start / Stop Input Processing Output Decision Flow Lines Figure 2.3 Flow Chart Symbols

18 Start X Y SUM X+Y AVE SUM/2 AVE Stop Figure 2.4. Flowchart to compute the average of two numbers

19 Formulating algorithms and constructing flowcharts require a great deal of logical thinking. It is the first step towards writing a program.

20 Computers can directly execute programs written in machine language only. Programmers use High-Level Language to write programs. Programs are translated to machine language using a special kind of program called a compiler. Algorithm is an outline of the solution Algorithms can be represented in 2 ways: Pseudo code and Flowcharts A pseudo code consists of English-like phrases to describe the algorithm A flowchart consists of graphical symbols.

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG) SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2

More information

Programming Languages and Program Development

Programming Languages and Program Development Programming Languages and Program Development 1 Programming Languages and How They Work Programming o Process used to create software programs Programmers o People who use programming languages to create

More information

Chapter 3 Structured Program Development

Chapter 3 Structured Program Development 1 Chapter 3 Structured Program Development Copyright 2007 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 3 - Structured Program Development Outline 3.1 Introduction

More information

Structured Program Development in C

Structured Program Development in C 1 3 Structured Program Development in C 3.2 Algorithms 2 Computing problems All can be solved by executing a series of actions in a specific order Algorithm: procedure in terms of Actions to be executed

More information

Python - Week 1. Mohammad Shokoohi-Yekta

Python - Week 1. Mohammad Shokoohi-Yekta Python - Week 1 Mohammad Shokoohi-Yekta 1 An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Program Development Cycle 1.3 Programming Tools 1.4 Starting Python 2 Communicating

More information

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION INTRODUCTION Programming Fundamentals Unit 1 In order to communicate with each other, we use natural languages like Bengali, English, Hindi, Urdu, French, Gujarati etc. We have different language around

More information

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 1 Edgardo Molina Fall 2013 City College of New York 1 Introduction to Computing Lectures: Tuesday and Thursday s (2-2:50 pm) Location: NAC 1/202 Recitation:

More information

Programming. leads to programming languages. leads to operating systems

Programming. leads to programming languages. leads to operating systems Programming it's hard to do the programming to get something done details are hard to get right, very complicated, finicky not enough skilled people to do what is needed therefore, enlist machines to do

More information

Chapter 1 Getting Started Structured Programming 1

Chapter 1 Getting Started Structured Programming 1 Chapter 1 Getting Started 204112 Structured Programming 1 Outline Introduction to Programming Algorithm Programming Style The printf( ) Function Common Programming Errors Introduction to Modularity Top-Down

More information

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY Dr. John Georgas, Northern Arizona University Copyright John Georgas All Rights Reserved Outline Current Programming languages Compiled and interpreted implementations

More information

Structured Program Development

Structured Program Development Structured Program Development Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan Outline Introduction The selection statement if if.else switch The

More information

How to Do Word Problems. Building the Foundation

How to Do Word Problems. Building the Foundation Building the Foundation The notion that Mathematics is a language, is held by many mathematicians and is being expressed on frequent occasions. Mathematics is the language of science. It is unique among

More information

3/13/2012. ESc101: Introduction to Computers and Programming Languages

3/13/2012. ESc101: Introduction to Computers and Programming Languages ESc101: Introduction to Computers and Programming Languages Instructor: Krithika Venkataramani Semester 2, 2011-2012 The content of these slides is taken from previous course lectures of Prof. R. K. Ghosh,

More information

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102 Programming Languages and Program Development Life Cycle Fall 2016 Introduction to Information and Communication Technologies CSD 102 Outline The most common approaches to program design and development

More information

Evolution of Fortran. Presented by: Tauqeer Ahmad. Seminar on Languages for Scientific Computing

Evolution of Fortran. Presented by: Tauqeer Ahmad. Seminar on Languages for Scientific Computing Evolution of Fortran Presented by: Seminar on Languages for Scientific Computing Outline (1) History of Fortran Versions FORTRAN I FORTRAN II FORTRAN III FORTRAN IV FORTRAN 66 FORTRAN 77 Evolution of FORTRAN

More information

Introduction. Computers, algorithms

Introduction. Computers, algorithms Introduction Computers, algorithms Computer mathematical engine that processes programs and data it uses some physical principle, for example: mechanical computers Pascal electronic computers after the

More information

CSE123 LECTURE 3-1. Program Design and Control Structures Repetitions (Loops) 1-1

CSE123 LECTURE 3-1. Program Design and Control Structures Repetitions (Loops) 1-1 CSE123 LECTURE 3-1 Program Design and Control Structures Repetitions (Loops) 1-1 The Essentials of Repetition Loop Group of instructions computer executes repeatedly while some condition remains true Counter-controlled

More information

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Problem Solving and Program Design - Chapter 1. Cory L. Strope Problem Solving and Program Design - Chapter 1 Cory L. Strope Overview of Computers and Programming Computer Hardware Computer Software Software Development (Problem Solving) Pseudocode Flowchart Intro.

More information

Outline. Program development cycle. Algorithms development and representation. Examples.

Outline. Program development cycle. Algorithms development and representation. Examples. Outline Program development cycle. Algorithms development and representation. Examples. 1 Program Development Cycle Program development cycle steps: Problem definition. Problem analysis (understanding).

More information

Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo

Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo Purpose: # Describe the method for constructing algorithms. # Describe an informal language for

More information

CS133 C Programming. Instructor: Jialiang Lu Office: Information Center 703

CS133 C Programming. Instructor: Jialiang Lu   Office: Information Center 703 CS133 C Programming Instructor: Jialiang Lu Email: jialiang.lu@sjtu.edu.cn Office: Information Center 703 1 Course Information: Course Page: http://wirelesslab.sjtu.edu.cn/~jlu/teaching/cp2014/ Assignments

More information

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps Overview By the end of the lab, you will be able to: use fscanf() to accept inputs from the user and use fprint() for print statements to the

More information

Lecture 10: Recursive Functions. Computer System and programming in C 1

Lecture 10: Recursive Functions. Computer System and programming in C 1 Lecture 10: Recursive Functions Computer System and programming in C 1 Outline Introducing Recursive Functions Format of recursive Functions Tracing Recursive Functions Examples Tracing using Recursive

More information

Chapter 1: An Overview of Computers and Logic

Chapter 1: An Overview of Computers and Logic Chapter 1: An Overview of Computers and Logic Programming Logic and Design, Third Edition Comprehensive Objectives After studying Chapter 1, you should be able to: Understand computer components and operations

More information

SOEE1160: Computers and Programming in Geosciences Semester /08. Dr. Sebastian Rost

SOEE1160: Computers and Programming in Geosciences Semester /08. Dr. Sebastian Rost SOEE1160 L3-1 Structured Programming SOEE1160: Computers and Programming in Geosciences Semester 2 2007/08 Dr. Sebastian Rost In a sense one could see a computer program as a recipe (this is pretty much

More information

Discovering Computers 2008

Discovering Computers 2008 Discovering Computers 2008 Chapter 13 (a) Programming Languages and Program Development 1 Chapter 13 Objectives Differentiate between machine and assembly languages Identify and discuss the purpose of

More information

Computers and FORTRAN Language Fortran 95/2003. Dr. Isaac Gang Tuesday March 1, 2011 Lecture 3 notes. Topics:

Computers and FORTRAN Language Fortran 95/2003. Dr. Isaac Gang Tuesday March 1, 2011 Lecture 3 notes. Topics: Computers and FORTRAN Language Fortran 95/2003 Dr. Isaac Gang Tuesday March 1, 2011 Lecture 3 notes Topics: - Program Design - Logical Operators - Logical Variables - Control Statements Any FORTRAN program

More information

BSM540 Basics of C Language

BSM540 Basics of C Language BSM540 Basics of C Language Chapter 9: Functions I Prof. Manar Mohaisen Department of EEC Engineering Review of the Precedent Lecture Introduce the switch and goto statements Introduce the arrays in C

More information

INFS 214: Introduction to Computing

INFS 214: Introduction to Computing INFS 214: Introduction to Computing Session 11 Principles of Programming Lecturer: Dr. Ebenezer Ankrah, Dept. of Information Studies Contact Information: eankrah@ug.edu.gh College of Education School of

More information

Numerical Methods in Scientific Computation

Numerical Methods in Scientific Computation Numerical Methods in Scientific Computation Programming and Software Introduction to error analysis 1 Packages vs. Programming Packages MATLAB Excel Mathematica Maple Packages do the work for you Most

More information

بسم اهلل الرمحن الرحيم

بسم اهلل الرمحن الرحيم بسم اهلل الرمحن الرحيم Fundamentals of Programming C Session # 3 By: Saeed Haratian Spring 2016 Outlines Equality and Relational Operators A Simple C Program: Relations Keywords Algorithm Flow Chart Pseudo

More information

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2013 C++ Programming Language Lab # 6 Functions C++ Programming Language Lab # 6 Functions Objective: To be familiar with

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C C: A High-Level Language Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University! Gives

More information

Arithmetic type issues

Arithmetic type issues Arithmetic type issues Type combination and promotion ( a 32) = 97 32 = 65 = A Smaller type (char) is promoted to be the same size as the larger type (int) Determined at compile time - based purely on

More information

Software Lesson 1 Outline

Software Lesson 1 Outline Software Lesson 1 Outline 1. Software Lesson 1 Outline 2. What is Software? A Program? Data? 3. What are Instructions? 4. What is a Programming Language? 5. What is Source Code? What is a Source File?

More information

for Loop Lesson 1 Outline

for Loop Lesson 1 Outline Outline 1. Outline 2. A while Loop That Counts #1 3. A while Loop That Counts #2 4. A while Loop That Counts #3 5. A while Loop That Counts #4 6. Count-Controlled Loops #1 7. Count-Controlled Loops #2

More information

CpSc 1111 Lab 4 Formatting and Flow Control

CpSc 1111 Lab 4 Formatting and Flow Control CpSc 1111 Lab 4 Formatting and Flow Control Overview By the end of the lab, you will be able to: use fscanf() to accept a character input from the user and print out the ASCII decimal, octal, and hexadecimal

More information

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions.

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions. Introduction In the programs that we have dealt with so far, all statements inside the main function were executed in sequence as they appeared, one after the other. This type of sequencing is adequate

More information

Beyond Base 10: Non-decimal Based Number Systems

Beyond Base 10: Non-decimal Based Number Systems Beyond Base : Non-decimal Based Number Systems What is the decimal based number system? How do other number systems work (binary, octal and hex) How to convert to and from nondecimal number systems to

More information

FLOW CHART AND PSEUDO CODE

FLOW CHART AND PSEUDO CODE FLOW CHART AND PSEUDO CODE Flowchart A Flowchart is a pictorial representation of an algorithm. The First flowchart is made by John Von Newman in 1945. It is a symbolic diagram of operation sequence, dataflow,

More information

Procedural Programming

Procedural Programming Unit 18: Procedural Unit code: D/601/1293 QCF Level 4: BTEC Higher National Credit value: 15 Aim To provide learners with an understanding of the principles of procedural programming and to enable them

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C C: A High-Level Language Gives symbolic names for containers of values don t need to know which register or memory location Provides abstraction of underlying

More information

Lecture 01 & 02 Computer Programming

Lecture 01 & 02 Computer Programming Lecture 01 & 02 Computer Programming 15 Computer Systems Engineering Second Semester By: Mr. Ali Asghar Manjotho, Lecturer, CSE-MUET Contents Computer programming (LL 02) Why programming? (LL 02) Instructions

More information

The. Binary. Number System

The. Binary. Number System The Binary Number System Why is Binary important? Everything on a computer (or other digital device) is represented by Binary Numbers One to Five in various systems 1 2 3 4 5 I II III IV V 1 10 11 100

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University C: A High-Level Language! Gives

More information

1. In COMAL language programs, parameters after name of procedure must be put in A. brackets B. back-slash C. insecure data D.

1. In COMAL language programs, parameters after name of procedure must be put in A. brackets B. back-slash C. insecure data D. 1. In COMAL language programs, parameters after name of procedure must be put in A. brackets B. back-slash C. insecure data D. punctuation marks 2. Programming language COBOL works best if used for A.

More information

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples Outline Introduction to Programming (in C++) Introduction Programming examples Algorithms, programming languages and computer programs Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer

More information

Fundamentals of Programming Session 2

Fundamentals of Programming Session 2 Fundamentals of Programming Session 2 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 Sharif University of Technology Outlines Programming Language Binary numbers Addition Subtraction

More information

Procedural Programming

Procedural Programming Exercise 3 (SS 2016) 07.06.2016 What will I learn in the 3. Exercise Functions Arrays Exercise(s) 1 Home exercise 2 (3 points) Write a program which allows the calculation of the mean of given integer

More information

I101/B100 Problem Solving with Computers

I101/B100 Problem Solving with Computers I101/B100 Problem Solving with Computers By: Dr. Hossein Hakimzadeh Computer Science and Informatics IU South Bend 1 What skill are needed for software development? Problem Solving skills. People skills.

More information

Scientific Notation & Significant Figures. Mergenthaler Vo-Tech HS Mrs. Judith B. Abergos Chemistry 2013

Scientific Notation & Significant Figures. Mergenthaler Vo-Tech HS Mrs. Judith B. Abergos Chemistry 2013 Scientific Notation & Significant Figures Mergenthaler Vo-Tech HS Mrs. Judith B. Abergos Chemistry 2013 Significant Figures Significant Figures digits that show how precise a measurement is The more significant

More information

EC 413 Computer Organization

EC 413 Computer Organization EC 413 Computer Organization Review I Prof. Michel A. Kinsy Computing: The Art of Abstraction Application Algorithm Programming Language Operating System/Virtual Machine Instruction Set Architecture (ISA)

More information

Programming. translate our algorithm into set of instructions machine can execute

Programming. translate our algorithm into set of instructions machine can execute Programming translate our algorithm into set of instructions machine can execute Programming it's hard to do the programming to get something done details are hard to get right, very complicated, finicky

More information

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound). ELECTRONIC COMPUTERS THEN AND NOW Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound). In the Past (i.e., during

More information

CpSc 1111 Lab 5 Formatting and Flow Control

CpSc 1111 Lab 5 Formatting and Flow Control CpSc 1111 Lab 5 Formatting and Flow Control Overview By the end of the lab, you will be able to: use fscanf() to accept a character input from the user execute a basic block iteratively using loops to

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified by Chris Wilcox, Yashwant Malaiya Colorado State University C: A High-Level Language

More information

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode STUDENT OUTLINE Lesson 8: Structured Programming, Control Structures, if- Statements, Pseudocode INTRODUCTION: This lesson is the first of four covering the standard control structures of a high-level

More information

Unit II. (i) Computer Programming Languages

Unit II. (i) Computer Programming Languages Unit II. (i) Computer Programming Languages Need of a computer programming language: A programming language is an artificial language designed to communicate instructions to a computer. Thousands of different

More information

1. The keyword main in C language is used for

1. The keyword main in C language is used for 1. The keyword main in C language is used for a. an user defined function *b. the first function to be executed in the program c. an user defined variable 2. The role of a C compiler is to translate a.

More information

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA AZUWIR MOHD NOR ROOM: Pusat Pengajian CABIN C PHONE: (04) 979 8249 Email: azuwir@kukum.edu.my Office hours: make appoinment or

More information

Low-Level Languages. Computer Programs and Programming Languages

Low-Level Languages. Computer Programs and Programming Languages Computer Programs and Programming Languages What is a computer program? Set of instructions that directs computer to perform tasks Programming used to write instructions 1 Computer Programs and Programming

More information

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Program Development Cycle Program development

More information

Chapter Twelve. Systems Design and Development

Chapter Twelve. Systems Design and Development Chapter Twelve Systems Design and Development After reading this chapter, you should be able to: Describe the process of designing, programming, and debugging a computer program Explain why there are many

More information

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo Principles in Programming: Orientation & Lecture 1 1 Course Objectives Introduce various subjects in computer science through puzzles and problems Most problems came from ICPC 2 Textbook Programming Challenges

More information

Beyond Base 10: Non-decimal Based Number Systems

Beyond Base 10: Non-decimal Based Number Systems Beyond Base : Non-decimal Based Number Systems What is the decimal based number system? How do other number systems work (binary, octal and hex) How to convert to and from nondecimal number systems to

More information

Chapter Binary Representation of Numbers

Chapter Binary Representation of Numbers Chapter 4 Binary Representation of Numbers After reading this chapter, you should be able to: convert a base- real number to its binary representation,. convert a binary number to an equivalent base- number.

More information

Introduction to Computer Science Unit 2. Notes

Introduction to Computer Science Unit 2. Notes Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and

More information

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction Chapter 1: An Overview of Computers and Programming Languages Objectives Objectives (cont d.) In this chapter, you will: Learn about different types of computers Explore hardware and software Learn about

More information

Programmiersprachen (Programming Languages)

Programmiersprachen (Programming Languages) 2016-05-13 Preface Programmiersprachen (Programming Languages) coordinates: lecturer: web: usable for: requirements: No. 185.208, VU, 3 ECTS Franz Puntigam http://www.complang.tuwien.ac.at/franz/ps.html

More information

Procedural Programming

Procedural Programming Exercise 3 (SS 2017) 20.05.2017 What will I learn in the 3. Exercise Functions Arrays Exercise(s) 1 Home exercise 2 (3 points) Write a program which allows the calculation of the mean of given integer

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C C: A High-Level Language Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University Gives

More information

Lab Session # 1 Introduction to C Language. ALQUDS University Department of Computer Engineering

Lab Session # 1 Introduction to C Language. ALQUDS University Department of Computer Engineering 2013/2014 Programming Fundamentals for Engineers Lab Lab Session # 1 Introduction to C Language ALQUDS University Department of Computer Engineering Objective: Our objective for today s lab session is

More information

Introduction to Compilers

Introduction to Compilers Introduction to Compilers Compilers are language translators input: program in one language output: equivalent program in another language Introduction to Compilers Two types Compilers offline Data Program

More information

Add Subtract Multiply Divide

Add Subtract Multiply Divide ARITHMETIC OPERATORS if AND if/else AND while LOOP Order of Operation (Precedence Part 1) Copyright 2014 Dan McElroy Add Subtract Multiply Divide + Add - Subtract * Multiply / Divide = gives the quotient

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C C: A High-Level Language Gives symbolic names to values don t need to know which register or memory location Provides abstraction of underlying hardware operations

More information

C++ Programming Language Lecture 1 Introduction

C++ Programming Language Lecture 1 Introduction C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Introduction In this course you will learn C++ and the legacy C code. It is

More information

CS 113: Introduction to

CS 113: Introduction to CS 113: Introduction to Course information MWF 12:20-1:10pm 1/21-2/15, 306 Hollister Hall Add/drop deadline: 1/28 C Instructor: David Crandall See website for office hours and contact information Prerequisites

More information

Copyright 2005 Department of Computer & Information Science

Copyright 2005 Department of Computer & Information Science Introducing Programming Copyright 2005 Goals By the end of this lecture, you should Understand the different types of programming languages. Understand the basic procedures in a program as input, processing

More information

Syntax. A. Bellaachia Page: 1

Syntax. A. Bellaachia Page: 1 Syntax 1. Objectives & Definitions... 2 2. Definitions... 3 3. Lexical Rules... 4 4. BNF: Formal Syntactic rules... 6 5. Syntax Diagrams... 9 6. EBNF: Extended BNF... 10 7. Example:... 11 8. BNF Statement

More information

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1 Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1 General Information Contributes 3 units: 2 hours lectures 2 hours labs and tutorials Main

More information

Week 2: Syntax Specification, Grammars

Week 2: Syntax Specification, Grammars CS320 Principles of Programming Languages Week 2: Syntax Specification, Grammars Jingke Li Portland State University Fall 2017 PSU CS320 Fall 17 Week 2: Syntax Specification, Grammars 1/ 62 Words and Sentences

More information

Chapter 1: Foundations for Algebra

Chapter 1: Foundations for Algebra Chapter 1: Foundations for Algebra Dear Family, The student will follow the order of operations, a set of rules that standardize how to simplify expressions. Order of Operations 1. Perform operations within

More information

Part (04) Introduction to Programming

Part (04) Introduction to Programming Part (04) Introduction to Programming Dr. Ahmed M. ElShafee 1 Dr. Ahmed ElShafee, ACU : Summer 2014, Introduction to CS 1 EVOLUTION To write a program for a computer, we must use a computer language. A

More information

Programming in C++ PART 2

Programming in C++ PART 2 Lecture 07-2 Programming in C++ PART 2 By Assistant Professor Dr. Ali Kattan 1 The while Loop and do..while loop In the previous lecture we studied the for Loop in C++. In this lecture we will cover iteration

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 3 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines

More information

The births of the generations are as follow. First generation, 1945 machine language Second generation, mid 1950s assembly language.

The births of the generations are as follow. First generation, 1945 machine language Second generation, mid 1950s assembly language. Lesson Outcomes At the end of this chapter, student should be able to: Describe what a computer program is Explain the importance of programming to computer use Appreciate the importance of good programs

More information

2. Numbers In, Numbers Out

2. Numbers In, Numbers Out COMP1917: Computing 1 2. Numbers In, Numbers Out Reading: Moffat, Chapter 2. COMP1917 15s2 2. Numbers In, Numbers Out 1 The Art of Programming Think about the problem Write down a proposed solution Break

More information

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers Chapter 03: Computer Arithmetic Lesson 09: Arithmetic using floating point numbers Objective To understand arithmetic operations in case of floating point numbers 2 Multiplication of Floating Point Numbers

More information

FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III. 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION

FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III. 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION Planning the Computer Program Purpose Algorithm Flow Charts Pseudocode -Application Software Packages-

More information

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro Math 230 Assembly Programming (AKA Computer Organization) Spring 2008 MIPS Intro Adapted from slides developed for: Mary J. Irwin PSU CSE331 Dave Patterson s UCB CS152 M230 L09.1 Smith Spring 2008 MIPS

More information

Which of the following is not true of FORTRAN?

Which of the following is not true of FORTRAN? PART II : A brief historical perspective and early high level languages, a bird's eye view of programming language concepts. Syntax and semantics-language definition, syntax, abstract syntax, concrete

More information

Steps to program development

Steps to program development Automate processes - Programming Concepts and Design Steps to program development A computer program is a set of formal instructions, which the computer executes in order to carry out some designated task.

More information

CSE101-lec#12. Designing Structured Programs Introduction to Functions. Created By: Amanpreet Kaur & Sanjeev Kumar SME (CSE) LPU

CSE101-lec#12. Designing Structured Programs Introduction to Functions. Created By: Amanpreet Kaur & Sanjeev Kumar SME (CSE) LPU CSE101-lec#12 Designing Structured Programs Introduction to Functions Created By: Amanpreet Kaur & Sanjeev Kumar SME (CSE) LPU Outline Designing structured programs in C: Counter-controlled repetition

More information

Exponent Properties: The Product Rule. 2. Exponential expressions multiplied with each other that have the same base.

Exponent Properties: The Product Rule. 2. Exponential expressions multiplied with each other that have the same base. Exponent Properties: The Product Rule 1. What is the difference between 3x and x 3? Explain in complete sentences and with examples. 2. Exponential expressions multiplied with each other that have the

More information

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals Pradeep K. Sinha Priti Sinha Chapter 12 Computer Languages Slide 1/64 Learning Objectives In this chapter you will learn about: Computer languages or programming languages Three broad

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Introduction to Programming Language Concepts

More information

PROBLEM SOLVING AND PYTHON PROGRAMMING

PROBLEM SOLVING AND PYTHON PROGRAMMING ALGORITHM UNIT-1 It is defined as a sequence of instructions that describe a method for solving a problem. In other words it is a step by step procedure for solving a problem. Properties of Algorithms

More information

COSC 2P90 Programming Languages & Object-Orientation

COSC 2P90 Programming Languages & Object-Orientation COSC 2P90 Programming Languages & Object-Orientation Hi! 1 Textbooks Main Text Comparative Programming Languages 3rd ed.; Wilson, LB & Clark, RG; Addison-Wesley (2001); ISBN 0-201-71012-9 Supplemental

More information

Fundamentals of Programming. Lecture 3: Introduction to C Programming

Fundamentals of Programming. Lecture 3: Introduction to C Programming Fundamentals of Programming Lecture 3: Introduction to C Programming Instructor: Fatemeh Zamani f_zamani@ce.sharif.edu Sharif University of Technology Computer Engineering Department Outline A Simple C

More information

Algorithm: 1. Introduction

Algorithm: 1. Introduction Algorithm 1 Algorithm: a finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems. [Zwass] Properties of algorithms:

More information