Sei sulla pagina 1di 46

Chapter 1

Introduction to computers

Outline
What Is Computer?
Computers Component
Categories of computer
Data storage in computer
Computer Hardware
Computer Storage
Computer Software
Writing Programs
By the end of this chapter, you will be able to
understand:
What is a Computer?
Computer is an electronic machine that can
receive, store or process data according to a
set of instructions (computer program) and
output information.
Process input output
data
information
Categories of computers
Category Size
Personal computers
(desktops)
Be placed on a table
Mobile computers /
devices
Portable and fits by hand-carrying
Embedded computers Small and embedded into devices
Servers Small cupboard
Mainframes Half a room to a room full
Supercomputers A room full of equipments
Categories of computers

Mainframes
Source: Google Images
Embedded computers
Categories of computers

Supercomputers
Source: Google Images
Data representation in Computer
Digital form
Two states: on and off
Digit 0 = off
Digit 1 = on
Digit 0 and 1 is known as bits (short for binary
digit).
8 bits = a byte
Binary coding scheme
Represents 256 different individual characters
Two most popular coding schemes:
American Standard Code for Information
Interchange (ASCII)
Extended Binary Coded Decimal Interchange Code
(EBCDIC)
Binary coding scheme
Symbol ASCII EBCDIC
A 0100 0001 1100 0001
B 0100 0010 1100 0010
1 0011 0001 1111 0001
2 0011 0010 1111 0010
# 0010 0011 0111 1011
& 0010 0110 0101 0000
What happens?
ASCII to Binary conversion
01101010
j
j
What is a computer?
Device consisting of:
electronic components (hardware)
receives controlled instructions (software)
stored within its memory.
Computer Hardware
input devices
output devices
system unit
storage devices
communication devices
Computer Hardware
Components of a Computer System

Computer Hardware
Input / Output Devices
Input is data or instructions that user or other
sources gives command to the computer on
how they should operate
Output is the useful outcome after the
computer has completed its operation
Computer Hardware
Sample Input Devices

Computer Hardware
Sample of Output Devices

Computer Hardware
System Unit
Contains all the electrical components that
the computer uses to process data.
Processor (central processing unit, CPU)
interprets and manages most of the
computers operation.
Source: Google Images
Computer Hardware
Central Processing Unit (CPU)
2 roles of CPU
Direct and coordinate all computer operations
(control unit), and
perform arithmetic and logical
operations(comparison) on data (arithmetic and
logic unit).
During the process, current instruction and
data are stored temporarily inside the CPUs
special high-speed memory locations called
registers.
Computer Hardware
Sample of System Unit

Source: Google Images
Computer Hardware
Memory
A temporary storage unit
3 things it stores:
Operating system and other system software of
the computer and its devices
Application programs with tasks
Data being processed by programs and its results.

Source: Google Images
Computer Hardware
Memory
2 kinds of memory - volatile (temporary) and
nonvolatile (permanent)
Volatile memory loses its contents when
power is turned off
Non-volatile memory does not lose its content
Computer Hardware
Memory
Computer memory can be divided into two
categories


main memory secondary memory
There are 2 types of main
memory
RAM temporary storage
and volatile (contents is
gone when the computer is
switch off)
ROM stores information
permanently and NOT
volatile
Provides semi-permanent
data storage capability


-thumbdrive/flash drive
Computer Hardware
Memory
Transfer of data from storage to memory
Computer Hardware
Memory
Each bytes resides temporarily in memory has
an address. This address is a unique number
that identifies the location of the memory.
Source: Google Images
Computer Hardware
Memory
Memory an ordered
sequence of storage
locations or memory
cells, each of which has a
unique memory address
Memory cell an
individual storage
location in memory
Assigning a new data to
a memory cell will
destroy its previous
content
1 byte == 8 bits
Computer Storage
Stores data, instructions and information to be
used in the future
Eg. music, movies, assignment, pictures
Save data, instructions or information from
memory to storage medium, that process is
known as writing.
To recall data from a medium to memory, it is
known as reading.

Computer Storage
Sample Storage Devices

Source: Google Images
Computer Software
Instruction that instructs the computer what
to do and how to execute
There are Three (3) categories of computer
software
System Software
Application Software
Computer Languages
Computer Software
System Software
System software - control and maintain the
operations of the computer and its devices.
Divided into 2:
operating system
utility programs

Source: Google Images
Computer Software
System Software
Operating System (OS) software that controls
interaction of user and computer hardware and that
manages allocation of computer resources. i. e.
Communicating with the computer user
Collecting input from input devices.
Conveying program output to output devices
Managing allocation of memory, of processor time and of
other resources for various tasks
Accessing data from secondary storage
Writing data to secondary storage
Booting a computer loading the OS from disk into
memory
Computer Software
Utility Program

Computer Software
Application Software
Application software used for a specific task
such as word processing, accounting, or
database management.
i.e
Microsoft Word
Microsoft Excel
Microsoft Access
Web browser, Opera, Mozilla etc.
Computer Software
Computer Languages
Three (3) types of computer languages
Machine language
Binary number codes (0 and 1) understood by a specific CPU
Assembly language
Mnemonic codes that correspond to machine language
instructions
High-level language
Machine-independent programming language that combines
algebraic expressions and English symbols
Compiler is used to translate a high-level
language program into machine language
Computer Software
Computer Languages

Memory Addresses Machine Language
Instructions
Assembly Language
Instructions
00000000 00000000 CLA
00000001 00010101 ADD A
00000010 00010110

ADD B
00000011 00110101

STA A
00000100 01110111

HLT
Computer Software
High-Level Languages

Language Application Area
FORTRAN Scientific Programming
COBOL Business Data Processing
LISP Artificial Intelligence
C Systems programming
Prolog Artificial Intelligence
Ada Real-time distributed systems
Smalltalk Graphical user interface; Object oriented
(OO) programming
C++ Supports OO programming
Java OO & Support web programming
Writing programs
Programmers - write programs to instruct the
computer what to do
Various languages C++, Visual Basic, Java, C#,
Phyton, PHP, HTML, Pascal
Will be using Dev-Pascal in lab to code Pascal
language
Writing programs
What happens when you write a program?
Entering, Translating and Running a
High-Level Programming Language

Dev-Pascal

Example:
1.Write program(source file)..
2.Save file..
3.Compile.
4.If there is error then fix your program
5.Fix the error, save file and compile again
Successfully
compile
Fixed
6. If the compilation succeed ,then time
to execute program
7. Test the executable file by entering input
**Otherwise mentioned, source of images in this presentation are from
Microsoft Clip Art

Potrebbero piacerti anche