Outcome based Learning Objectives

Slides:



Advertisements
Similar presentations
Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
INTRODUCTION OF COMPUTER
Essential Introduction to Computers. What is a Computer? An electronic device, operating under the control of instructions stored in its own memory, that.
Essential Introduction to Computers
What Is A Computer System?
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
COMPONENTS OF THE SYSTEM UNIT
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
Microsoft Office 2010 Introduction to Computers and How to Purchase Computers and Mobile Devices.
Lesson 3 — How a Computer Processes Data
Chapter 3 Computer Hard ware
INTRODUCTION TO COMPUTER PROGRAMMING itc-314 LECTURE 01.
© Paradigm Publishing Inc. 2-1 Chapter 2 Input and Processing.
INTRODUCTION TO COMPUTING
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Microsoft Office 2007 Essential Introduction to Computers.
© Paradigm Publishing Inc. 2-1 Chapter 2 Input and Processing.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Discovering Computers 2008 Fundamentals Fourth Edition Discovering Computers 2008 Fundamentals Fourth Edition Chapter 1 Introduction to Computers.
Microsoft Office 2010 Introduction to Computers and How to Purchase Computers and Mobile Devices.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
WHAT SHOULD HAVE BEEN COVERED DAY ONE Part 4 Ms. T. N. Jones1.
Chapter 1: Introduction to Computers and Programming
Chapter 1 Introduction 2nd Semester H
Introduction to Computing Systems
Computer System Hardware
Computer Architecture and Number Systems
CPU Lesson 2.
Introduction to Computers
BASIC PROGRAMMING C SCP1103 (02)
Outcome based Learning Objectives
Essential Introduction to Computers
Computer Hardware – System Unit
BASIC PROGRAMMING C SCP1103 (02)
Overview of Computers and Programming Chapter 1
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Computer Architecture
Lecture 2 Introduction to Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Introduction to Computing Lecture # 1
Chapter 1: Introduction to Computers and Programming
Essential Introduction to Computers
Computers: Hardware and Software
Topics Introduction Hardware and Software How Computers Store Data
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Machine Architecture and Number Systems
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Introduction to Computer Systems
ICS103 Programming in C 1: Overview of Computers And Programming
Introduction to Computers
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Outcome based Learning Objectives By the end of this course, students will be able to Understand the basic terminology in C Programming Write, Compile and debug programs written in C Use different data types in a C program Design programs using decision structure, loops and functions Explain the difference between call by value and call by reference Understand the dynamic of memory by using pointers Create/update basic data files KIIT UNIVERSITY

Course Contents KIIT UNIVERSITY Sr # Major and Detailed Coverage Area Hrs 1 Introduction 3 Introduction to computer and it’s organization Computer hardware and memory Introduction to programming (High level/low level languages, procedural/structural programming) Introduction to Flowchart & Algorithm Number system representation 2 Variables, constants, Data types, Operators Types of variables and constants Console input/output operations (library functions) Operators Type casting Control statements 5 Decision control and branching statements (if, nested if and switch case statements, etc.) Looping control and their types (while, do-while, for, etc.) break and continue statements KIIT UNIVERSITY

Course Contents cont… KIIT UNIVERSITY Sr # Major and Detailed Coverage Area Hrs 4 Arrays Introduction to Array Single Dimensional Array Multidimensional array Mid Semester 5 Functions Library & User defined Functions, Formal and Actual parameters Declaring, defining and calling functions Parameter Passing – call-by-value and call-by-reference, Recursion 6 Storage Classes 2 Different types of storage classes – (auto, static, extern, register) 7 Strings Character Arrays and Strings, String Manipulation 8 Pointers 3 Pointer variable, Pointer Arithmetic, Passing parameters by reference, Pointer to pointer, Pointer to functions KIIT UNIVERSITY

Course Contents cont… KIIT UNIVERSITY Sr # Major and Detailed Coverage Area Hrs 9 User Defined Data Types – Structures and Unions 3 Structure: definition, structure variable, creation, initialization and assignment Pointers to structures Union and their uses Enum and their uses 10 Dynamic Memory Allocation 2 Memory allocation functions (malloc, calloc, realloc, etc.) Memory de-allocation function (free) 11 File Handling File operations - opening, closing, reading, writing etc. 12 Additional Features Command line arguments Bitwise operators Macros End Semester KIIT UNIVERSITY

Recommended Books KIIT UNIVERSITY Textbook Computer fundamentals and programming in C – Pradip Dey & Manas Ghosh, Second Edition 2013, OXFORD University Press Reference Books Programming in C – Bryon Gottfried, Third Edition. 2010, TMH The ‘C’ programming language – Ritchim Kenighan, Second Edition, 2012 D.M. Ritche, PHI Programming in ANSI C – E. Balaguruswami, Sixth Edition, TMH C The Complete Reference – H. Sohildt, Fourth Edition, 2000 TMH Let us C – Y. Kanetkar, Twelfth Edition, 2012 BPB Publications Computer Science – A Structured Programming Approach using C – B.A. Forouzan & R.F Gillberg,, Third Edition, 2007, Cengage Learning KIIT UNIVERSITY

Evaluation and Prerequisites Grades will be based on Pass mark Assignments/class test/quiz = 15 marks Midterm exam - 25 marks End term exam - 60 marks Pass mark – 40 Prerequisites Grades NIL O – greater than or equal to 90 E - greater than or equal to 80 A – greater than or equal to 70 B - greater than or equal to 60 C - greater than or equal to 50 D – greater than or equal to 40 F – Less than 40 KIIT UNIVERSITY

What is a computer? A computer is an electronic device, operating under the control of instructions (i.e. software) stored in its own memory unit, that can: accept data (input) manipulate data (process) produce results (output) store the results (storage) Computer system is used to describe a collection of devices that function together as a system. What are the collection of devices? KIIT UNIVERSITY

Devices that comprise a computer system KIIT UNIVERSITY

Data and Information All computer processing requires data, which is a collection of raw facts, figures and symbols, such as numbers, words, images, video and sound, given to the computer during the input phase. Computers manipulate data to create information. Information is data that is organized, meaningful, and useful. During the output Phase, the information that has been created is put into some form, such as a printed report. The information can also be put in computer storage for future use. KIIT UNIVERSITY

Computer system organization KIIT UNIVERSITY

Input Device KIIT UNIVERSITY An input device is any hardware component that allows you to enter data and instructions into a computer. A keyboard is an input device that contains keys users press to enter data and instructions into the computer A mouse is a pointing device that fits comfortably under the palm of your hand Most notebook computers have a touchpad, a small, flat, rectangular pointing device KIIT UNIVERSITY

System Unit KIIT UNIVERSITY

Output Devices KIIT UNIVERSITY Output devices are hardware components that convey information to one or more people. A printer is an output device that produces text and graphics on a physical medium such as paper Ink-jet printer Photo printer Laser printer Multifunction peripheral (all-in-one device) KIIT UNIVERSITY

Display Device KIIT UNIVERSITY A display device is an output device that visually conveys text, graphics, and video information. LCD monitors use a liquid crystal display to produce images on the screen KIIT UNIVERSITY

Storage Devices A storage device is the computer hardware that records and/or retrieves items to and from storage media. A hard disk is a storage device that contains one or more inflexible, circular platters that use magnetic particles to store data, instructions, and information in tracks and sectors KIIT UNIVERSITY

Storage Devices cont… An external hard disk is a separate freestanding hard disk that connects with a cable to a port on the system unit and communicates A removable hard disk is a hard disk that you insert and remove from a drive. KIIT UNIVERSITY

Storage Devices cont… Flash memory is a type of memory that can be erased electronically and rewritten A memory card is a removable flash memory device, usually no bigger than 1.5 inches in height or width, that you insert and remove from a slot in a computer, mobile device, or card reader/writer KIIT UNIVERSITY

Storage Devices A USB flash drive, sometimes called a thumb drive, is a flash memory storage device that plugs into a USB port on a computer or mobile device KIIT UNIVERSITY

Communication Devices A communications device is a hardware component that enables a computer to send (transmit) and receive data, instructions, and information to and from one or more computers KIIT UNIVERSITY

Software Software consists of a series of instructions, organized for a common purpose, that tells the computer hardware what tasks to perform and how to perform them. This set of instructions is sequenced and organized in a computer program. Therefore, a program is a series of instructions which is intended to direct a computer to perform certain functions and executed by the processors. So in broader sense Software can be described as a set of related programs and it is more than a collection of programs. KIIT UNIVERSITY

Software cont… Software System software is designed to facilitate and coordinate the use of the computer by making hardware operational. It interacts with the computer system at low level. Examples are operating system, loader, linker etc Application software is designed to perform specific usages of the users. Examples are Microsoft Word, Microsoft Excel, Microsoft Power Point, Microsoft Access, Page Maker, Coral Draw, Photoshop, Tally, AutoCAD, Acrobat, Win Amp, Micro Media Flash, iLeap, Xing MP3 Player etc KIIT UNIVERSITY

Hardware Hardware is the physical components of a computer that includes all mechanical, electrical, electronic and magnetic parts attached to it. A computer consists of the following major hardware components: I/O i.e. Input/output devices CPU i.e. central processing unit Memory unit and storage devices Interface unit KIIT UNIVERSITY

Hardware cont… Hardware is the physical components of a computer that includes all mechanical, electrical, electronic and magnetic parts attached to it. A computer consists of the following major hardware components: I/O i.e. Input/output devices CPU i.e. central processing unit Memory unit and storage devices Interface unit KIIT UNIVERSITY

Input devices The data and instructions are typed, submitted, Or transmitted to a computer through input devices. Most common input devices are : Keyboard Mouse Scanner Touchpad KIIT UNIVERSITY

Output devices Output devices display the output results of the operations on the input data or to print the data. Most common output devices are : Monitor Printer KIIT UNIVERSITY

CPU CPU can be thought of as the brain of the computer where most of the processing takes place. During processing, it locates and executes the program instructions and fetches data from memory and input/output devices and sends back the computed data. It is divided into following functional units Registers - These are high-speed storage devices. In most CPUs, some registers are reserved for special purposes. ALU (Arithmetic logic unit) - part of the CPU that performs arithmetic operations, such as addition and subtraction as well as logical operations, such as comparing two numbers to see if they are the equal or greater or less. CU (Control unit) - coordinates the processing by controlling the transfer of data and instructions between main memory and the registers in the CPU. KIIT UNIVERSITY

Memory Unit Components such as the I/O devices and CPU are not sufficient for the working of the computer and hence the storage area is needed to store instructions and data either temporarily or permanently so that subsequent retrieval of the instructions and data can be possible on demand. Data are stored in the memory as binary digits, called bits. Data of various types are encoded as series of bits and stored in consecutive memory locations. Each memory location is comprises of a single byte which is equals to 8 bits and has a unique address so that the contents of the desired memory locations can be accessed independently by referring to its address. A single data item is stored in one or more consecutive bytes of memory. The address of the first byte is used as the address of the entire memory location. KIIT UNIVERSITY

Unit of memory KIIT UNIVERSITY

Interface Unit The interface unit interconnects the CPU with memory and also with the various input/output (I/O) devices and hence the instructions and data move between the CPU and other hardware components through it. It is a set of parallel wires or lines which connects all the internal computer components to the CPU and main memory. Depending on the type of data transmitted, a bus can be classified into the following three types: Data bus : The bus used to carry actual data Address bus memory or Input/output device : Addresses travel via the address bus. Control bus: This bus carries control information between the CPU and other devices within the computer. KIIT UNIVERSITY

Bus based computer organization KIIT UNIVERSITY

Computer Memory Primary memory – It is the area where data and programs are stored while the program is being executed along with the data. This is also known as main memory forms the working area of the program and is accessed directly by the processor. Secondary memory – It is where programs and data are kept on a long-term basis. Common secondary storage devices are the hard disk and optical disks. The hard disk has enormous storage capacity compared to main memory. It is also known as auxiliary memory that stores huge volume of data at a less cost than primary memory devices KIIT UNIVERSITY

Computer Memory cont… Cache – Cache memory is a small-sized type of volatile computer memory that provides high-speed data access to a processor and stores frequently used computer programs, applications and data. It stores and retains data only until a computer is powered up. Registers - A special, high-speed storage area within the CPU. All data must be represented in a register before it can be processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register. KIIT UNIVERSITY

Memory hierarchy KIIT UNIVERSITY

Layered view of the Computer Application Programs Word-Processors, Spreadsheets, Database Software, IDEs, etc… System Software Compilers, Interpreters, Preprocessors, etc. Operating System, Device Drivers Machine with all its hardware KIIT UNIVERSITY

Operating System (OS) Provides several essential services: Loading & running application programs Allocating memory & processor time Providing input & output facilities Managing files of information KIIT UNIVERSITY

Programming Languages Programs are written in programming languages (i.e. PL). A PL is A special purpose language A set of rules and symbols used to construct a computer program A language used to interact with the computer KIIT UNIVERSITY

Computer Languages KIIT UNIVERSITY Machine Language Uses binary code Machine-dependent Not portable Assembly Language Uses mnemonics Not usually portable High Level Language Uses English-like language Machine independent Portable (but must be compiled for different platforms) Examples: Pascal, C, C++, Java, Fortran, . . . Low Level Language KIIT UNIVERSITY

Programming Languages Procedural Language The given problem is divided in to a number of sub problems depending upon its functionality. The sub problems are called procedures or Methods. Any procedure can be called at any point during the program execution. The program has global and local variables. E.g. Fortran, COBOL Structural Language The program is divided into modules and the modules are then divided into functions. The usage of goto statement is removed or reduced. Each module can work independent of one another. E.g. Algol, Pascal, C KIIT UNIVERSITY

Programming Languages cont… Procedural Programming Structural Programming KIIT UNIVERSITY

Algorithm KIIT UNIVERSITY A step by step procedure for solving a particular problem is an Algorithm. To be an algorithm, a set of rules must be unambiguous and have a clear stopping point. Algorithms can be expressed in any language, from natural languages like English or French to programming languages like C++, C. Problem - Design an algorithm to add two numbers and display the average. Step 1 − START Step 2 − input x Step 3 − input y Step 4 − sum = a + b Step 5 – average = sum / 2 Step 5 − display average Step 6 − END KIIT UNIVERSITY

Flowchart KIIT UNIVERSITY A flowchart is a graphical representation of an algorithm. These flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language. Often we see how flowcharts are helpful in explaining the program to others. Hence, it is correct to say that a flowchart is a must for the better documentation of a complex program. Standard Symbols: KIIT UNIVERSITY

Flowchart Guidelines KIIT UNIVERSITY In drawing a proper flowchart, all necessary requirements/steps should be listed out in logical order. The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity in understanding the flowchart. The usual direction of the flow of a procedure or system is from left to right or top to bottom Only one flow line should come out from a process symbol Only one flow line should enter a decision symbol, but two or three flow lines, one for each possible answer, should leave the decision symbol. KIIT UNIVERSITY

Flowchart Guidelines KIIT UNIVERSITY If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the intersection of flow lines if you want to make it more effective and better way of communication. Ensure that the flowchart has a logical start and finish. It is useful to test the validity of the flowchart by passing through it with a simple test data. KIIT UNIVERSITY

Flowchart KIIT UNIVERSITY Below is the flowchart to add two numbers and display the average KIIT UNIVERSITY

Number System System Base Symbols Used by humans? Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 Octal 8 0, 1, … 7 Hexa- decimal 16 0, 1, … 9, A, B, … F KIIT UNIVERSITY

Number System Conversion The possibilities: Decimal Octal Binary Hexadecimal KIIT UNIVERSITY

Binary to Decimal KIIT UNIVERSITY Technique: Multiply each bit by 2n, where n is the “weight” of the bit The weight is the position of the bit, starting from 0 on the right Add the results 1010112 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32 4310 Bit “0” KIIT UNIVERSITY

Decimal to Binary KIIT UNIVERSITY Technique: 12510 = ?2 Technique: Continuously divide by two to give a result and keep track of the reminder until the final result equals to 0 2 125 62 1 2 31 0 2 15 1 2 7 1 2 3 1 2 1 1 2 0 1 12510 = 11111012 KIIT UNIVERSITY

Thank You KIIT UNIVERSITY