Professional Documents
Culture Documents
01/13
• A device that takes data from the user or other devices
• Computes or manipulates the data by following a set of instructions
called programs
• Provides output to the user.
01/13
2
What is Computer Science (CS)
• Computer science is the study of processes that interact with data
and that can be represented as data in the form of programs.
• Branches of CS:
✔ Software engineering ✔ Human-computer interaction
✔ Graphics and visual computing ✔ Information management
✔ Networking and communication ✔ Intelligent systems
✔ Algorithms and complexity ✔ Operating systems
✔ Architecture and organization ✔ Parallel and distributed computing
✔ Computational science ✔ Platform-based development
✔ Programming languages ✔ Security and information assurance
And so on... 01/13
3
Why is CS Important
• Computers are used in almost every aspect of our lives:
✔ Agriculture
✔ Health Care
✔ Industry Automation
✔ Global Telecommunication
✔ Security and Law
✔ Finance and Banking
✔ Information and Resource Management System
✔ Self-driving Vehicles and Virtual Reality
And so on...
• As computers are less prone to mistakes, they will start to replace humans
• The demand of CS will keep increasing
01/13
4
History of CS
Beginning of Computing:
• Abacus
• 2500 BCE
01/13
5
History of CS
• Charles Babbage
Analytical Engine
• Ada Lovelace
01/13
6
History of CS
Alan Turing:
01/13
7
Generations
• 1940 – 1956: First Generation – Vacuum Tubes
01/13
9
Generations
• 1956 – 1963: Second Generation – Transistors
01/13
10
Generations
• 1964 – 1971: Third Generation – Integrated Circuits
01/13
11
Generations
• 1972 – 2010: Fourth Generation – Microprocessors
01/13
12
Generations
• 2010 – Present: Fifth Generation – Artificial Intelligence
01/13
13
How A Computer Works
✔ Input unit takes data or information from the user and stores into the memory in
the form of digital data
Output Unit:
The output unit (e.g., monitor, printer) provides the results of computer process to the users.
01/13
16
How A Computer Works
Examples: 1) Addition of two numbers [arithmetic operation]
2) Identification of the greater number from two numbers [Logical operation]
Processing:
Inputs: x = 2 (if x>y) Output:
Logical ‘x is greater’ 4 is greater
y=4
else ‘y is greater’
01/13
17
How A Computer Works
Data representation of a computer
✔ Binary (0, 1) data that deals with computer ✔Real-world data
01/13
18
How A Computer Works
Data representation of a computer
✔ Real-life example
HI
1001000 1001001
1001000
1001001
01/13
20
How A Computer Works
Different Types of Data Used in Computers
✔ Text- char., num., sym.
✔ Image – 2D/3D matrix of pixels
✔ Video - motion pictures
✔ Audio - voice/sound wave
✔ Graphic – computer generated: graphs, pdf, animation, 3D model, 3D game
▪ Text data representation
Hex. Binary Hex. Binary
ASCII Code 0 0000 8 1000
1 0001 9 1001
Binary 2 0010 A 1010
H - 01001000 3 0011 B 1011
……………………. 4 0100 C 1100
I - 01001001 5 0101 D 1101
……………………. 6 0110 E 1110
01/13 7 0111 F 1111
21
How A Computer Works
Image Data representation
▪ Black-white(binary) image representation ▪ Colour image representation
RGB (255,0,0) (0,255,0) (0,0,255)
Black (0) White (1)
…………………
…..
01/13
……………….....
... 22
How A Computer Works
Data representation of a computer
▪ Graphic data representation
▪ Video data representation Graphs
3D model
o Dynamic motion of images at a rate of 30 fps ~
o Data rate of HD video: (1920 × 1080) × (1 × 8) × 30
• number of pixels (i.e., resolution) • bits/pixel
• fps (i.e., number of frames per second)
Transducer
01/13
24
Hardware
Internal Hardware: An Internal Hardware
means hardware that surrounded by the
computer’s casing (e.g. Processor, RAM,
Hard disc, etc.).
01/13
25
Software
Software is a set of instructions that tells the computer how
to do certain tasks. A set of instructions is often called a
program.
The two most common types of programs are:
• System software
• Application software
01/13
27
Software
The Components of System Software
Kernel - program which remains in main memory while the computer is running, and directs other
“nonresident” programs to perform tasks that support application programs
01/13
28
Software
The Components of System Software
What Is an Operating System?
The operating system: A collection of programs that help you use the computer.
o Acts as a smart assistant that moves controls the flow of information to various
components and other programs.
o Manages the usage, storage, and access of programs, data, and processes.
o RAM (Random Access Memory)- The main part of the operating system is
transferred from a secondary storage (e.g., hard disk) to RAM when the computer is
first turned-on.
o This is called the “booting process” or “boot-up”.
o After the boot-up, a portion of RAM is taken up by the OS and other system software,
while other portions are available for loading application software or data.
01/13
30
Software
The Components of System Software
What is an algorithm?
An algorithm is a sequence of finite
instructions, often used for calculation and
data processing
1. Sequential Pseudocodes
2. Non-sequential Pseudocodes
01/13
36
Sequential Pseudocode
Sequential pseudocode consists of sequence of program
statements, executed one after another.
Problem 1: Determine the sum of 2 integers.
Pseudocode:
1. Input an integer A
2. Input another integer B
3. Calculate the sum: C=A+B
4. Output C
01/13
37
Non-sequential Pseudocode
Non-sequential pseudocode consists of number of program statements
which are executed based on some flow control statements.
Problem 2: Determine type of payment based on number of hours
worked by a worker.
Pseudocode: 1. Input Hours Worked
2. if Hours Worked > 40 then
3. Output: “Overtime Pay”;
4. else
5. Output: “Regular Pay”;
6. end 01/13
38
Flowchart
Flowchart is a graphical way of writing algorithms for solving problems.
• Rectangle is used for calculations
• Parallelogram is used for input and output
• Oval is used as terminator
• Diamond is used as decision
• Symbols are connected by arrows to represent the order of the
operations
01/13
39
Flowchart Start
Input B
Problem 1: Determine the sum of 2 integers.
C = A+B
Output C
End
01/13
40
Flowchart Start
yes
Problem 2: Determine type of payment Hours no
Worked > 40
based on number of hours worked by a
worker.
Output Output “Regular
“Overtime Pay” Pay”
End
01/13
41
Programming Languages
• C/C++/C#
• Java • HTML • SQL
• PHP • MySQL
• Python • JavaScript
•R
01/13
42
Summary
• What is computer
• What is computer science (CS)
• Why is CS important
• History of CS
• Generations
• How a computer works
• Basic architecture of a Computer
• Basic Components of a Computing System (Hardware, Software, Data, User)
• How a computer processes data (Binary, ASCII, Unicode)
• Program Designs and Algorithms (Pseudocode, Flowchart)
01/13
43