Introduction to Programming

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
INTRODUCTION OF COMPUTER
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Topic 1: Introduction to Computers and Programming
Computer Hardware In this lecture, we will study:
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
 2000 Prentice Hall, Inc. All rights reserved. 1 Introduction to Computers and C Programming Outline Introduction What Is a Computer? Computer Organization.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 An Overview of Computers and Programming Languages.
CS 1 •This is Computer Science 1. •Who is Professor Adams?
Lecture 1 Introduction to computers & VB.Net. What is a Computer? Examples? A device capable of  Performing computation  Making logical decisions 
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
COMPUTER PROGRAMMING. Computer programming the objective of the module to gain the necessary skills to develop a computer program using one of the high.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
1 st Semester Introduction to Computer and Programming Computer Engineering Department Kasetsart University, Bangkok, THAILAND.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
The Computer System CS 103: Computers and Application Software.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Computer Programming (1) Code & No.: CS 102 CREDIT HOURS: 5 UNIT Lecture 3.0 hours/week Lab: 2.0 hour/on every week a. This course introduces the students.
Computer Fundamentals MSCH 233 Lecture 1. What is a computer? A computer is an electronic machine which can accept data in a certain form, process the.
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang
Computers and Programming ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
Chapter 1 An Overview of Computers and Programming Languages.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Unit 3 - Computer Systems. Logical vs Physical A computer system can be represented in either a logical or physical form Both are useful in understanding.
Structured programming 1 st stage By Heba.A Raheem Assist Lecturer College of Sciences/Computer Sciences Department.
Computer Architecture and Number Systems
Java Programming: From the Ground Up
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 – Introduction to Computers, the Internet, and the Web
Outline Introduction What Is a Computer? Computer Organization
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Beginning C++ Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Topics Introduction Hardware and Software How Computers Store Data
National Diploma in Computer Studies
Outline Introduction What Is a Computer? Computer Organization
Logical Computer System
Introduction to Computer Programming
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
Presentation transcript:

Introduction to Programming A Lecture for the c++ Course Each slide has its own narration in an audio file. For the explanation of any slide, click on the audio icon to start the narration. The Professor‘s C++ Course by Linda W. Friedman is licensed under a  Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Computer Organization A computer system has the following logical components: Input Output Central Processing Unit (CPU) Arithmetic & Logical Unit (ALU) Main Memory Secondary Storage Introduction to Programming

Computer Organization Input Unit ‑ obtains data (and programs) from an input device for processing. Keyboard, mouse, CD‑ROM or DVD drive, scanner, digital camera... Output Unit ‑ takes information from the computer and places it on an output device ‑ monitor screen, printer, tape, DVD‑Writer… We (in the real world) use input / output devices to communicate with the computer. Introduction to Programming

Computer Organization Central Processing Unit (CPU) ‑ Coordinates the operation of the other sections of the computer. Arithmetic & Logical Unit (ALU) ‑ where calculations, relational and logical operations are performed ‑ part of the CPU. Introduction to Programming

Computer Organization Main Memory Unit ‑ primary memory, primary storage ‑ short‑term main storage area for data and executable programs (RAM). Ordered sequence of storage locations called memory cells, each memory cell has a unique address. Secondary Storage Unit ‑ secondary memory, permanent memory ‑ long term, secondary storage area for data and programs. Primary memory Secondary Temporary, volatile Permanent, non‑volatile Rapid access Slower access (1/0) Low capacity High capacity High cost Low cost Introduction to Programming

Computer Organization Also…. Computer Networks ‑ allows each computer to access (e.g.) the same large hard disk drive and high‑quality printer ‑ LAN. Introduction to Programming

Computer Languages In order to communicate with the computer we use one of several programming languages. In the beginning, there were… First generation ‑ Machine Language  Second generation ‑ Assembly Languages Third generation ‑ Compiler Languages Introduction to Programming

Computer Languages First generation ‑ Machine Language Each type of computer has its own machine language, the only language it can understand (machine dependent). Most machine languages consist of binary codes for both data and instructions, e.g., to add overtime pay to base pay we would need a series of binary codes such as, perhaps: 0010 0000 0000 0100 0100 0000 0000 0101 0011 0000 0000 0110 Introduction to Programming

Computer Languages Second generation ‑ Assembly Languages   Uses English‑like abbreviations to represent the machine‑language instructions. Uses a translator program called an assembler to convert each instruction from the assembly language instruction to the corresponding machine language binary code e.g., perhaps: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY Introduction to Programming

Computer Languages Third generation ‑ Compiler Languages High‑level, machine independent, more English‑like, more natural. Each high- level language statement translates to several low-level language statements, e.g.: GROSSPAY = BASEPAY + OVERPAY Use compilers to translate from the high‑level language into machine language. A compiler is a translator program that transforms high-level program code into a low-level machine-level executable program. Compilers translate the whole program first, then execute the object program. High-level languages are more English-like, easier to code, more costly to run, less flexible. e.g., FORTRAN, BASIC, COBOL, PL/1, ALGOL, APL, Pascal, SIMSCRIPT, Smalltalk, C, C++, Java, Python. Introduction to Programming

Computer Languages source program compiler or interpreter High‑level Language Translators Compilers Interpreters Slower translation Entire program Faster execution More efficient execution Good for commercial applications Faster translation One instruction or macro at a time Slower execution Less efficient execution Good for program development source program compiler or interpreter object program Introduction to Programming

Programming A program is a set of instructions in proper sequence, that causes a computer to perform a particular task. When learning to program in any programming language, it’s best just to learn the “rules of the game.” Modern programs are projects composed of many of individual program modules that have to be linked together in order to be run. In fact most developer systems have their own integrated development environment (ide) and programs are developed in phases within the ide. Introduction to Programming

Review What did we learn in this lecture? Plenty. arithmetic and logical unit (ALU) input unit assembler interpreter assembly language machine language central processing unit machine-dependent language compiler machine-independent language compiler language main memory computer language output unit computer organization program CPU secondary memory high-level language secondary storage ide Introduction to Programming