2025 Basic Computer Programming Week01 3 (1)
2025 Basic Computer Programming Week01 3 (1)
(Basic Computer
Programming)
2025
1
Contents
• Course introduction
2
COURSE INTRODUCTION
3
Course Information
• Time/Room
– Monday 3,4 / Wednesday 3
– College of Engineering building 2 (208) - 415
• Medium of Instructions
– English
– Lecture/Report/Mid-term Test/Final Test in English
4
Learning objective
5
Textbook
6
Student assessment
• Mid-term exam: April 28(Mon.)
• Final exam: June 23(Mon.)
Assignment 30
7
March
13
Fundamentals – S/W and H/W
• Model of Computing Machine
– Timeline of Computing Machine
– The Birth of the Computer
• Programming
• Programming languages
• Compiling
• Operating system
14
Model of a Computing Machine
• Computing machine (Computer): “a machine
that stores and manipulates information
under the control of a changeable program
that is stored in its memory.”
– Pocket calculator: not a computer ! Manipulates information,
but is built to do a specific task (no changeable stored
program)
• This model is named the “von Neumann architecture” (John von
Neumann – 1945; EDVAC - Electronic Discrete Variable Automatic
Computer – the first stored-program computer)
• Stored-program concept: earlier ideas in theoretical articles of:
Alan Turing (1936), Konrad Zuse (1936)
15
Model of a Computing Machine
16
Timeline of Computing History
https://ieeecs-media.computer.org/assets/pdf/timeline.pdf
17
Timeline of Computing History
https://ieeecs-media.computer.org/assets/pdf/timeline.pdf
18
Timeline of Computing History
https://ieeecs-media.computer.org/assets/pdf/timeline.pdf
19
Timeline of Computing History
https://ieeecs-media.computer.org/assets/pdf/timeline.pdf
20
Timeline of Computing History
https://ieeecs-media.computer.org/assets/pdf/timeline.pdf
21
The Birth of the Computer
(Running time: 17min 16sec)
https://www.ted.com/talks/george_dyson_the_birth_of_the_computer
22
The von Neumann architecture
CU(Control Unit)
23
The von Neumann architecture
• Central Processing Unit (CPU): the “brain” of the machine.
– CU: Control Unit
– ALU: Arithmetic and Logic Unit
• Carries out all basic operations of the computer
• Examples of basic operation: adding two numbers, testing to see if two
numbers are equal.
• Main memory (called RAM for Random Access Memory): stores
programs and data
– Fast but volatile
• Secondary memory: provides permanent storage
• Human-computer interaction: through input and output devices.
– keyboard, mouse, monitor
– Information from input devices is processed by the CPU and may be
sent to the main or secondary memory. When information needs to
be displayed, the CPU sends it to the output device(s).
24
How it works
• How does a computer execute a program ? (example
programs: a computer game, a word processor, etc)
• the instructions that comprise the program are copied
from the permanent secondary memory into the main
memory
• After the instructions are loaded, the CPU starts
executing the program.
• For each instruction, the instruction is retrieved from
memory, decoded to figure out what it represents, and
the appropriate action carried out. (the fetch- execute
cycle)
• Then the next instruction is fetched, decoded and
executed.
25
Machine level programming
• Example: suppose we want the computer to add
two numbers, and if the preliminary result is less
than 10, then add 10 to the result
26
+10
ALU >10
+
Output Input Input
27
Machine level programming
• the instructions and operands are represented in binary notation
(sequences of 0s and 1s).
– Why binary ? Because computer hardware relies on electric/electronic
circuits that have/can switch between 2 states
– bit (binary digit)
– Byte: 8 bits
• The program carried out by the CPU, on a hypothetical processor
type, could be:
1010 1111
1011 0111
0111
…
• This way had to be programmed the first computers !
• The job of the first programmers was to code directly in machine
language and to enter their programs using switches 28
Example: old computer frontpanel
31
Higher level languages
• High level languages
– Using more abstract instructions
– Portable programs result
DEFVAR a,b,c;
BEGIN
READ a
READ b
READ c
c := a+b
IF (c <10) THEN c:=c+10
PRINT c
END …
32
• High level languages
– Writing portable programs, using more abstract
instructions
– A high-level instruction (statement) is translated
into many machine instructions
– Translation of high-level language into machine
instructions: done by special computer programs –
compilers or interpreters
33
Compilers/Interpreters
Interpreter
35
Higher Level Languages
• Programming Paradigms:
– Imperative Programming: describes the exact
sequences of commands to be executed
• Structured programming, procedural programming
– FORTRAN, C, PASCAL, …
• Object oriented programming
– C++, Java, C#, …
– Declarative programming: program describes what
it should do, not how
• Functional programming
– Lisp, ML, …
• Logic Programming
– Prolog
36
The C Programming Language
• Developed by Dennis Ritchie at AT&T Bell Laboratories
in the early 1970s
• Growth of C tightly coupled with growth of Unix: Unix
was written mostly in C
• Success of PCs: need of porting C on MS-DOS
• Many providers of C compilers for many different
platforms => need for standardization of the C
language
• 1990: ANSI C (American National Standards Institute)
• International Standard Organization: ISO/IEC 9899:1990
• 1999: standard updated: C99, or ISO/IEC 9899:1999
37
IDE for Programming C
https://visualstudio.microsoft.com/ko/free-developer-offers/
38