Chapter 1
Chapter 1
Introduction to computer
components
by milkisa T.
Computer definition
• Is an electronic device that accepts information, process it,
and produces out put
• Is not very intelligent device but, handles instructions
flawlessly and fast.
• Is accurate, suited for repetitive work
• Can store large amount of data and performs complex
calculations.
• Generally, these are the important activities of computer:
input
Processes
Out put
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
Main components of the system unit
• Mother board
• Power supply
• Drives
• Adapter cards
Mother board
• Is the base of the modern computer system
• Is the main ckt 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..
Power supply
100101 ADD
001101 SUB
011001 MPY
100111 CMP
100011 JMP
High level language- is more understandable and
closer to standard notations than assembly language
e.g C++ is high level language based on algebraic
notation.
Assembly language C++
LOAD x
A=x+y-z
ADD y
SUB z
STO A
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.
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.
Algorithm
• Step 1: Input W,L to calculate
• Step 2: A L x W
area and
• Step 3: C 2(L+W)
circumference
• Step 3: Print A,C
of A
rectangle.
05/21/2025
PSEUDO CODE
05/21/2025
• Three standards for good pseudo code:
Number each instruction.
Each instruction should be unambiguous
Completeness. Nothing is left out.
Example-1:
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
• Example-2:
if student grade is greater than 60 print “pass”
else print “failed”
• Example-3:
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
Flow charts
• Is a representation, primarily through the use of symbols, of the
sequence of activities in a system(process, operation, function…..)
Input/output Decision
Process Connector
• Example: 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
No Num , x
yes
Num =Num+1
Num>9
stop
• Example-2 displays the sum of first natural numbers b/n 4 and 50
start
X=4
Sum=0
Sum=Sum+x
X=x+1
yes no
X<=50
Print
sum
End
Exercise
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
05/21/2025