Upload
rajahazmi-bin-rajaaznoor
View
221
Download
0
Embed Size (px)
Citation preview
7/31/2019 C1-F.O.P.1
1/18
pg. 1
Chapter 1
Introduction to computers
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.
Processinput output
data information
7/31/2019 C1-F.O.P.1
2/18
pg. 2
What is a computer?
Device consisting of: electronic components (hardware)
receives controlled instructions (software)
stored within its memory.
Components of a Computer System
7/31/2019 C1-F.O.P.1
3/18
pg. 3
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
7/31/2019 C1-F.O.P.1
4/18
pg. 4
Categories of computers
Supercomputers
Source: Google Images
Data representation
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
7/31/2019 C1-F.O.P.1
5/18
pg. 5
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
7/31/2019 C1-F.O.P.1
6/18
pg. 6
What happens?
ASCII to Binary conversion
01101010
jj
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
7/31/2019 C1-F.O.P.1
7/18
pg. 7
Sample input
Sample output
7/31/2019 C1-F.O.P.1
8/18
pg. 8
System Unit
Source: Google Images
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
7/31/2019 C1-F.O.P.1
9/18
pg. 9
Computer Hardware
Central Processing Unit (CPU)
2 roles of CPU coordinating all computer operations (control
unit), and
performing arithmetic and logical operations 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.
Processor
Two parts:
control unit: directs and coordinate most
operations in the computer
arithmetic logic unit (ALU): performs arithmetic
and comparison.
7/31/2019 C1-F.O.P.1
10/18
pg. 10
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
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
7/31/2019 C1-F.O.P.1
11/18
pg. 11
Computer Hardware
Memory
Computer memory can be divided into twocategories
main memory secondary memory
There are 2 types of mainmemory
RAM temporary storageand volatile (contents isgone when the computer isswitch off)
ROM
stores informationpermanently and NOTvolatile
Provides semi-permanentdata storage capability
Memory
Transfer of data from storage to memory
7/31/2019 C1-F.O.P.1
12/18
pg. 12
Memory
Each bytes resides temporarily in memory hasan 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 storagelocations or memorycells, each of which has aunique memory address
Memory cell anindividual storagelocation in memory
Assigning a new data toa memory cell willdestroy its previouscontent
1 byte == 8 bits
7/31/2019 C1-F.O.P.1
13/18
pg. 13
Storage
Stores data, instructions and information to beused 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.
Storage
Source: Google Images
7/31/2019 C1-F.O.P.1
14/18
pg. 14
Computer Software
Instruction that instructs the computer whatto do and how to execute
There are Three (3) categories of computer
software
System Software
Application Software
Computer Languages
Software
System software - control and maintain the
operations of the computer and its devices.
Divided into 2:
operating system
utility programs
Source: Google Images
7/31/2019 C1-F.O.P.1
15/18
pg. 15
Computer Software
Operating System
System Software = Operating System (OS)
softwarethat controls interaction of user and computerhardware and that manages allocation of computerresources. 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 ofother resources for various tasks
Accessing data from secondary storage
Writing data to secondary storage
Booting a computer loading the OS from disk intomemory
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.
7/31/2019 C1-F.O.P.1
16/18
pg. 16
Computer Software
Computer Languages
Three (3) types of computer languagesMachine language
Binary number codes (0 and 1) understood by a specific CPU
Assembly language
Mnemonic codes that correspond to machine languageinstructions
High-level language
Machine-independent programming language that combinesalgebraic expressions and English symbols
Compiler is used to translate a high-level
language program into machine language
Computer Software
Machine Language vs. Assembly
LanguageMemory Addresses Machine LanguageInstructions
Assembly LanguageInstructions
00000000 00000000 CLA
00000001 00010101 ADD A
00000010 00010110 ADD B
00000011 00110101 STA A
00000100 01110111 HLT
7/31/2019 C1-F.O.P.1
17/18
pg. 17
Computer Software
High-Level LanguagesLanguage 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
7/31/2019 C1-F.O.P.1
18/18
pg. 18
Writing programs
What happens when you write a program?
Entering, Translating and Running a
High-Level Programming Language