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

Size: px
Start display at page:

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

Transcription

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

2 General Information Contributes 3 units: 2 hours lectures 2 hours labs and tutorials Main Objective: Students can independently write, compile, debug and execute computer programs to solve problems, especially engineering related problems. 2

3 Course Outcomes Ability to define and describe programming concepts and principles. Ability to apply programming techniques and tools such as flowchart and pseudo code to design computer programs. Ability to apply GNU/Linux for coding, compiling, executing and debugging computer programs. Ability to solve engineering related problems using computer programming techniques. 3

4 Overall Evaluation 4 main components: 4 Assignments (20%) Final exam (40%), Test 1 (10%) Individual Lab Test (30%) Assignments are individual take home + lab One test is written test 4

5 References Hanly, J.R. and Koffman, E.B., C Program Design for Engineers, 2 nd Ed., Addison-Wesley, ISBN : Deitel & Deitel, Suhizaz Sudin, R. Badlishah and Yasmin Yacob, C How To Program, Pearson- Prentice Hall, Tan, H.H. and D Orazio,T.B., C Programming for Engineering & Computer Science, Mc Graw Hill,

6 Notes This course is NOT about the language per se, it is about problem solving, analytical skills and to apply C to solve problems. Write C program in Linux environment Do early reading Do not hesitate to ask during lecture sessions 6

7 Outline Computer Fundamentals Computer organization and hardware Computer software Programming Languages Machine language Assembly language High-level language Algorithm : pseudo code and flowchart Control Structures Simple C Program 7

8 Computer Fundamentals Computer system is divided into hardware and software. Hardware refers to physical components of computer which are: Main Memory Central Processing Unit (CPU) Input Device Output Device Secondary Memory Device 8

9 Figure 1.1 The Intel Atom processor chip contains the full circuitry of a central processing unit in an integrated circuit whose small size and low power requirements make it suitable for use in mobile internet devices. (Intel Corporation Pressroom Photo Archives)

10 Figure 1.2 (a) Notebook Computer (HP Pavilion dv5, Courtesy of Hewlett-Packard). (b) Palmtop Computer (iphone 3G, Courtesy of Apple, Inc.) (c) Desktop Computer (imac, Courtesy of Apple, Inc.) 1-10

11 Figure 1.3 Components of a Computer 1-11

12 Computer Hardware CPU Input Device Control Unit Arithmetic and Logic Unit Register Output Device Main Memory Secondary Memory 12

13 Central Processing Unit (CPU) CPU is the computer s administrator and is responsible for supervising the operation of the other sections Consists of two functional units; control unit and arithmetic-logic unit (ALU) Control unit supervises all activities of the computer system ALU performs basic arithmetic operations and comparison operations 13

14 Main Memory keeps information from the input unit also keeps processed information until it can be placed on output devices all programs must be loaded into main memory before they can be executed and all data must be brought into main memory before it can be manipulated. 14

15 Main Memory Main memory can be further classified into two types: Random Access Memory (RAM) information in RAM will be lost when the computer is turned-off. Read Only Memory (ROM) It has been set during manufacturing process. ROM usually contains instructions and information considered to be fundamental to the computer. 15

16 Figure Memory Cells in Main Memory 1-16

17 Secondary Memory Main memory is only used during processing following certain instructions Permanent information is NOT stored in main memory but is stored in secondary memory E.g. program file, data fail, etc E.g. hard disk, diskette, CD 17

18 Figure 1.5 Secondary Storage Media 1-18

19 Input/Output Devices Input devices - feed data and programs into computers E.g. keyboard, mouse, touch screen, scanners Output devices - display results produced by computer E.g. monitor, printer, speaker 19

20 Software As a complement to hardware, computer system needs software to solve problems. Software are classified into : System software Application software 20

21 Software System software : manages the computer and its peripheral devices (hardware) E.g. Operating system (OS) Text editor Pre-processor Language translator Linker Loader 21

22 Software Application software : performs specific tasks There are two types: Program to solve specific problems Program written by user to solve specified problem E.g. word processor, desktop publishing software, spreadsheets, database, graphics, communication, programs perform specific tasks such as accounting, scientific, engineering, education, etc 22

23 Programming Languages Programming language is divided into three categories: Machine Language Assembly Language High-Level Language 23

24 Machine Language Language understood by the computer Bunch of 0 s and 1 s Program written in machine language can be executed without being translated Nevertheless, hard to learn because it is written in 0 s and 1 s Program is too long to solve simple problem Machine-dependant and not portable E.g

25 Figure 1.6 Relationship Between a Byte and a Bit 1-25

26 Assembly Language Strings of 0 s and 1 s are replaced into instructions which resemble English language to represent computer operation element Easier to understand and write E.g. LOAD rate MULT STOR hour wages 26

27 Assembly Language Nevertheless, needs language translator called Assembler to change Assembly Language to Machine Code for execution purpose still too long and not portable 27

28 High-Level Language Improves weaknesses in Machine Language and Assembly Language Portable Written in one instruction to carry out several instructions in machine level E.g. discount_price = price discount; Must be changed to machine code before executed, needs compiler : a system software that translates source program to object program 28

29 Algorithms The solution to any computing problem involves executing series of actions in a specific order Pseudo code : artificial and informal language that helps programmers develop algorithms E.g. if student s grade is greater than or equal to 50 Print Pass else Print Fail 29

30 Algorithms Flowchart: visual-form of an algorithm E.g. Begin Data Process 1 Decision Process 2 End 30

31 Algorithm-Basic symbols in a flowchart Start/End Flow direction Process Connector Input/Output Decision 31

32 Flowchart-(example) Start read num1, num2 sum=num1+num2 print sum End 32

33 TRY THIS!!! Write a pseudo code, flowchart and program that calculates and prints the SUM of two integers A and B. 33

34 Flowchart Begin Pseudo code Begin Input A and B Calculate A + B Print result of SUM End Input A,B Calculate A + B Print SUM End 34

35 Control Structure All programs could be written in terms of three control structures: Sequence structure Selection structure Repetition structure 35

36 Sequence Structure Is a series of steps executed sequentially by default Pseudo code Flowchart Read num1, num2 Calculate total=num1+num2 Print total Read num1, num2 total = num1+num2 print total 36

37 Selection Structure Used to choose among alternative courses of action C has three types: if, if..else, and switch 37

38 The if Selection Structure if structure is a single-entry/singleexit structure If student s grade is greater than or equal to 60 Print Pass grade >= 60 true print Pass false 38

39 The if..else Selection Structure Specifies an action to be performed both when the condition is true and when it is false If student s grade is greater than or equal to 60 Print Pass else Print Fail false grade >= 60 true print Fail print Pass 39

40 Repetition Structure Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied Three types : while, for, do-while 40

41 The while Repetition Structure Programmer specifies an action is to be repeated while some conditions remain true product <= 1000 true product = 2 * product false While product is less than or equal 1000 calculate product=2 * product 41

42 Basics of a Typical C Program Development Environment UniMAP Sem I 09/10 EKT120: Computer Programming 42

43 Figure 1.7 Entering, Translating, and Running a High-Level Language Program 1-43

44 Figure 1.8 Flow of Information During Program Execution 1-44

45 Simple C Program: Program to add two numbers #include <stdio.h> int main(void) { int A, B, SUM; printf ( input first integer \n ); scanf ( %d, &A) printf ( input second integer \n ); scanf ( %d, &B) } SUM = A + B; printf ( Sum is %d\n, SUM); return 0; OUTPUT Input first integer 39 Input second integer 27 Sum is 66 45

46 End Week 1 Part1 Q & A! UniMAP Sem II 10/11 DKT121: Basic Computer Programming 46

ENT 189: COMPUTER PROGRAMMING. H/P: Home page:

ENT 189: COMPUTER PROGRAMMING.   H/P: Home page: ENT 189: COMPUTER PROGRAMMING Dr. PAULRAJ M P, Associate Professor, School of Mechatronic Engineering, #42- Level 2, Ulu Pauh New Campus 02600-Arau. PERLIS Email: paul@unimap.edu.my H/P: 017 5103757 Home

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

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

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

Week 1 Introduction to Programming

Week 1 Introduction to Programming CME111 Programming Languages I Week 1 Introduction to Programming Assist. Prof. Dr. Caner ÖZCAN Introduction Course Web Site: www.canerozcan.net Office Hours: Tuesday 13:00-15:00 Wednesday 15:30-17:00

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

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 Learning Outcomes At the end of this lecture, you should be able to: tell the purpose of computer programs. describe

More information

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A Computer Science & Engineering 150A Problem Solving Using Computers Lecture 01 - Course Introduction Stephen Scott (Adapted from Christopher M. Bourke) Roll Syllabus Course Webpage: http://cse.unl.edu/~sscott/teach/classes/cse150af09/

More information

Computer Science & Engineering 150A Problem Solving Using Computers

Computer Science & Engineering 150A Problem Solving Using Computers Computer Science & Engineering 150A Problem Solving Using Computers Lecture 01 - Course Introduction Stephen Scott (Adapted from Christopher M. Bourke) 1 / 43 Fall 2009 Roll Syllabus Course Webpage: http://cse.unl.edu/~sscott/teach/classes/cse150af09/

More information

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics Zarqa University Faculty: Information Technology Department: Computer Science Course title: Programming LAB 1 (1501111) Instructor: Lecture s time: Semester: Office Hours: Course description: This introductory

More information

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING 1 Muhalim Mohamed Amin Faculty of Computing @2015/2016-1 Objectives In this chapter, you will learn: Basic computer concepts. The different types of

More information

CHAPTER 1 Introduction to Computers and Java

CHAPTER 1 Introduction to Computers and Java CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and

More information

Computer Architecture 2/26/01 Lecture #

Computer Architecture 2/26/01 Lecture # Computer Architecture 2/26/01 Lecture #9 16.070 On a previous lecture, we discussed the software development process and in particular, the development of a software architecture Recall the output of the

More information

Computer Fundamentals

Computer Fundamentals Computer Fundamentals 1 Draw the block diagram of computer architecture and explain each block. Computer is made up of mainly four components, 1) Central processing unit (CPU) 2) Input section 3) Output

More information

SCSP Programming Technique C

SCSP Programming Technique C SCSP1103 - Programming Technique C 9/27/15 Objectives In this chapter, you will learn: CHAPTER 1: Basic computer concepts. The different types of programming languages in general. INTRODUCTION TO COMPUTERS

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

1a Computers, Problem Solving!

1a Computers, Problem Solving! 1a Computers, Problem Solving!! 1E3! 1a Computers and Problem Solving 1 Objectives! n To introduce the architecture of a computer.! n To introduce the notion of a programming language.! n To explore computational

More information

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017 Programming 1 Lecture 1 COP 3014 Fall 2017 August 28, 2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific set of

More information

Basic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร

Basic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร 269102 Basic Computer Programming for ISNE Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร Syllabus Instructor: Asst. Prof. Dr. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร (อ.เอ ม) Office room:

More information

Fundamentals of Programming Session 1

Fundamentals of Programming Session 1 Fundamentals of Programming Session 1 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 Sharif University of Technology Outlines Review of Course Content Grading Policy What Is

More information

Fundamentals of Programming Session 1

Fundamentals of Programming Session 1 Fundamentals of Programming Session 1 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2014 Sharif University of Technology Outlines Review of Course Content Grading Policy What Is

More information

Chapter 1: Introduction to Computers and Java

Chapter 1: Introduction to Computers and Java Chapter 1: Introduction to Computers and Java Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis Chapter Topics Chapter 1 discusses the following main topics:

More information

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java Chapter 1: Introduction to Computers and Java Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis Chapter Topics Chapter 1 discusses the following main topics:

More information

Chapter 1 INTRODUCTION

Chapter 1 INTRODUCTION Chapter 1 INTRODUCTION A digital computer system consists of hardware and software: The hardware consists of the physical components of the system. The software is the collection of programs that a computer

More information

Lecture 01: Basic Structure of Computers

Lecture 01: Basic Structure of Computers CSCI2510 Computer Organization Lecture 01: Basic Structure of Computers Ming-Chang YANG mcyang@cse.cuhk.edu.hk Reading: Chap. 1.1~1.3 Outline Computer: Tools for the Information Age Basic Functional Units

More information

CHAPTER 1 TYPES & COMPONENTS OF COMPUTER SYSTEM

CHAPTER 1 TYPES & COMPONENTS OF COMPUTER SYSTEM CHAPTER 1 TYPES & COMPONENTS OF COMPUTER SYSTEM 1.1 Hardware and Software Q.1) Define hardware and software: a) Hardware Hardware is a general term used for the physical components (parts) that make up

More information

Engineering Computing M1H Together Towards A Green Environment

Engineering Computing M1H Together Towards A Green Environment Engineering Computing M1H321538 Module Induction Course Resources Lecture/Tutorial hours Course Syllabus Assessment Procedure Expectation from the Students General Terms and Conditions Course Resources

More information

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah Lecturer Department of Computer Science & IT University of Balochistan 1 Outline p Introduction p Program development p C language and beginning with

More information

Computer Programming-1 CSC 111. Chapter 1 : Introduction

Computer Programming-1 CSC 111. Chapter 1 : Introduction Computer Programming-1 CSC 111 Chapter 1 : Introduction Chapter Outline What a computer is What a computer program is The Programmer s Algorithm How a program that you write in Java is changed into a form

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

Introduction to Basis and Practice in Programming

Introduction to Basis and Practice in Programming Introduction to Basis and Practice in Programming Fall 2015 Jinkyu Jeong (jinkyu@skku.edu) 1 Course Overview Course Basics! Class hour GEDB029-45: Mon. 13:00 ~ 14:50 GEDB029-46: Tue. 13:00 ~ 14:50 1~2

More information

Computer Principles and Components 1

Computer Principles and Components 1 Computer Principles and Components 1 Course Map This module provides an overview of the hardware and software environment being used throughout the course. Introduction Computer Principles and Components

More information

Chapter 1: Why Program? Computers and Programming. Why Program?

Chapter 1: Why Program? Computers and Programming. Why Program? Chapter 1: Introduction to Computers and Programming 1.1 Why Program? Why Program? Computer programmable machine designed to follow instructions Program instructions in computer memory to make it do something

More information

Module Syllabus. PHILADELPHIA UNIVERSITY Faculty: Information Technology Department: Applied Computer Science

Module Syllabus. PHILADELPHIA UNIVERSITY Faculty: Information Technology Department: Applied Computer Science Module Syllabus Module Name: Computer Skills (2) for Science Colleges Module Number: 710104 Level: 1 Credit Hours: 3 hours Prerequisite / Co-Requisite: none Lecturer Name: Office Number: Phone: E-mail:

More information

Introduction. Arizona State University 1

Introduction. Arizona State University 1 Introduction CSE100 Principles of Programming with C++, Fall 2018 (based off Chapter 1 slides by Pearson) Ryan Dougherty Arizona State University http://www.public.asu.edu/~redoughe/ Arizona State University

More information

ITT Technical Institute. ET2560T Introduction to C Programming Onsite and Online Course SYLLABUS

ITT Technical Institute. ET2560T Introduction to C Programming Onsite and Online Course SYLLABUS ITT Technical Institute ET2560T Introduction to C Programming Onsite and Online Course SYLLABUS Credit hours: 4.5 Contact/Instructional hours: 67 (41 Theory Hours, 26 Lab Hours Prerequisite(s and/or Corequisite(s:

More information

Final Examination Semester 2 / Year 2005

Final Examination Semester 2 / Year 2005 Southern College Kolej Selatan 南方学院 Final Examination Semester 2 / Year 2005 COURSE : INTRODUCTION TO COMPUTING COURSE CODE : CSEG 1003 TIME : 2 1/2 HOURS DEPARTMENT : ELECTRICAL & ELECTRONIC ENGINEERING

More information

Programming 1 - Honors

Programming 1 - Honors Programming 1 - Honors Lecture 1 COP 3014 Spring 2017 January 10, 2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific

More information

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Week 0: Intro to Computers and Programming Gaddis: Sections 1.1-3 and 2.1 CS 1428 Fall 2014 Jill Seaman 1.1 Why Program? Computer programmable machine designed to follow instructions Program instructions

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

Chapter 1 Introduction to Computers and C++ Programming

Chapter 1 Introduction to Computers and C++ Programming Chapter 1 Introduction to Computers and C++ Programming 1 Outline 1.1 Introduction 1.2 What is a Computer? 1.3 Computer Organization 1.7 History of C and C++ 1.14 Basics of a Typical C++ Environment 1.20

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

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune Unit 1: Introduction to Programming Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune Syllabus Unit 1: Introduction to Programming Unit 2: Flow of Control and Functions Unit 3: Arrays

More information

Computing and compilers

Computing and compilers Computing and compilers Comp Sci 1570 to Outline 1 2 3 4 5 Evaluate the difference between hardware and software Find out about the various types of software Get a high level understanding of how program

More information

C: How to Program. Week /Mar/05

C: How to Program. Week /Mar/05 1 C: How to Program Week 2 2007/Mar/05 Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers

More information

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline I. Course Title: CS 280 Computer and Assembler Language 3 credits II. III. IV. Course

More information

COMPUTER BASICS LECTURER: ATHENA TOUMBOURI

COMPUTER BASICS LECTURER: ATHENA TOUMBOURI COMPUTER BASICS LECTURER: ATHENA TOUMBOURI WHAT IS A COMPUTER SCIENCE? The definition of computer science is a branch of engineering science that studies the technology and the principles of computers.

More information

Lecture 1: Preliminaries

Lecture 1: Preliminaries Lecture 1: Preliminaries Edgardo Molina Department of Computer Science City College of New York August 30, 2011 Edgardo Molina (CS@CCNY) Lecture 1 August 30, 2011 1 / 44 Info and Schedule Course Info and

More information

Chapter 1: Introduction to Computers and Programming

Chapter 1: Introduction to Computers and Programming Chapter 1: Introduction to Computers and Programming 1.1 Why Program? Why Program? Computer programmable machine designed to follow instructions Program instructions in computer memory to make it do something

More information

0 Introduction: Computer systems and program development

0 Introduction: Computer systems and program development 0 Introduction: Computer systems and program development Outline 1 Introduction 2 What Is a Computer? 3 Computer Organization 4 Evolution of Operating Systems 5 Personal Computing, Distributed Computing

More information

Chapter 1 Introduction to Computers and Programming

Chapter 1 Introduction to Computers and Programming Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming Copyright 2003 Scott/Jones Publishing Contents 1.1 Why Program? 1.2 Computer Systems: Hardware

More information

COP 1170 Introduction to Computer Programming using Visual Basic

COP 1170 Introduction to Computer Programming using Visual Basic Course Justification This course is the first computer programming course in the Computer Information Systems Associate in Arts degree program; is required in the Computer Programming and Analysis, Database

More information

Introduction to Java Programming

Introduction to Java Programming Introduction to Java Programming Lecture 1 CGS 3416 Spring 2017 1/9/2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer ISA - Instruction Set Architecture: the specific

More information

Quiz1 Fall 2007 October 2 nd, UNIVERSITY OF WINDSOR Fall 2007 QUIZ # 1 Solution. Examiner:Ritu Chaturvedi Dated :October 2nd, 2007.

Quiz1 Fall 2007 October 2 nd, UNIVERSITY OF WINDSOR Fall 2007 QUIZ # 1 Solution. Examiner:Ritu Chaturvedi Dated :October 2nd, 2007. UNIVERSITY OF WINDSOR 60-106-01 Fall 2007 QUIZ # 1 Solution Examiner:Ritu Chaturvedi Dated :October 2nd, 2007. Student Name: Student Number: INSTRUCTIONS (Please Read Carefully) No calculators allowed.

More information

Fundamentals of Programming. Lecture 1: Introduction to C Programming

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

More information

Chapter 1 & 2 Introduction to C Language

Chapter 1 & 2 Introduction to C Language 1 Chapter 1 & 2 Introduction to C Language Copyright 2007 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 1 & 2 - Introduction to C Language 2 Outline 1.1 The History

More information

BRANCHING if-else statements

BRANCHING if-else statements BRANCHING if-else statements Conditional Statements A conditional statement lets us choose which statement t t will be executed next Therefore they are sometimes called selection statements Conditional

More information

Physics 2660: Fundamentals of Scientific Computing. Lecture 5 Instructor: Prof. Chris Neu

Physics 2660: Fundamentals of Scientific Computing. Lecture 5 Instructor: Prof. Chris Neu Physics 2660: Fundamentals of Scientific Computing Lecture 5 Instructor: Prof. Chris Neu (chris.neu@virginia.edu) Reminder I am back! HW04 due Thursday 22 Feb electronically by noon HW grades are coming.

More information

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming 1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to Computing and Programming with Java: A Multimedia

More information

(4-2) Selection Structures in C H&K Chapter 4. Instructor - Andrew S. O Fallon CptS 121 (September 12, 2018) Washington State University

(4-2) Selection Structures in C H&K Chapter 4. Instructor - Andrew S. O Fallon CptS 121 (September 12, 2018) Washington State University (4-2) Selection Structures in C H&K Chapter 4 Instructor - Andrew S. O Fallon CptS 121 (September 12, 2018) Washington State University Control Structures 2 Recall that algorithms are composed of three

More information

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Chapter 1 Computer and Programming. By Zerihun Alemayehu Chapter 1 Computer and Programming By Zerihun Alemayehu What is computer? A device capable of performing computations and making logical decisions at speeds millions (even billions) of times faster than

More information

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program? Chapter 1: Introduction to Computers and Programming 1.1 Why Program? Why Program? Computer programmable machine designed to follow instructions Program instructions in computer memory to make it do something

More information

Loops / Repetition Statements. There are three loop constructs in C. Example 2: Grade of several students. Example 1: Fixing Bad Keyboard Input

Loops / Repetition Statements. There are three loop constructs in C. Example 2: Grade of several students. Example 1: Fixing Bad Keyboard Input Loops / Repetition Statements Repetition s allow us to execute a multiple times Often they are referred to as loops C has three kinds of repetition s: the while loop the for loop the do loop The programmer

More information

Introduction to Computers. Joslyn A. Smith

Introduction to Computers. Joslyn A. Smith Introduction to Computers Joslyn A. Smith March 9, 2010 5/18/2011 1 What is a Computer? An electronic device that has the capability of performing the following tasks: Responds to input. Processes the

More information

Introduction to Computer Systems

Introduction to Computer Systems CS-213 Introduction to Computer Systems Yan Chen Topics: Staff, text, and policies Lecture topics and assignments Lab rationale CS 213 F 06 Teaching staff Instructor TA Prof. Yan Chen (Thu 2-4pm, Tech

More information

Fundamental of Programming (C)

Fundamental of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 5 Structured Program Development Department of Computer Engineering How to develop

More information

Programming for Problem Solving 105A L T P Credit Major Minor Total Time

Programming for Problem Solving 105A L T P Credit Major Minor Total Time ES- Programming for Problem Solving 105A L T P Credit Major Minor Total Time Test Test 3 - - 3 75 25 100 3h Purpose To familiarize the students with the basics of Computer System and C Programming Course

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

Computer Fundamentals

Computer Fundamentals Computer Fundamentals Computers have made great inroads in our everyday life and thinking. They are put to use for all sorts of application ranging from complex calculations in the field or frontline research,

More information

ST. MARY S COLLEGE FORM 4

ST. MARY S COLLEGE FORM 4 Term 1 Week 1 Week 2 FUNDAMENTALS OF HARDWARE AND SOFTWARE 1. The generalpurpose computer system 2. Functions of the major hardware components of a computer system 3. Functions and uses of primary storage

More information

Fundamentals of Programming

Fundamentals of Programming Fundamentals of Programming Lecture 5 - Structured Program Development Lecturer : Ebrahim Jahandar Borrowed from lecturer notes by Omid Jafarinezhad How to develop a program? Requirements Problem Analysis

More information

Loops / Repetition Statements

Loops / Repetition Statements Loops / Repetition Statements Repetition statements allow us to execute a statement multiple times Often they are referred to as loops C has three kinds of repetition statements: the while loop the for

More information

Lab 2: Structured Program Development in C

Lab 2: Structured Program Development in C Lab 2: Structured Program Development in C (Part A: Your first C programs - integers, arithmetic, decision making, Part B: basic problem-solving techniques, formulating algorithms) Learning Objectives

More information

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

Question Bank. Fundamentals Of Computer FYBCA (SEM - I) Question Bank Fundamentals Of Computer FYBCA (SEM - I) 1) Choose the appropriate option (1 Marks Questions) 1) COBOL is an example of level language. a) low level b) middle level c) high level d) both

More information

IS 0020 Program Design and Software Tools

IS 0020 Program Design and Software Tools 1 IS 0020 Program Design and Software Tools Introduction to C++ Programming Spring 2005 Lecture 1 Jan 6, 2005 Course Information 2 Lecture: James B D Joshi Tuesdays/Thursdays: 1:00-2:15 PM Office Hours:

More information

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu A Review of Chapter 5 and Chapter 6 Chapter 5 Computer Systems Organization Von Neumann Architecture 4 Components Memory Input/output ALU Control Unit Two major features Stored program concept Sequential

More information

DATA STRUCTURES AND ALGORITHMS

DATA STRUCTURES AND ALGORITHMS DATA STRUCTURES AND ALGORITHMS Sorting algorithms External sorting, Search Summary of the previous lecture Fast sorting algorithms Quick sort Heap sort Radix sort Running time of these algorithms in average

More information

COURSE OUTLINE & WEEK WISE BREAKAGE

COURSE OUTLINE & WEEK WISE BREAKAGE COURSE OUTLINE & WEEK WISE BREAKAGE Week wise Course outline of Computer Fundamentals & Programming (CE-100) 3+1 (Batch 2018-Electronic Engineering) Dated: 13-12-2017 Course Coordinator: Saeed Azhar WEEK

More information

Chapter Two. Hardware Basics: Inside the Box

Chapter Two. Hardware Basics: Inside the Box Chapter Two Hardware Basics: Inside the Box After reading this chapter, you should be able to: Explain general terms how computers store and manipulate information. Describe the basic structure of a computer

More information

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department COURSE: CST1201 Programming Fundamentals (2 class hours, 2 lab hours, 3 credits) Course Description: This course is an intensive

More information

Java and Software Design

Java and Software Design Introduction to Java and Software Design Jindal Consulting Chapter 1 Overview of Programming and Problem Solving Slides by Varun Jindal 1 Chapter 1 Topics Computer Programming Programming Life-Cycle Phases

More information

Introduction To Computers. About the Course

Introduction To Computers. About the Course Introduction To Computers Chapter No 1 Introduction About the Course Course instructor Course policies Topics to be covered Course Website and Reference material Assignments and Projects ITC - Chapter

More information

(8-1) Arrays I H&K Chapter 7. Instructor - Andrew S. O Fallon CptS 121 (October 8, 2018) Washington State University

(8-1) Arrays I H&K Chapter 7. Instructor - Andrew S. O Fallon CptS 121 (October 8, 2018) Washington State University (8-1) Arrays I H&K Chapter 7 Instructor - Andrew S. O Fallon CptS 121 (October 8, 2018) Washington State University What is an array? A sequence of items that are contiguously allocated in memory All items

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

Chapter 1 Introduction to Computers and C++ Programming

Chapter 1 Introduction to Computers and C++ Programming Chapter 1 Introduction to Computers and C++ Programming 1 Outline 1.1 Introduction 1.2 What Is a Computer? 1.3 Computer Organization 1.4 Evolution of Operating Systems 1.5 Personal Computing, Distributed

More information

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich. Introduction to Computers and Java Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich http://seal.ifi.uzh.ch 2008 W. Savitch, F.M. Carrano, Pearson Prentice Hall Objectives! Overview computer

More information

Introduction to Computers and Java

Introduction to Computers and Java Introduction to Computers and Java Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich http://seal.ifi.uzh.ch 2008 W. Savitch, F.M. Carrano, Pearson Prentice Hall Objectives! Overview computer

More information

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal. Hardware CSCE 101 Electricity: Voltage Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal. The signals voltage will either be between

More information

Introduction to Computers and Java

Introduction to Computers and Java Introduction to Computers and Java Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich http://seal.ifi.uzh.ch 2008 W. Savitch, F.M. Carrano, Pearson Prentice Hall Objectives Overview computer

More information

Test Bank for Prelude to Programming Chapter 0

Test Bank for Prelude to Programming Chapter 0 Test Bank for Prelude to Programming Chapter 0 MULTIPLE CHOICE 1. Which of the following is not an attribute of a computer? a. can act on intermediate results without human intervention b. has its roots

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

Software Concepts. It is a translator that converts high level language to machine level language.

Software Concepts. It is a translator that converts high level language to machine level language. Software Concepts One mark questions: 1. What is a program? It is a set of instructions given to perform a task using a programming language. 2. What is hardware? It is defined as physical parts of the

More information

1 The Catholic University of Eastern Africa P.o Box , Nairobi Kenya Edward Kioko 2013

1 The Catholic University of Eastern Africa P.o Box , Nairobi Kenya Edward Kioko 2013 Purpose of the module (A constituent College of Kenyatta University) P.O Box 136-90100, Machakos Kenya Telephone: 044-21604 Email: info@machakosuniversity.ac.ke Website: http://www.machakosuniversity.ac.ke

More information

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving) DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW Evaluation Scheme & Syllabus For B.Tech. First Year (Programming for Problem Solving) On Choice Based Credit System (Effective from the Session: 2018-19)

More information

Programming 1. Lecture 1 COP 3014 Fall August 28, 2018

Programming 1. Lecture 1 COP 3014 Fall August 28, 2018 Programming 1 Lecture 1 COP 3014 Fall 2018 August 28, 2018 Programming I - Course Information Instructor: Sharanya Jayaraman PhD Candidate in Computer Science Research Interests: High Performance Computing,

More information

Chapter One. Introduction to Computer System

Chapter One. Introduction to Computer System Principles of Programming-I / 131101 Prepared by: Dr. Bahjat Qazzaz -------------------------------------------------------------------------------------------- Chapter One Introduction to Computer System

More information

(6-1) Iteration in C H&K Chapter 5. Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University

(6-1) Iteration in C H&K Chapter 5. Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University (6-1) Iteration in C H&K Chapter 5 Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University Iterative Constructs (1) 2 Recall that algorithms are composed of three different

More information

Chris Riesbeck, Fall Introduction to Computer Systems

Chris Riesbeck, Fall Introduction to Computer Systems Chris Riesbeck, Fall 2011 Introduction to Computer Systems Welcome to Intro. to Computer Systems Everything you need to know http://www.cs.northwestern.edu/academics/courses/213/ Instructor: Chris Riesbeck

More information

INFORMATION SYSTEM PARTS AND COMPUTER TYPES

INFORMATION SYSTEM PARTS AND COMPUTER TYPES INFORMATION SYSTEM PARTS AND COMPUTER TYPES PARTS OF INFORMATION SYSTEM People are end users who use computers to make themselves more productive. Hardware refers to the physical components of your computer

More information

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers LECTURE SCHEDULE 2 Units of Memory, Hardware, Software and Classification of Computers Units of Memory The memory unit is the principal storage of the computer. All the data and instructions that the computer

More information