Week1 - Chapter1 COMPUTER PROGRAMMING
Week1 - Chapter1 COMPUTER PROGRAMMING
Introduction to Computer
Programming
(Chapter 1) 1.
Program.”
2.
“C How To
Deitel (2007) .
Pearson
Adrian & Kathie Kingsley Hughes
(2005) “Beginning
Programming”. Wiley
Publishing, Inc.
3. from Wikipedia website, free
encyclopedia.
1
1.1 The Computer
http://www.cplusplus.com/do
c/tutorial/program_structure/
What Is Computer?
Computer
Hardware Software
3
Why Program?
Game consoles
Servers
Mainframes
Supercomputers
Embedded computers
6
Computer’s Component
8
Computer’s Component (cont…)
Note:
Some references books show the basic components of typical computer system is CPU,
Main memory, secondary memory/storage devices, input devices and output devices.
9
Computer Architecture
CPU
Control
Unit
Result
(Output)
Communication
devices
Input Devices
11
Computer Architecture (cont…)
• Comprised of:
• Control Unit
• Retrieves and decodes program instructions
• Coordinates activities of all other parts of computer
Main Memory
Main Memory
• Addresses – Each byte in memory is identified by a
unique number known as an address.
In Figure 1-3, the number 149 is stored in the byte with the address 16, and
the number 72 is stored at address 23.
Computer Architecture (cont…)
Secondary storage
Input devices
Output devices
Software
System Application
Software Software
Computer Software (Cont..)
21
Computer Software (Cont..)
Application Software
• users can directly
understand and use the
software.
• communicate in human
language
Interpreter • eg. Micr. Office, notepad,
• use to interpret high- prog. lang. such C, C++, VB,
level language to low etc.
level lang. and so on.
• user will communicate
with system easily. System Software
• operating system
• manage and control
by machine language
• eg. i-Mac, windows,
Unix, Linux,machine
lang.
22
Programs & Programming Languages
1011010000000101
• Types of languages:
Preprocessor Linker
Compiler
Why Python
Jupyter Notebook
Jupyter’s Interface
34
1.4
What Is a Program Made Of?
What Is a Program Made Of?
• Key Words
• Programmer-Defined Identifiers
• Operators
• Punctuation
• Syntax
Program 1-1
Lab Exercise
FKAAS. “Programming Technique 1.”
Part A -
Part B -
58
Quiz 1
Page 23
Tony Gaddish & Barret Krupnow. “Starting Out with
C++, 5th Edition.” Pearson International Edition.
59
Quiz 1 (cont..)
61