0% found this document useful (0 votes)
0 views

2025 Basic Computer Programming Week01 3 (1)

The document outlines a course on Basic Computer Programming focusing on the C programming language, including course information, learning objectives, and assessment methods. It provides a detailed schedule of topics, including computing systems, programming fundamentals, and the history of computing. The course aims to equip students with essential programming skills and knowledge through lectures, assignments, and exams.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

2025 Basic Computer Programming Week01 3 (1)

The document outlines a course on Basic Computer Programming focusing on the C programming language, including course information, learning objectives, and assessment methods. It provides a detailed schedule of topics, including computing systems, programming fundamentals, and the history of computing. The course aims to equip students with essential programming skills and knowledge through lectures, assignments, and exams.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

기초 컴퓨터 프로그래밍

(Basic Computer
Programming)

2025

1
Contents
• Course introduction

• Overview of Computing System and


Programming in C

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

• Learn fundamental concepts and knowledge of


C programming language

• Learn basic syntax of C programming

• Acquire the ability of program design and


problem-solving using C programming
language

5
Textbook

Textbook Title Authors Year of Publisher


Publication
Main Programming in ANSI C E. Balagurusamy 2019 McGraw-Hill
(8th ed.)
Sub ANSI C 프로그래밍(8판) 최종필 외 2021 학산미디어
(in Korean)

6
Student assessment
• Mid-term exam: April 28(Mon.)
• Final exam: June 23(Mon.)

Assessment Item Assessment Additional Description


Ratio (%)
Attendance 10 3 lates = 1 absent
2 absents (90), 3 absents (80),…,
12 absents (0)

Mid-term exam 30 Examination absent = F

Final exam 30 Examination absent = F

Assignment 30

7
March

Week 01 March 04 March 10


Week 02 March 11 March 17
Week 03 March 18 March 24
Week 04 March 25 March 31
April

Week 05 April 01 April 07


Week 06 April 08 April 14
Week 07 April 15 April 21
Week 08 April 22 April 28 Mid-term Exam on
April 28
May

Week 09 April 29 May 05 No class on May 05


Week 10 May 06 May 12
Week 11 May 13 May 19
Week 12 May 20 May 26
June

Week 13 May 27 Jun2 02


Week 14 June 03 June 09
Week 15 June 10 June 16
Week 16 June 17 June 23 Exam on
June 23
Course Schedule
week Topic and content Student assignment
1 Overview of Computing System and Programming in C
2 Constants, Variables, and Data Types
3 C setup and programming
4 Operators and Expressions
5 Managing Input and Output Operations
6 Decision Making and Branching
7 Decision Making and Looping
8 Mid-term Exam.
9 Array No class on May 05
10 Character Array and Strings
11 Character Array and Strings
12 Assignment release
User Defined Functions
(due week14)
13 Structure and Unions
14 Pointers
15 File Management in C
16 Final Exam.
12
INTRODUCTION
TO COMPUTING

13
Fundamentals – S/W and H/W
• Model of Computing Machine
– Timeline of Computing Machine
– The Birth of the Computer

• Classical model for computing machines

• 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

• Reference text: History of computing – IEEE Computer


Society – timeline of occasions in computing history
• https://ieeecs-
media.computer.org/assets/pdf/timeline.pdf

• Reference video: The Birth of the Computer


• https://www.ted.com/talks/george_dyson_the_birth_of_th
e_computer

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

CPU(Central Processing Unit)

ALU(Arithmetic Logic Unit)


Input Device Output Device

CU(Control Unit)

Main memory Secondary


(RAM) storage

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

• The instructions that the CPU carries out might be :


[INSTR1] Load into ALU the number from mem location 15
[INSTR2] Load into ALU the number from mem location 7
[INSTR3] Add the two numbers in the ALU
[INSTR4] If result is bigger than 10 jump to [INSTR6]
[INSTR5] Add 10 to the number in the ALU
[INSTR6] Store the result from ALU into mem location 3

• The processors instruction set: all basic operations that


can be carried out by a certain type of processor

26
+10

ALU >10

+
Output Input Input

Memory Loc Loc Loc


3 7 15

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

LEDS display the current


memory address and
contents of current memory
location or registers

SWITCHES allow programmer


to enter binary data / instructions 29
Higher level languages
• Assembly language
– First step from machine language
– Uses symbolic names for operations

– Example: a hypothetical assembly language


program sequence:

1010 1111 LD1 15


1011 0111 LD2 7
0111 ADD
0011 1010 CMP 10
0010 1100 JGE 12
0110 1010 ADD 10
… …
30
• Assembly language (cont)
– Translation of assembly language into machine
language: in the beginning done manually, later
done by a special computer program – the
assembler
– Disadvantages: Low-level language:
• programmer must learn the instruction set of the particular
processor
• Program must be rewritten in order to run on a different
processor type – program is not portable

31
Higher level languages
• High level languages
– Using more abstract instructions
– Portable programs result

– Example: a hypothetical program sequence:

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

Source Machine Source


Compiler
Code Code Code

Interpreter

Input Executable Output Input Output


data Program data data data

Compiler: analyzes program and Interpreter: analyzes and executes


translates it into machine language program statements at the same
Executable program: can be run time
independently from compiler as Execution is slower
many times => fast execution Easier to debug program
34
Operating Systems
• Operating system: a program that controls the
entire operation of a computer system:
– Handles all input and output (I/O) operations that
are performed on a computer
– manages the computer system’s resources
– handles the execution of programs (including
multitasking or multiuser facilities)
• Most famous OS families:
– Windows
– Unix

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

You might also like