COSC1557: Introduction to Computing. Haibin Zhu, PhD. AssistProfessor Department of Computer Science Nipissing University (C) 2002. Instructor. Haibin Zhu, Ph. D. Assistant Professor, Department of CS and Math, Nipissing University Room: A124A Ext.: 4434 Email: email@example.com
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
COSC1557: Introduction to Computing
Haibin Zhu, PhD.
Department of Computer Science
Nature and uses of the computer-, algorithms-, number systems, information representation; and organization, with an overview of computer hardware and software, computing systems and major applications. Ethical and societal issues arc discussed. An introduction to high-level languages with an emphasis on writing programs in C++.
Algorithms and Data Structures
Artificial Intelligence and Robotics
Database and Information Retrieval
Numerical and Symbolic Computation
Software Methodology and Engineering
Social and Professional Context
ARPANET – The beginning of the Internet
Novell announces NetwareTCP/IP
MOSAIC, Apple Newton
Hardware and Software
Computers have two kinds of components:
Central Processing Unit (CPU):
Random Access Memory (RAM)
Secondary Memory (Disk):
While accessing RAM is faster than accessing secondary memory, it is still quite slow, relative to the rate at which the CPU runs.
To circumvent this problem, most systems add a fast cache memory to the CPU, to store recently used instructions and data.
(Assumption: Since such instructions/data were needed recently, they will be needed again in the near future.)
Putting the pieces together:
Programs are stored (long-term) in secondary memory, and loaded into main memory to run, from which the CPU retrieves and executes their statements.
The operating system (OS) is loaded from secondary memory into main memory when the computer is turned on, and remains in memory until the computer is turned off.
The OS acts as the “manager” of the system, making sure that each hardware device interacts smoothly with the others.
It also provides the interface by which the user interacts with the computer, and awaits user input if no application is running.
Examples: Windows 2000, Windows XP, Windows-NT, UNIX, Linux, Solaris, MacOS, ...
Applications are non-OS programs that perform some useful task, including word processors, spreadsheets, databases, web browsers, C++ compilers, ...
Example C++ compilers/environments:
Programs that are neither OS programs nor applications are called user programs.
User programs are what you’ll be writing in this course.
Programs and applications that are not running are stored on disk.
When you launch a program, the OS controls the CPU and loads the program from disk to RAM.
The OS then relinquishes the CPU to the program, which begins to run.
As the program runs, it repeatedly fetches the next instruction (from memory/cache), executes it, and stores any results back to memory.
That’s all a computer does: fetch-execute-store, millions of times each second!
A sequence of statements that instruct a computer in how to solve a problem is called a program.
The act of designing, writing and maintaining a program is called programming.
People who write programs are called programmers.
A computer only understands machine language statements.
A machine language statement is a sequence of ones and zeros that cause the computer to perform a particular action, such as add, subtract, multiply, ...
ML statements are stored in a computer’s memory, which is a sequence of switches.
For convenience of representation, an “on” switch is represented by 1, and an “off” switch is represented by 0.
ML thus appears to be binary (base-2):
... required a programmer to write in ML...
Programming was very difficult!
Devise a set of abbreviations (mnemonics) corresponding to the ML statements, plus a program to translate them into ML.
The abbreviations are an assembly language, and the program is called an assembler.
Allowed a programmer to use mnemonics, which were more natural than binary.
Devise a set of statements that are close to human language (if, while, do, ...), plus a program to translate them into ML.
The set of statements is called a high level language (HLL) and the program is called a compiler.
z = x + y;
Where an assembler translates one mnemonic into one ML statement, a HLL compiler translates one HLL statement into multiple ML statements.
High level languages (like C++) are
A program should solve a problem:
A computer has two kinds of components:
There are “levels” to computer languages: