Chapter 1 (Autosaved)
Chapter 1 (Autosaved)
Introduction to Computer
Components
WHAT IS COMPUTER
Common Points
1. Computer.
2. Important Activities of Computer
3. Computer Components.
4. Main Components of System Unit
8/28/2023 3
To compute = To calculate
Generally
Generally, the term is used to describe a collection of
devices that function together as a system.
Cont.…
❑ An electronic device that can perform activities that involve
❑Mathematical
❑Logical and
❑Graphical manipulations.
❑ It performs the following three operations in sequence.
1. It receives data & instructions from the input device.
2. Processes the data as per instructions.
3. Provides the result (output) in a desired form.
❑ Data : It is the collection of raw facts, figures & symbols.
Ex : Names of students and their marks in different subjects listed in
random order.
Information : It is the data that is processed & presented in an
organized manner.
Ex : When the names of students are arranged in alphabetical
order, total and average marks are calculated & presented in a
tabular form, it is information.
Components of a Computer System
Central Processing Unit (CPU)
Data
control unit (CU)
Memory output
Arithmetic
logic RAM units
Input
Unit (ALU)
units ROM
Auxiliary Information
Memory /Knowledge
6
Cont.…
❑Program : Set of instructions that enables a computer to
perform a given task.
❑Advantages of computers
1. High speed
2. Accuracy
3. Storage
4. Automation
5. Diligence
6. Versatility
7. Cost effectiveness
❑Limitations of computers :
1. Computers need clear & complete instructions to perform a task accurately.
If the instructions are not clear & complete, the computer will not produce the
required result.
2. Computers cannot think.
3. Computers cannot learn by experience.
Business Banking Marketing
Insurance
Education
Healthcare
Communication
Engineering
Design
Military
Government
Computer Definition
• Is an electronic device that accepts
data/information, process it, and produces out put
for the user.
• Is not very intelligent device but, handles
instructions flawlessly and fast.
• Is accurate, suited for repetitive work
• Can store large amount of data, performs complex
calculations multiple tasks at a time.
9
• Generally, these are the important activities of
computer:
➢ Input
➢Processes
➢Out put
10
PC System Hardware Components
• It is called a system because it includes all the
components required to have a functional computer:
➢ Input devices- keyboard and mouse
➢ Computer- system unit
➢ Output devices- a CRT monitor and a printer
11
Main Components of the System Unit
• Microprocessor
• Mother board
• Power supply
• Drives
• Adapter cards
12
Mother Board
• Is the base of the modern computer system
• Is the main circuit board in the computer where every
thing comes together
• Used to plug in:
❖Processor(CPU)- the brain of a computer system
❖RAM-the working place of a computer system.
❖Buses- the physical path way on the mother board
❖Ports-serial and parallel port, etc
13
Power Supply
• A standard power supply draws power from
local alternating current(AC) source and
converts it in to:
– 3.3v,
– +5 and
– +12 volts direct current (DC), for on board
electronics and hard drives.
14
Drives
• Hard disk drive
➢ Hard disk-is the primary archival storage memory for the
system and is used to store crucial programs and data.
• CD –ROM drive
• Floppy disk drive
15
Adapter Cards
• Video adapter cards
• I/O adapter cards
• Network adapter card
16
Software
• Any programs that controls the computer system.
➢Program –the set of instructions/commands that
tell a computer to execute a series of specific
tasks.
• Two types of computer software:
➢System software
➢Application software
17
System Software
• Is a computer program that directly communicate
with computer hardware.
• It includes a combination of the following:
✓Operating system
✓Device derivers etc…
18
Application software
• Allows end users to accomplish one or more specific
tasks.
• Typical applications include:
✓Word processor
✓Database
✓Spreadsheet etc…
N.B application software communicates with the
computer hardware via system software, the
operating system.
19
An application software communicates with the
computer hardware via system software, the
operating system.
Application
User OS Hardware
software
20
Programming Languages
Very High Level
Languages
(SQL, Prolog, …)
High Level
Languages
(C++)
Low Level
Languages
(Assembly, Machine Code)
Programming languages
• Programming language is a set of rules, symbols, and
special words used to construct a computer program
• Three level of programming language:
➢ Machine language- binary representation of the instructions that
computer hardware can perform.
➢ Assembly (symbol) language- is a low level programming
language in which a mnemonic is used to represent each of the
machine language instruction for a specific computer.
22
• Example:
Machine language Assembly language
100101 ADD
001101 SUB
011001 MPY
100111 CMP
100011 JMP
23
➢High level language- is more understandable and
closer to standard notations than assembly language.
Example: C++ is high level language based on algebraic
notation.
Assembly language C++
LOAD x
A=x+y-z
ADD y
SUB z
STO A
24
Program Development
• Is a structure imposed on the development of a
software product.
• There are several models for such processes, each
describing approaches to a variety of tasks or
activities that takes place during the process.
25
Algorithm
• Algorithm: is a procedure for solving a problem in terms of
the actions to be executed and the order in which those actions
are to be executed.
• Is merely the sequence of steps taken to solve a problem.
• E.g: 1.input: number1, number2,…,numberN
2.Avg (number1+number2+…+numberN)/N
3. print Avg.
26
Algorithm
• Step 1: Input W, L
• Step 2: Area L x W
to calculate
• Step 3: C 2(L+W) area and
• Step 4: Print A,C circumference
Where: W = Width of a rectangle.
L = Length
A = Area
C = Circumference
8/28/2023 27
Pseudo Code
• Pseudo code: is an artificial and informal language
that helps programmers develop algorithms.
• It is nearer to the everyday spoken English language.
8/28/2023 28
Standards for Pseudo Code
• Three standards for good pseudo code:
✓Number each instruction.
✓Each instruction should be unambiguous
✓Completeness. Nothing is left out.
Example-1: Pseudo-code that calculates price of an item
1. Get price of item
2. Get sales tax
3. sales tax=price of items times sales tax rate
4. Final price=price of item plus sales tax
5. Display final price
6. halt
29
• Example-2: Pseudo-code that calculates average of
two numbers
1. Prompt for the first number
2. Get the number
3. Prompt for the second number
4. Get the number
5. Average=(first number + second
number)/2
6. Display average
• Example-3:
if student grade is greater than 60 print “pass”
else print “failed”
30
Flow charts
• Is a representation, primarily through the use
of symbols, of the sequence of activities in a
system(process, operation, function…..)
Terminal Flow lines
Input/output Decision
Process Connector
31
• Example: A flowchart that print a list of the
numbers from 4 to 9, next to each number; print
the square of the number. start
Num=4
X=Num2
Print
Num , X
Num =Num+1
No
Num>9
yes
stop
• Example-2 A flowchart that displays the sum of first
natural numbers b/n 4 and 50
start
X=4
Sum=0
Sum=Sum+x
X=X+1
X<=50?
Yes
No
Print
sum
End
33
Exercise
1. Write an algorithm , pseudo code and draw a
flowchart that will calculate the roots of a
quadratic equation Ax2+Bx+c that has a real
solution. Hint: d = sqrt (B2-4Ac ), and the roots
are: x1 = (–b + d)/2a and x2 = (–b – d)/2a
2. Draw a flowchart that calculates the factorial of N
(N is input).
8/28/2023 34