Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

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.
input Process output

data

information

pg. 1

What is a computer?
Device consisting of:
electronic components (hardware) receives controlled instructions (software) stored within its memory.

Components of a Computer System

pg. 2

Categories of computers
Category Personal computers (desktops) Mobile computers / devices Embedded computers Servers Mainframes Supercomputers Size Be placed on a table
Portable and fits by hand-carrying Small and embedded into devices Small cupboard Half a room to a room full A room full of equipments

Categories of computers

Embedded computers Mainframes Source: Google Images

pg. 3

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

pg. 4

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 A B 1 2 # & ASCII 0100 0001 0100 0010 0011 0001 0011 0010 0010 0011 0010 0110 EBCDIC 1100 0001 1100 0010 1111 0001 1111 0010 0111 1011 0101 0000

pg. 5

What happens?

j
ASCII to Binary conversion 01101010

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

pg. 6

Sample input

Sample output

pg. 7

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

pg. 8

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.

pg. 9

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

pg. 10

Computer Hardware Memory


Computer memory can be divided into two categories
main 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 secondary memory Provides semi-permanent data storage capability

Memory
Transfer of data from storage to memory

pg. 11

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

pg. 12

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.

Storage

Source: Google Images

pg. 13

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

Software
System software - control and maintain the operations of the computer and its devices. Divided into 2:
operating system utility programs

Source: Google Images

pg. 14

Computer Software Operating System


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

Booting a computer loading the OS from disk into memory

Managing allocation of memory, of processor time and of other resources for various tasks Accessing data from secondary storage Writing data to secondary storage

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.

pg. 15

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 Machine Language vs. Assembly Memory Addresses Machine Language Language Assembly Language
Instructions Instructions

00000000 00000001 00000010 00000011 00000100

00000000 00010101 00010110 00110101 01110111

CLA ADD A ADD B STA A HLT

pg. 16

Language FORTRAN COBOL

Computer Software High-Level Languages


Application Area Scientific Programming Business Data Processing

LISP
C Prolog Ada Smalltalk C++ Java

Artificial Intelligence
Systems programming Artificial Intelligence Real-time distributed systems Graphical user interface; Object oriented (OO) programming Supports OO programming 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

pg. 17

Writing programs
What happens when you write a program?

Entering, Translating and Running a High-Level Programming Language

pg. 18

You might also like