Chapter 1: Introduction

Similar documents
0 Introduction: Computer systems and program development

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

Introduction to Programming

Chapter 1 Introduction to Computers and C++ Programming

C++ Programming Language Lecture 1 Introduction

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved.

Fundamentals of Programming. Lecture 1: Introduction to C Programming

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Introduction. Instructor: Jia Xu CSCI-135

Lecture 1: Preliminaries

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

CSCI.4430/6969 Programming Languages Lecture Notes

Fundamentals of Programming (C)

Structured Languages. Rahul Deodhar

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

INTRODUCTION TO THE COURSE

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

CGT 456 Lecture 1. Introduction to Computers & Programming

Chapter 1 Introduction to Computers and C++ Programming

by Pearson Education, Inc. All Rights Reserved.

CHAPTER 1 Introduction to Computers and Java

Chapter 1: Introduction to Computers and Programming

CS 1713 Introduction to Computer Programming II Ch 0 Overview - Problem solving

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

Introduction to Cygwin Operating Environment

Multiple Choice Questions UNIT-I

Introduction to Basis and Practice in Programming

Fundamentals of Python: First Programs. Chapter 1: Introduction Modifications by Mr. Dave Clausen

Chapter 1 Overview of Programming and Problem Solving By C.K. Liang

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

EL2310 Scientific Programming

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Computer Principles and Components 1

Spring 2018 NENG 202 Introduction to Computer Programming

Computer Fundamentals

Administration Computers Software Algorithms Programming Languages

CSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett

learning objectives understand the role of an operating system understand the role of interpreters and compilers

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

CptS 360 (System Programming) Unit 2: Introduction to UNIX and Linux

Overview of Unix / Linux operating systems

CS240: Programming in C

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Unix/Linux: History and Philosophy

A polyglot day: learning from language paradigms. Benson Joeris Kathleen Dollard

C H A P T E R 1. Introduction to Computers and Programming

Unix System Architecture, File System, and Shell Commands

CSI31 Introduction to Computer Programming I. Dr. Sharon Persinger Fall

Introduction to Shell Scripting

EL2310 Scientific Programming

Introduction to Engineering Using Robotics Experiments. Dr. Yinong Chen

Introduction to Python. Didzis Gosko

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

ECS15, Lecture 10. Goals of this course 2/8/13. Mini-Review & Topic 3.2 Software. Today s agenda

About shells and command lines

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

Evolution of the Major Programming Languages

CS120 Computer Science I. Instructor: Jia Song

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

CS 50 Introduction to Computer Science I

Programming Languages: Part 1. Robert M. Dondero, Ph.D. Princeton University

Evolutionary Genetics. LV Lecture with exercises 6KP. Bioinformatics. Jean-Claude Walser

Unix Handouts. Shantanu N Kulkarni

A script is a computer program that automates the sort of task that a user might otherwise do interactively at the keyboard.

CS 430 Spring History of Programming Languages. Mike Lam, Professor. John McCarthy ( ) Inventor of LISP

Comp 333: Concepts of Programming Languages Fall 2016

Bash command shell language interpreter

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

Programming. Languages & Frameworks. Hans-Petter Halvorsen, M.Sc. O. Widder. (2013). geek&poke. Available:

Introduction to Java Programming

What is a programming language?

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

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

Chapter 2. Evolution of the Major Programming Languages

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

CS Computer Architecture

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

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

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

Computer Science & Engineering 150A Problem Solving Using Computers

Shell script. Shell Scripts. A shell script contains a sequence of commands in a text file. Shell is an command language interpreter.

An Operating System History of Operating Systems. Operating Systems. Autumn CS4023

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

Operating Systems. Copyleft 2005, Binnur Kurt

UNIX Concepts COMPSCI 386

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

8/13/ /printqp.php?heading=II BSc [ ], Semester III, Allied: COMPUTER PROGRAMMING-PERL -309C&qname=309C

Introduction to Systems Programming

Introduction. A. Bellaachia Page: 1

What is UNIX? A Little Bit about UNIX and User Interfaces. Adapted from Practical Unix and Programming Hunter College

Lecture 1: CS2400 Introduction to Computer Science

EECS2301. Lab 1 Winter 2016

Chapter 1 Introduction to Computers, Programs, and Java

An Introduc+on to Computers and Java CSC 121 Spring 2017 Howard Rosenthal

INTRODUCTION TO OPERATING SYSTEMS. Jo, Heeseung

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Is it ever useful to be confident that a problem is hard?

Transcription:

Chapter 1: Introduction Outline Introduction What Is a Computer? Computer Hardware Computer Software Computer Programming Languages Machine Code, Assembly Languages and High-Level Languages. The History of C Object-Oriented Programming in C++ Compilation-Based Execution of Programs Executing Programs Using an Interpreter A C/C++ Interpreter Ch

Introduction We will learn the C programming language Learn structured programming and proper programming techniques. Introduction to numerical computing in Ch. The prerequisite is trigonometry No prior programming experience is required.

What is a Computer? Computer A computer is a machine that manipulates data based on a list of instructions called program. A computer consists of hardware and software. Computer Hardware Computer hardware is the physical part of a computer. A typical computer consists of central processing unit (CPU), main memory and external memory, and input and output devices. A CPU consists of control unit (CU), arithmetic and logic unit (ALU), and registers.

Samples of Computer Hardware A single board computer and a tiny computer.

The von Newmann Computer Architecture Both programs and data are stored in the same memory

Major Components of a Computer 1. Input devices Obtains information from input devices (keyboard, mouse) 2. Output devices Outputs information (to screen, printer, control other devices) 3. Main memory Installs programs and data for rapid access 4. CPU: 4.1 Arithmetic and logic unit (ALU) Performs arithmetic calculations and logic decisions 4.2 Control unit (CU) Supervises and coordinates activities of the computer 4.3 Registers Fast memory 5. External memory Store programs and data permanently (hard disks, CDs, USB)

Hardware Trends Moore s Law (1965): The number of transistors that can be inexpensively placed on an integrated circuit increases exponentially, doubling approximately every two years. Based on Moore s law, every two years, the following approximately double: CPU speed at which computers execute their programs. The amount of main memory. The amount of secondary memory.

Computer Software Computer software refers to a collection of computer programs that can be loaded into main memory and executed in the CPU of a computer. Computer software can be classified as operating system and application software. An operating system is a software program for management and coordination of activities and sharing the resources of a computer. Application software refers to programs developed to assist users in completing specific tasks. A process: a running program. Software is harder than hardware (Cyrus Comment: Sometimes! )

Interaction of Users and Computer Hardware through Software Two interface methods: (1) Command shell (2) Graphical user interface (GUI)

Graphical User Interface

Command Shells and Their Inventors Bourne shell (sh) C shell (ch) Korn shell (ksh) BASH shell (sh, bash) Ch (C/C++) shell (ch) MS-DOS shell (cmd, command) Stephen Bourne Bill Joys David Korn Brian J. Fox Harry H. Cheng Tim Paterson

Ch Command Shell Using commands pwd, cd, and ls to print the working directory, change directory, and list files in the Ch home directory. C:/Ch> pwd C:/Ch C:/Ch> ls bin/ demos/ docs/ include/ license/ README.TXT sbin/ config/ dl/ extern/ lib/ package/ release/ toolkit/ C:/Ch> cd docs C:/Ch/docs> C:/Ch/docs> ls README.TXT chguide.pdf chinstall.pdf chref.pdf man/

Computer Programming Languages Three types of programming languages 1. Machine code or machine languages A sequence of 0 s and 1 s giving machine specific instructions Example: 00011001 2. Assembly language Using meaningful symbols to represent machine code. Example: add hl,de Assembler: Assembly code machine code Disassembler: machine code assembly code

Computer Programming Languages 3. High-level languages Similar to everyday English and use mathematical notations (processed by compilers or interpreters) Example of a C statement: a = a + 8;

Computer Programming Languages 3. High-level languages Similar to everyday English and use mathematical notations (processed by compilers or interpreters) Example of a C statement: a = a + 8;

Comparison of High-Level Language with Machine Code and Assembly Code The memory addresses, machine code, and assembly code corresponding to a C statement a = a + 8 for the Rabbit 3000 8-bit microprocessor. Memory address Machine code Assembly code ------------------------------------------------------------------------------------- 0X1EA1 000100010000100000000000 ld de,0x0008 0X1EA4 1100010000000000 ld hl,(sp+0) 0X1EA6 00011001 add hl,de 0X1EA7 1101010000000000 ld (sp+0),hl

High-level Computer Languages and Their Inventors FORTRAN John W. Backus, 1954 BASIC George Kemeny and Tom Kurtz, 1964 Pascal Nicolas Wirth C Dennis M. Ritchie C++ Bjarne Stroustrup Java James Gosling C# Anders Hejlsberg

C/C++ Are Dominant Languages in Industry and University Most large-scale projects are written in C/C++ Most off-the-shelf software packages are written in C/C++ The language of choice for real-time and embedded computing

TIOBE Programming Community Index for June 2009 http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html 1 Java 20.147% 2 C 16.779% 3 C++ 10.594% 20 MATLAB 0.527% 26 Fortran 0.374% C/C++ combined together is 27.373%

Programming Language Popularity http://langpop.com/

History of C C Invented by Ritchie based on B, a simplified version of BCPL. Used to develop Unix operating system and Unix commands Most system software such as OS are written in C or C++ Replacement for assembly language for hardware interface. By late 1970's C had evolved to K & R C C Standards 1 st C standard created in 1989 by ANSI, ratified by ISO in 1990. It is called C89. Some call it C90. 2 nd C standard was ratified in 1999, called C99. Numerical extensions such as complex numbers, variable length arrays, and IEEE floating-point arithmetic are major enhancement in C99. C99 will be pointed out whenever features in C99 only are presented.

C++ Language C with classes invented by Bjarne Stroustrup at Bell Labs in 1980s. Powerful object-oriented capabilities polymorphism inheritance information hiding C++ is very powerful, but too complicated. Without a solid foundation in C, it is impossible to master object-oriented features of C++. C++ is a superset of C89 C++ is no longer a superset of C99

Phases of Compilation-Based Execution of a Program 1. Edit 2. Compile 3. Link 4. Execute

Compilation-Based Execution of a C Program Creating an executable program from a C program using compiler and linker in Windows. Executing the created executable program.

Scripting Languages and Their Inventors Tcl/Tk John Ousterhout Python Guido van Rossum Perl Larry Walls PHP Rasmus Lerdorf Ruby Yukihiro Matsumoto Ch (C/C++) Harry Cheng

Ch versus Other Languages Ch is a C/C++ interpreter. It is especially suitable for learning computer programming in C and C++.

Phases of Interpreter-Based Execution of a Program 1. Edit 2. Execute

Interpretive Execution of a C Program Executing a C program using an interpreter.

Array-Based Mathematical Software and Their Inventors MATLAB Mathematica Ch (C/C++) Cleve Moler and others Stephen Wolfram and others Harry H. Cheng

Computing Paradigm 1970 s --- Mainframe 1980 s --- Client/Server 1990 s --- Network Computing 2000's --- Ubiquitous Computing