EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA
|
|
- Marybeth Newton
- 5 years ago
- Views:
Transcription
1 EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA
2 AZUWIR MOHD NOR ROOM: Pusat Pengajian CABIN C PHONE: (04) azuwir@kukum.edu.my Office hours: make appoinment or just drop by.
3 General Information Contributes 4 units: 2 hours will be spent on lectures 4 hours of hands-on programming (KWSP) Tuesday 11:00 1:00pm (Exercise) Thursday 8:30 10:30 pm (assignment) Objective: Students can independently write a computer program to solve calculation problems, especially those related to engineering
4 Overall Evaluation 4 main components: Assignments/Quizzes (30%) Two exams (15% +15%) One written test, One take home programming test. Mini-project (40%) Details will be informed later The rest involves real programming
5 Text & Reference Text: Essential C++ for engineers and scientist (Hanly, Jeri R.) 2 nd ed. Pearson Education Reference: Any books on C++. Applications Programming in C++ (Johnsonbaugh & Kalin) ) Prentice Hall C++ programming: From problem Analysis to Program Design (D.S Malik.) Thomson Learning Find one that can help you most
6 Tips Attendance: don t miss any lecture Don t miss lab! Come to class on time Discuss among your friends BUT DO YOUR OWN WORK! Practice! Practice! Practice!
7 CHAPTER 1 AN OVERVIEW OF COMPUTERS AND PROGRAMMING LANGUAGES
8 In this chapter, you will: Learn about different types of computers Explore the hardware and software components of a computer system Learn about the language of a computer Learn about the evolution of programming languages Examine high-level programming languages Discover what a compiler is and what it does Examine how a high-level language program is processed Learn what an algorithm is and explore problem-solving techniques
9 A BRIEF OVERVIEW OF THE HISTORY OF COMPUTERS Computers that are in use can be classified in the following categories: Main frame computers. Mid size computers. Micro computers (also called personal computers).
10 ELEMENTS OF A COMPUTER SYSTEM Hardware CPU-The CPU has several components in it. CU (control unit) - It has three main functions. Fetch and decode the instruction. Control the flow of information (instruction or data) in and out of MM (main memory). Control the operation of the internal components of CPU. PC-program counter points to the next instruction to be executed. IR-instruction register holds the instruction that is currently being executed. ALU-arithmetic logic unit. This component is responsible for carrying out all arithmetic and logical operations. ACC-accumulator. Once ALU performs the operation the results are placed in ACC.
11
12 Main Memory Directly connected to the CPU. All programs must be loaded into MM before they can be executed. All data must be brought into MM before it can be manipulated. When the power of the computer is turned off every thing in the main memory is lost for good.
13
14 Secondary storage Everything in main memory is lost when the computer is turned off. Information stored in main memory must be transferred to some other device for permanent storage. The device that stores information permanently is called secondary storage. Examples of secondary storage are hard disks, floppy disks, Zip disks, CD-ROMs, and tapes.
15 Input/Output devices For a computer to perform a useful task, it must be able to take in data and programs and display the results of calculations. The devices that feed data and programs into computers are called input devices. The keyboard, mouse, and secondary storage are examples of input devices. The devices that the computer uses to display results are called output devices. A monitor, printer, and secondary storage are examples of output devices.
16 Software Software are programs written to perform specific tasks. Two types of programs System programs - programs that take control of the computer. Application programs - programs that perform a specific task. (Word processors, spreadsheets, and games are examples of application programs.)
17 THE LANGUAGE OF A COMPUTER Two types of electrical signal - analog and digital. Since inside the computer digital signals are processed, the language of a computer is a sequence of 0s and 1s. The language of a computer is called the machine language. The digit 0 or 1 is called a binary digit or in short form a bit. A sequence of 0s and 1s is also referred as a binary code.
18 Bit: A bit is a binary digit 0 or 1. A sequence of 8 bits is called a byte. Coding Scheme ASCII (American Standard Code for Information Interchange). 128 characters A is encoded as (66 th character) 3 is encoded as EBCDIC (used by IBM)-256 characters Unicode characters. Two bytes are needed to store a character.
19 THE EVOLUTION OF PROGRAMMING LANGUAGES Early computers were programmed in machine language. Suppose we want to represent the equation wages = rate hours to calculate the weekly wages in machine language. If stands for load, stands for multiplication and stands for store, then the following sequence of instructions might be needed to calculate the weekly wages
20 Assembly languages - an instruction in assembly language is an easy-to-remember form called a mnemonic. Using the assembly language instructions, the equation to calculate the weekly wages can be written as follows: LOAD MULT STOR rate hour wages Assembler: An assembler is a program that translates a program written in assembly language into an equivalent program in machine language.
21 High level languages- Basic, FORTRAN, COBOL, Pascal, C++, C In order to calculate the weekly wages, the equation wages = rate hours in C++, can be written as follows: wages = rate * hours; Compiler: A compiler is a program that translates a program written in a high level language to an equivalent machine language.
22 PROCESSING A HIGH-LEVEL LANGUAGE PROGRAM The following steps are necessary to execute a program written in a high level language, say, C++: 1. Use an editor to create a program (that is type) in C++. This program is called the source program. Source program: A program written in a high-level language. 2. Check that the program obeys the rules of the programming language and translate the program in to an equivalent machine language. All this is accomplished by the compiler. The equivalent machine language program is called an object program. Object program: The machine language version of the highlevel language program.
23 3. The programs that you write in a high-level language are developed using a software development kit (SDK), which contains many programs that are useful in creating your program. This prewritten code resides in a place called the library. Linker: A program that combines the object program with other programs provided by the SDK and used in the program to create the executable code. 5. The final step is to execute the program. 4. The next step is to load the executable program into the main memory for execution and a program called loader accomplishes this. Loader: A program that loads an executable program into main memory.
24
25 PROGRAMMING WITH THE PROBLEM ANALYSIS CODING EXECUTION CYCLE Programming is a process of problem solving. Problem solving techniques Analyze the problem Outline the problem requirements Design steps, called an algorithm, to solve the problem Algorithm: A step-by-step problem-solving process in which a solution is arrived at in a finite amount of time.
26 Problem solving process 1. (a) Analyze the problem. (b) Outline the problem and its solution requirements. (c) Design steps (algorithm) to solve the problem. 2. (a) Implement the algorithm in a programming language, such as C++. (b) Verify that the algorithm works. 3. Maintenance: Maintenance requires using and modifying the program if the problem domain changes.
27 Problem Analysis-Coding-Execution Cycle
28 Analysis of the problem is the first and the most important step. This phase requires us to: 1. Thoroughly understand what the problem is about. 2. Understand the problem requirements. Some of the requirements could be: a. Does the program require interaction with the user? b. Does the program manipulate data? If the program manipulates data, the programmer must know what the data are and how the data are represented, that is, look at sample data. c. Is there any output of the program? If yes, the programmer should know how the results should be generated. 3. If the problem is complex, divide the problem into subproblems. Analyze each sub-problem as above.
29 Dividing a problem into smaller subproblems is called structured design. The structured design approach is also known as top-down design, stepwise refinement, and modular programming. In structured design, the problem is divided into smaller problems. Each subproblem is then analyzed, and a solution is obtained to solve the subproblem. The solutions of all subproblems are then combined to solve the overall problem. This process of implementing a structured design is called structured programming.
30 The next step is to design an algorithm to solve the problem. If the problem was broken into subproblems, design algorithms for each subproblem. Once the necessary steps have been designed, check the correctness of the algorithm. Sometimes algorithm s correctness can be tested using sample data. At times some mathematical analysis might be required to test the correctness of the algorithm. Once the algorithm is designed and correctness verified, the next step is to write the equivalent code into the high level language. Then using an editor enter the program into the computer.
31 The next step is to ensure that the program follows the constructs of the language. Run the code through the compiler. If the compiler generates error, we must go back, look at the code, remove the errors, and run the code again through the compiler. If there are no syntax errors, the compiler generates the equivalent machine code, the linker links the machine code with the systems resources, and the loader can then place the program into the main memory so that it can be executed. The final step is to execute the program. The compiler only guarantees that the program follows the rules of the language. It does not guarantee that the program will run correctly.
32 Example Design an algorithm to find the perimeter and area of a rectangle. The perimeter and area of the rectangle are given by the following formulas: perimeter = 2 (length + width) area = length width
33 The algorithm to find the perimeter and area of the rectangle is, therefore: 1. Get the length of the rectangle. 2. Get the width of the rectangle. 3. Find the perimeter using the following equation: perimeter = 2 (length + width) 4. Find the area using the following equation: area = length width
34 Example Design an algorithm that calculates the monthly paycheck of a sales-person at a local department store. Every salesperson has a base salary. The salesperson also receives a bonus at the end of each month based on the following criteria: If the salesperson has been with the store for five or less years, the bonus is $10 for each year that he or she has worked there. If the salesperson has been with the store for more than five years, the bonus is $20 for each year that he or she has worked there. The salesperson can earn an additional bonus as follows: If the total sale made by the salesperson for the month is more than $5000 but less than $10000, he or she receives a 3% commission on the sale. If the total sale made by the salesperson for the month is at least $10000, he or she receives a 6% commission on the sale.
35 The algorithm to calculate a salesperson s monthly paycheck. 1. Get basesalary. 2. Get noofserviceyears. 3. Calculate bonus using the following formula: if(noofserviceyears is less than or equal to five) bonus = 10 noofserviceyears otherwise bonus = 20 noofserviceyears 4. Get totalsale.
36 5. Calculate additionalbonus using the following formula. if (totalsale is less than 5000) additionalbonus = 0 otherwise if(totalsale is greater than or equal to 5000 and totalsale is less than 10000) additionalbonus = totalsale (0.03) otherwise additionalbonus = totalsale (0.06) 6. Calculate paycheck using the equation paycheck = basesalary + bonus + additionalbonus
37 EKT 120/4 Flow chart Programmers also use flowcharts to help them plan the algorithm for a problem. Uses standardized symbols to show the steps the computer needs to take to accomplish the program s goal.
38 Flowcharts symbols: Start/end EKT 120/4 Process calculation, initialization etc. Input/output read, display, print etc. predefined process symbol. Specify a function or a group of related statements decision symbol. Used to show selective (conditional) process path Connector for long flowcharts used to connect symbols and indicate the flow of data
39 Example EKT 120/4 Make a program that calculate and print the addition of two integers. Understand what the problem is about Read 2 integers Calculate the addition of 2 integers Print the results Analysis Input: 2 integers ( int1 and int2) Output: result or answer Formula: ans = int1 + int2
40 EKT 120/4 Algoritm 1.Print message Key in the first number 2.Read the first number 3.Print message Key in the second number 4.Read the second number 5.Calculate the addition of first number and the second number 6.Print the result
41 The flowcharts: start Print message Key in the first number Read the first number Print message Key in the second number Read the second number Calculate ans = int1 + int2 Print the result end
42 1 // Example. Simple Program 2 // A first program in C++ Comments (LINE 1 & 2) Written between /* and */ or following a //. 3 #include <iostream> 4 using namespace std; 5 int main() 6 { 7 cout << "Welcome to C++!\n"; 8 9 return 0; // indicate that program ended successfully 10 } Welcome to C++! A left brace { begins the body of every function and a right brace } ends it. (LINE 6 &10) Prints the string of characters contained between the quotation marks. (LINE 7) The entire line, including cout, the << operator, the string "Welcome to C++!\n" and the semicolon (;), is called a statement. All statements must end with a semicolon. Improve program readability and do not cause the computer to perform any action. preprocessor directive (LINE 3) Message to the C++ preprocessor. Lines beginning with # are preprocessor directives. #include <iostream> tells the preprocessor to include the contents of the file <iostream>, which includes input/output operations (such as printing to the screen). C++ programs contain one or more functions, one of which must be main (LINE 5) Parenthesis are used to indicate a function int means that main "returns" an integer value. More in Chapter 3. return is a way to exit a function from a function.( LINE 9) return 0, in this case, means that the program terminated normally.
43 EKT 120/4: Debugging a simple C++ program We will do this in lab!
44 EKT 120/4: Exercise 1. Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format: testscore1 weigt1 For example, a sample data is as follow:
45 EKT 120/4: Answer To find the weighted average of test score, first you need to know the each test score and its weight. Next, you multiply each test score with its weight and then add these numbers; the sum is then divided by four to get the average. Therefore, 1. Get testscore1, weighttestscore1 2. Get testscore2, weighttestscore2 3. Get testscore3, weighttestscore3 4. Get testscore4, weighttestscore4
46 EKT 120/4: Answer 5. Sum = testscore1 * weighttestscore1 + testscore2 * weighttestscore2 + testscore3 * weighttestscore3 + testscore4 * weighttestscore4 6. Average = sum / 4;
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 information1a 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 informationBITG 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 informationWeek 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 informationCSc 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 informationIntroduction. 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 informationChapter 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 informationChapter 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 informationChapter 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 informationChapter 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 informationChapter 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 informationBasic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร
269102 Basic Computer Programming for ISNE Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร Syllabus Instructor: Asst. Prof. Dr. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร (อ.เอ ม) Office room:
More informationCHAPTER 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 informationFinal 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 informationChapter 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 informationLecture 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 informationComputer 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 informationChapter 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 information8/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 informationProblem 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 informationCS 241 Computer Programming. Introduction. Teacher Assistant. Hadeel Al-Ateeq
CS 241 Computer Programming Introduction Teacher Assistant Hadeel Al-Ateeq 1 2 Course URL: http://241cs.wordpress.com/ Hadeel Al-Ateeq 3 Textbook HOW TO PROGRAM BY C++ DEITEL AND DEITEL, Seventh edition.
More informationWeek 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 informationSCSP 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 informationENT 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 informationCHAPTER 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 informationTopics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming
Topics C H A P T E R 1 Introduction to Computers and Programming Introduction Hardware and Software How Computers Store Data Using Python Introduction Computers can be programmed Designed to do any job
More informationComputer 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 informationThe 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 information8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics
Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the
More informationEngineering 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 informationFundamentals 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 informationMicroprocessors I MICROCOMPUTERS AND MICROPROCESSORS
Microprocessors I Outline of the Lecture Microcomputers and Microprocessors Evolution of Intel 80x86 Family Microprocessors Binary and Hexadecimal Number Systems MICROCOMPUTERS AND MICROPROCESSORS There
More informationBIL 104E Introduction to Scientific and Engineering Computing. Lecture 1
BIL 104E Introduction to Scientific and Engineering Computing Lecture 1 Introduction As engineers and scientists why do we need computers? We use computers to solve a variety of problems ranging from evaluation
More informationC++ 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 informationProgramming 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 information0 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 informationIS 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 informationIntroduction to C++ Programming. Adhi Harmoko S, M.Komp
Introduction to C++ Programming Adhi Harmoko S, M.Komp Machine Languages, Assembly Languages, and High-level Languages Three types of programming languages Machine languages Strings of numbers giving machine
More informationCSC 126 FINAL EXAMINATION Spring Total Possible TOTAL 100
CSC 126 FINAL EXAMINATION Spring 2011 Version A Name (Last, First) Your Instructor Question # Total Possible 1. 10 Total Received 2. 15 3. 15 4. 10 5. 10 6. 10 7. 10 8. 20 TOTAL 100 Name: Sp 11 Page 2
More informationProgramming 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 informationOutline. 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 informationElements of Computers and Programming Dr. William C. Bulko. What is a Computer?
Elements of Computers and Programming Dr. William C. Bulko What is a Computer? 2017 What is a Computer? A typical computer consists of: a CPU memory a hard disk a monitor and one or more communication
More informationWelcome to Computer Organization and Design Logic
Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Fall 2018 Ziad Matni, Ph.D. Dept. of Computer Science, UCSB A Word About Registration for CS64
More informationCC411: Introduction To Microprocessors
CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Use number { base 2, base 10, or base 16 }. Add and subtract binary/hex numbers. Represent any binary number in 2
More informationIntroduction 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 informationFundamentals 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 informationInformation Science 1
Information Science 1 -Basic Concepts of Computers: Opera4on, Architecture, Memory- Week 02 College of Information Science and Engineering Ritsumeikan University Today s lecture outline l Recall the previous
More informationIntro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?
Intro to Programming & C++ Unit 1 Sections 1.1-4 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2019 Jill Seaman 1.1 Why Program? Computer programmable machine designed to follow instructions Program a set
More informationChapter 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 informationCHAPTER 1: PROGRAM DEVELOPMENT LIFE CYCLE. Prepared for: CSC 128 Fundamentals of Computer Problem Solving
CHAPTER 1: PROGRAM DEVELOPMENT LIFE CYCLE Prepared for: CSC 128 Fundamentals of Computer Problem Solving Najwa Abd Ghafar UiTM OBJECTIVES OF THIS CHAPTER In this chapter, you will learn about: The steps
More information2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program
Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2-1 Parts of a C++ Program Parts of a C++ Program // sample C++ program
More informationCHAPTER 3 BASIC INSTRUCTION OF C++
CHAPTER 3 BASIC INSTRUCTION OF C++ MOHD HATTA BIN HJ MOHAMED ALI Computer programming (BFC 20802) Subtopics 2 Parts of a C++ Program Classes and Objects The #include Directive Variables and Literals Identifiers
More informationChapter 2: Introduction to C++
Chapter 2: Introduction to C++ Copyright 2010 Pearson Education, Inc. Copyright Publishing as 2010 Pearson Pearson Addison-Wesley Education, Inc. Publishing as Pearson Addison-Wesley 2.1 Parts of a C++
More informationChapter 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 informationIntroduction to the C++ Programming Language
LESSON SET 2 Introduction to the C++ Programming Language OBJECTIVES FOR STUDENT Lesson 2A: 1. To learn the basic components of a C++ program 2. To gain a basic knowledge of how memory is used in programming
More informationChapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen
Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Copyright 2009 Publishing Pearson as Pearson Education, Addison-Wesley Inc. Publishing as Pearson Addison-Wesley
More informationAn Overview of the Computer System. Kafui A. Prebbie 24
An Overview of the Computer System Kafui A. Prebbie -kafui@kafui.com 24 The Parts of a Computer System What is a Computer? Hardware Software Data Users Kafui A. Prebbie -kafui@kafui.com 25 The Parts of
More informationWelcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018
Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018 Ziad Matni Dept. of Computer Science, UCSB A Word About Registration for CS64 FOR
More informationCSCE150A. 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 informationComputer 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 informationTopic 1: Programming concepts
Topic 1: Programming concepts Learning Outcomes Upon successful completion of this topic you will be able to: identify stages of a program development implement algorithm design techniques break down a
More informationLecture 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 informationComputer Programming : C++
The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2003 Muath i.alnabris Computer Programming : C++ Experiment #1 Basics Contents Structure of a program
More informationComputer 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 informationC H A P T E R 1. Introduction to Computers and Programming
C H A P T E R 1 Introduction to Computers and Programming Topics Introduction Hardware and Software How Computers Store Data How a Program Works Using Python Computer Uses What do students use computers
More informationEP241 Computer Programming
EP241 Computer Programming Topic 1 Dr. Ahmet BİNGÜL Department of Engineering Physics University of Gaziantep Modifications by Dr. Andrew BEDDALL Department of Electric and Electronics Engineering Sep
More informationFundamentals of Programming Session 4
Fundamentals of Programming Session 4 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2011 These slides are created using Deitel s slides, ( 1992-2010 by Pearson Education, Inc).
More informationHANDOUT: COMPUTER PARTS
HANDOUT: COMPUTER PARTS Because computers are so important to our lives, there is a constant need to design and develop new hardware, software, and systems. Have you used a computer before? I m sure you
More informationIntroduction to Programming
Introduction to Programming session 5 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 informationWilliam 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 informationComputer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.
Hardware and Software Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages Computer systems consist of hardware and software. Hardware includes the tangible
More informationC++ 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 informationUEE1302 (1102) F10: Introduction to Computers and Programming
Computational Intelligence on Automation Lab @ NCTU Learning Objectives UEE1302 (1102) F10: Introduction to Computers and Programming Programming Lecture 00 Programming by Example Introduction to C++ Origins,
More informationSuperior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.1
Superior University Department of Electrical Engineering CS-115 Computing Fundamentals Experiment No.1 Introduction of Compiler, Comments, Program Structure, Input Output, Data Types and Arithmetic Operators
More informationComputer 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 informationLecture 1: CS2400 Introduction to Computer Science
Lecture 1: CS2400 Introduction to Computer Science Introduction to the course Introduction to computers Ethics Programming C++ CS2400 Lecture 1-1- 2017 David M. Chelberg Computer Science What is computer
More informationObject Oriented Design
Object Oriented Design Lecture 2: Introduction to C++ Class and Object Objects are essentially reusable software components. There are date objects, time objects, audio objects, video objects, automobile
More informationFundamentals 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 informationDec Hex Bin ORG ; ZERO. Introduction To Computing
Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and
More informationFundamentals of Structured Programming
Fundamentals of Structured Programming Dr. Salma Hamdy s.hamdy@cis.asu.edu.eg 1 Course Logistics Staff Teachers Prof. Mohamed Roushdy (Dean) Dr. Salma Hamdy Contact: s.hamdy@cis.asu.edu.eg Office: FCIS,
More informationFull file at
Chapter 1 1. a. False; b. False; c. True; d. False; e. False; f; True; g. True; h. False; i. False; j. True; k. False; l. True. 2. Keyboard and mouse. 3. Monitor and printer. 4. Because programs and data
More informationDR. 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 informationComputer 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 informationAn Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal
An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal Lesson Goals Learn the basic terminology of a computer system Understand the basics of high level languages, including java Understand
More informationComputers Are Your Future
Computers Are Your Future 2008 Prentice-Hall, Inc. Computers Are Your Future Chapter 6 Inside the System Unit 2008 Prentice-Hall, Inc. Slide 2 What You Will Learn... Understand how computers represent
More informationChapter1 Overview of computers
1 Chapter1 Overview of computers 1. What is a computer? 2. Which is the earliest computing machine? 3. Who invented the pascaline? 4. What is Charles babbage known as? 5. What is the machine proposed by
More informationComputer 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 informationQuestion 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 informationIB Computer Science Topic.2-
Topic.2- Computer Organization Designed by: Allan Lawson Sources: Online Materials, thanks for all Topic 2.1.1 Computer Architecture Outline the architecture of a central processing unit (CPU) and the
More informationWeek 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 informationComputer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.
Hardware and Software Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages Computer systems consist of hardware and software. Hardware includes the tangible
More informationCS 105 Review Questions #3
1 CS 105 Review Questions #3 These review questions only include topics since our second test. To study for the final, please look at the first two review documents as well. Almost all of these questions
More informationComputer Programming. Dr. Fahad Computer Science Deptt.
Computer Programming Dr. Fahad Computer Science Deptt. Course Description This course provides the fundamental programming concepts. The emphasis will be on problem solving rather than just learning the
More informationChapter 2, Part I Introduction to C Programming
Chapter 2, Part I Introduction to C Programming C How to Program, 8/e, GE 2016 Pearson Education, Ltd. All rights reserved. 1 2016 Pearson Education, Ltd. All rights reserved. 2 2016 Pearson Education,
More informationIntroduction 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 informationUnit. 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 informationLecture 19: Computers. Pay no attention to the man behind the curtain.
Lecture 19: Computers Pay no attention to the man behind the curtain. Samuel Wolfson // CSE 120, Winter 2018 Final Project Administrivia Show off all the cool skillz you've learned this quarter! Three
More informationFE Review Computer Terms
FE Review Computer Terms 2/2/2011 1 Computers sizes Supercomputers Mainframe centralized, large memory, large peripherals Mini-computers Less memory, smaller Microcomputers smaller still few peripherals,
More information5 Computer Organization
5 Computer Organization 5.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three subsystems of a computer. Describe the
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 6 Lecturer: Vahid Khodabakhshi CE 40153 - Fall 97 Lecture 1 Introduction and Brief History Department of Computer
More information