chapter 1 - introduction to computer
DESCRIPTION
computrrtTRANSCRIPT
2
TestTest #1 - 10% Test #2 - 10%
PBLPBL #1 - 10% PBL #2 - 10% PBL #3 - 10%
End Module Test30%
Attitude(KQ)10%
Assignment10%
Course Assessment
3
ChapterChap 1 - INTRODUCTION TO COMPUTER, COMPUTER
SYSTEM AND OPERATING SYSTEM
Chap 2 - THE COMPUTER NETWORKING AND INTERNET
Chap 3 - BASIC INTRODUCTION TO PROGRAMMING
LANGUAGES AND ALGORITHMS
Chap 4 - GETTING STARTED OF C LANGUAGE
Chap 5 - PREPROCESSOR DIRECTIVES
Chap 6 - INPUT AND OUTPUT FUNCTION
Chap 7 - FUNCTION
Chap 8 - ARRAY
Chap 9 - DECISION STRUCTURE
Chap 10 – REPETITION STRUCTURE
CHAPTER 1:
Introduction to Computer, Computer System
and Operating System
Outline
1.3 Computer Software
1.3.1 Operating System
1.4 Introduction to office
packages.
1.5 Introduction to computer
viruses.
1.1 Evolution of computers.
1.2 Computer Hardware
1.2.1 Motherboard
1.2.2 Microprocessor
1.2.3 Memory
1.2.4 Input Devices
1.2.5 Output Devices
The use of modern technology to aid the capture, storage, retrieval, analysis, and communication of
information (information management)
What Is Information Technologies
IT
Educ
Finance
GovHealth Care
Publishing
Travel
Manufact.
Comm.
How we did manage without them?
Computers are now an accepted part of everyday life
Household and mobile appliances
Powerful communication medium
Becoming embedded in our infrastructures
Etc.
Why Computers?
IT COMPUTERS
Computer Evolution
Man from centuries ago used a physical unit or sets of units to represent numbers or quantities.
A number or a quantity can be represented by a physical thing, using different mediums:
Pebbles
Vacuum Tube
Marks on paper
Transistors
Integrated Circuits
Computer History
• Difference between Engine & Analytical Engine– Charles Babbage: Inventor and mathematician– Proposed a machine that would solve the
equations better by calculating the differences between them
– 1830: full scale working version was built with British grant
– -ve: vulnerable to smallest imperfections
Computer History
– Proposed analytical engine which embodied the features of modern
computers (i.e. input, storage, processor, control unit, output)
– Known as the Father of Computer
Ada, Countess of Lovelace, also a mathematician
Knew Babbage’s theoretical approach was workable
Helped develop the instructions for doing computations on the analytical engine
Known as the world’s first computer programmer
Computer History
Herman Hollerith’s tabulating machine was used for 1890 United States census
Hand done tabulation in 1880 census which took more than 7 years only took 6 weeks for counting process with his machine
1896- founded the successful Tabulating Machine Co., which then known as IBM Corp. in 1924
Used electrical rather than Babbage’s mechanical power
Computer History
Late 1942 – Atanasoff-Berry Computer (ABC) was developed, marked as the first digital computer that worked electronically
1944 - Mark 1 was unveiled by IBM Corp, made by Howard Aiken
1946 - Based on ABC, Electronic Numeric Integrator and Calculator or ENIAC was invented, the first general-purpose computer
Computer History – the Start of Modern Era
The First Generation, 1951-1958: The Vacuum Tube
1951 – Universal Automatic Computer (UNIVAC 1) was delivered to US Bureau of the Census
Marked the first time a computer had been built for business applications rather than for military, scientific or engineering use
Using thousands of vacuum tubes – electronic tubes about the size of light bulbs – were used as the internal computer components
-ve: problems for temperature and climate control, frequent burnout, machine language for programming
1957-used magnetic tape for storing data
Computer History – Computer Age Begins
The Second Generation, 1959-1964: The Transistor
Bell Lab scientists developed a transistor – a small device that transfers electric signals across a resistor
Revolutionized electronics particularly computers
Smaller than the tubes with no warm-up time, less energy, more reliable
From machine to assembly language, then to high level language allowed programmers to focus on solving problems
Computers were used principally by business, university, and government organizations, not yet to the public
Honeywell 400 - the computer
Computer History – Computer Age Begins
The Third Generation, 1965-1970: The Integrated CircuitAn IC – a complete electronic circuit on a small chip of silicon (non
metallic substance)
A chip is much smaller in size - ⅛ inch square, can contain thousands of electronic components
An IC was able to replace an entire circuit board of transistors with one chip of silicon much smaller than a transistor
1965 – ICs began to replace transistors
Software became more sophisticated, using terminals to access the computer
Computer History – Computer Age Begins
The Fourth Generation, 1971 – Today: The Microprocessor
First microprocessor
Invention of Intel’s 4004 microprocessor on which numerous ICs could be built
General-purpose processor-on-a-chip
Extension of third generation technology
Vast implementation – digital watches, pocket calculators
Computer History – Computer Age Begins
Computer History – Computer Age Begins
• Initiated by Japan’s MITI in 1970s
• To perform much calculation utilizing massive parallelism
• 1981 – IBM PC; first personal computers introduced
• 1983 – Apple Lisa computer; first home computer with a GUI
• 1984 – Apple Macintosh computer
The PIM/m-1 machine
The Fifth Generation, Today- Future: Artificial Intelligence
Basic Components of a Computer System
An electronic device that can accept data (input), process the input to useful information (process) according to a set of instructions, store the instructions and the results of processing (storage), and produce the information (output).
Input OutputProcess StorageData Info
Input Device
Secondary Storage Device
System Unit
Output Device
Identifying Computer Components
- General term for devices that send computers information from the outside world and that return the results of computations
- These results can either be viewed directly by a user, or they can be sent to another machine, whose control has been assigned to that machine
- Input devices: hardware components that allow data and instructions to be entered into a computer
- Output devices: hardware components that convey information to people
- Example: data entered on the keyboard and temporarily stored in the computer’s memory and displayed on the monitor
I/O Devices
- Contains the electronic circuits that cause the processing of data to occur.
- Electronic circuits are connected to a circuit board - Motherboard.
System Unit
MotherboardProcessor Memory
Interprets and carries out basic
instructions that operate the computer
Store instructions waiting to be executed and data needed by
those instructions
23
- Also known as auxiliary storage devices
- Stores instructions and data when they are not being used by the system unit
- E.g. micro disk, floppy disk and hard disk drive
Secondary Storage Device
Data
Information
Input Device
System Unit
Output Device
Secondary Storage Device
How a Computer System Works
- A computer is useless without the presence of software.
- Software controls the computer hardware : Operating System
- Software also provides application services to user : application software
How a Computer System Works – cont’d
COMPUTERHARDWARE
Motherboard
Backbone of the computer
Circuit board that connects all parts of computer together – CPU, memory, hard drive, optical drive, video/graphic card, sound card, and other expansion cards and ports
Popular manufacturer: Asus, Intel, ABIT, AOpen, Biostar, MSI, Gigabyte.
Motherboard
CPU Socket Parallel & serial port
Memory Socket
Storage device connectors
AGP Slot
Battery
BIOS
ISA Slots
PCI Slots
USB Port
PS/2 Port
Power Connector
Motherboard
Inside Computers
Central Processing Unit (CPU)
- It is the ‘ brains’ of the computer - microprocessor chip.
- CPU is inserted directly into a CPU socket on a motherboard.
- Highly complex, extensive set of electronic circuitry that interprets and carries out the basic instructions that operate the computer – most calculation takes place.
- CPU perform three main tasks :-
• Perform arithmetic operations
• Perform logic operations
• Retrieval and storage of data
Central Processing Unit (CPU) – cont’d
33
2. Arithmetic Logic Unit (ALU)- arithmetic operations e.g. +, -, x, /- logic operations (comparison) e.g. >,
>=, ==,
<, <=
- CPU consists of two main units :-
1. Control Unit - fetches instructions from
memory- decode/translate instructions- executes the processing tasks - stores result in memory
Central Processing Unit (CPU) – cont’d
Central Processing Unit (CPU) – cont’d
Data
Information
Input Device Memory
Output Device
Secondary Storage Device
How computer works??
Processor
Data Instructions
Data Instructions
- CU fetches instructions from memory - CU decodes/translates instructions into sequence of tasks, Directs necessary data to ALU
- ALU executes arithmetic/logic instruction- Given control and performs the actual operation on the data- ALU stores results into memory or register
What happens in CPU in one machine cycle?
Central Processing Unit (CPU) – How it works?
Machine cycle in a processor
Direct & Coordinate
Calculation
Central Processing Unit (CPU) – Machine Cycle
Register: small, high speed storage locations resides in the processor.Functions:
store location where the instruction was fetched store instruction while CU decodes it store the result of calculation.
38
Central Processing Unit (CPU) – How it works?
F D E S F D E S F D E S
Machine Cycle
Without Pipelining With Pipelining
Instruction 1 Instruction 2
I4
I1
I2
I3
39
- System clock : circuit that control the timing of all computer operations
- Clock speed : rate of an electronic pulse used to synchronize processing – number of clock cycle per second
- Measured in megahertz (MHz) where 1 MHz = 1 million cycles per second
- A 3.8 GHz machine. It's clock rate is 3.8 billion cycles per second.
- Bigger number = faster processing
Measuring CPU Speed
Dual Core Processor
Allows optimal use of multiprocessing
Uses slightly less power
• A type of processor that combines two independent processors into a single IC
Memory
Electronic components that store instructions waiting to be executed by the processor, data needed by those instructions and store information (processed data).
Stores : i. OS & other system softwareii. Application programsiii. Data being processed by the application programsStorage unit : Byte
Memory size: KB, MB, GB, TB
- non-volatile: data permanently stored in and cannot be changed
Random Access Memory (RAM)
Read Only Memory(ROM)
- volatile: it loses contents when power is removed from the computer.
Memory – Types
Random Access Memory (RAM)
Also known as main memory, primary storage
The working area used for displaying and manipulating data
Volatile - RAM is typically erased when a computer is shut down
How program instruction transfer in & out of RAM? Eg: Turning on the computer – processes involved….
What is it meant by saving? Copy data, instruction and info. from RAM to storage device.
DRAM
SRAM
SDRAM
DDR SDRAM
RDRAM
Types of RAM
How RAM Works (Dynamic RAM)A memory chip is an integrated circuit made of millions of transistors
and capacitors.
In most common form of computer memory (dynamic RAM), a transistor and a capacitor are paired to create a memory cell, which represents a single bit of data.
The capacitor holds the bit of information; a 1 or 0.
The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.
To store a 1 in the memory cell, the capacitor is filled with electrons, else it is emptied.
To avoid data lost, capacitors holding a 1 need to be recharged thousands of timed per second (dynamically refreshed)
Various RAM Modules
DIP 16-pin
SIPP
SIMM 30-pin
SIMM 72-pin
SDRAM DIMM
DDR DIMM
RAM chips reside on memory module. Memory slots on motherboard hold memory modules.
RIMM
ROM
Memory chips that store permanent data and instruction
Read-only : data cannot be modified
Non-volatile: contents remained when the power off
All ROMs allow data to be written into them at least once, either during initial manufacturing or during a step called "programming“
Some ROMs can be erased and re-programmed multiple times
E.g. PROM (programmable ROM), EEPROM (electrically erasable programmable ROM)
ROM stores BIOS (Basic Input/Output System) which contains the computer start up instructions – successfully start operating
Flash Memory
Non-volatile memory that can be erased electronically and rewritten – similar to EEPROM
Hold start up instructions for computers
BIOS chip
Store data and programs on mobile computers and devices: PDA, smart phones, printers, digital camera, audio players, pagers.
(a) Flash memory cards – SmartMedia, CompactFlash, Memory Stick.
(b) Flash memory drive
CMOS
CMOS(complementary metal-oxide semiconductor)
Used in today’s memory chips.
Provides high speeds and consumes little power.
Flash memory chips that store computer startup instructions use CMOS technology.
COMPUTERSOFTWARE
What is Software?
Series of instructions that tells computer what and how to do the operation.
Onion-skin diagram
What is Software?- cont
Programs that control or maintain the operations of the computer and its devices
Programs designed to assist users with their personal tasks to be more productive
System Software
Utility Program
Operating System
A set of programs that control and supervise a computer system’s hardware and application programs
System software that allows users to perform maintenance-type tasks
Operating System
WHY OS?
•To manage the hardware for efficient utilization of computer resources & supports application
•To provide interface between a user/an application program with the hardware
54
Conceptual Diagram of an OS
Operating System - cont
Operating System – Main Functions
OS
Control Programs
ServicePrograms
Resource allocation Allocate processor time, primary storage, input and output devices
Job management To monitor, schedule and control programs for its efficient processing – network, security, etc.
Data management Managing access to data for input of information to printers, disks/displays
Supervisor program: known as kernel
- controls all the operating system programs and also application programs as well as all hardware components.
OS (Control programs) Functions
57
OS TasksComputer
Startup
User Interface
Manage Programs
Manage Memory
Access to I/O devices
Scheduling jobs
Monitoring performance
Network&Security
Manage files
Utilities
OS
58
1. When computer is turned on, the first program to be executed is a set of instruction kept in ROM known as BIOS.
2. BIOS executes a series of tests to ensure the computer hardware is connected and operating properly. It generates an error message (by messages or beeps) if any components are found faulty.
3. Once the POST has successfully completed, the BIOS will begin to activate the computer's disk drives- finds the first piece of the operating system: the bootstrap loader - load the supervisor program into the computer’s memory – booting
4. Once the supervisor control program in memory, the system displays the prompt sign (C:\>), indicating that it is ready to work
During Computer Start-up
59
Categories of OS
Operating System
Stand-AloneNetwork
Embedded
• DOS• Early Windows versions (Win 3.x, 95, NT, 98, 2000
pro., ME)• Windows XP• Windows Vista• Mac OS X• UNIX• Linux
• Early Windows Server versions (Win NT Server, Win 2000 Server)
• Windows Server 2003• UNIX• Linux
• Windows CE• Windows Mobile• Palm OS• Embedded Linux• Symbian OS
Utility Programs
System software that allows user to perform maintenance-
type tasks.
File Manager
ImageViewer
Personal Firewall
Uninstaller
Disk Scanner
Disk Defragmenter
DiagnosticUtility
Backup Utility Screen Saver
Application Software
Business
Graphics and
Multimedia
Home/Personal/
Educational
Communications
Word ProcessingSpreadsheet
DatabasePresentation
GraphicsProject Management
AccountingEtc.
Computer Aided Design (CAD)
Editing (image, sound, video, photo)
Multimedia AuthoringEtc.
Editing (image, sound, video, photo)
Multimedia AuthoringEducational
Entertainmentetc
E-mailFTP
Web BrowserNewsgroupChat room
IMBlogging
Microsoft Disk Operating System (MS-DOS)
DOS is the supervisor program of the computer
It does all the followings
• Interface to peripherals – How to interpret input, how to process data, and how to produce output
• Application launcher – Most programming software, games etc. use DOS prompt to run application
• Utility provider – Manage disks and files, prepare disks for storage, copy files to a disk, to move or rename files, and to delete files
MS-DOS – cont’d Using DOS prompt to get command from user Examples for DOS operation
DOS version/prompt type
Modify date/time
File and directory contents
Clearing a DOS screen
Going to subdirectory and back to root directory
Searching for specific files
Copy files from A drive / C drive
MS-DOS – Screenshot
INPUT OUTPUT DEVICES
Input Devices
What is input?
What are input devices?
INPUT
Input Devices
Text Input Devices
Pointing Devices
Audio Input Devices
Image, Video Input Devices
Keyboard
Computer mouse
Trackball (or rollerball)
Joystick & Wheel
Touch screen
Trackpoint (or Pointing stick)
Touchpad Light pen Stylus,
digital pen
Optical scanner
Digital camera
Digital camcorder
Webcam
Microphone (speech recognition)
Digital audio recorder
Electronic piano keyboard
Readers
OCR OMR Barcode reader Magstripe
Biometric Devices
Finger print scanner Face recognition Hand geometry Signature verification Iris recognition Smart card reader
68
Output Devices
What is output?
OUTPUTCATEGORIES
Text
Graphics
AudioVideo
69
Monitors
SpeakersHeadphonesEarphones
PrintersPlotters
Output Devices – cont’d
Fax MachineFax Modem
Data projectors
OUTPUT
As with television, several different hardware technologies exist for displaying computer-generated output:
• Cathode ray tube (CRT) • Liquid crystal display (LCD). (LCD-based monitors can
receive television and computer protocols (SVGA, PAL, SÉCAM; NTSC))
• Plasma display • Surface-conduction electron-emitter display (SED) • Video projector • Organic light-emitting diode (OLED) display.
Display Devices
71
Pixels and ResolutionsPixels - Refers to dots or picture elements on the screen
Resolution – number of pixels horizontally and vertically
A range of resolutions from 320 by 200 pixels (320×200) up to 2048 by 1536 pixels (2048×1536) or 2304 by 1440 pixels (2304×1440), with unlimited colours and a variety of refresh rates
Higher resolution uses greater number of pixels – smoother, sharper & clearer image
The sharpness of a display is indicated by its dot pitch.
Dot pitch: distance in mm between pixels on a display device.
- the lower the dot pitch (e.g. 0.24), the sharper the image
CRT MonitorThe cathode ray tube or CRT is the display
device that was traditionally used in most computer displays, video monitors, televisions, radar displays and oscilloscopes.
Was used in all television sets until the late 20th century and the advent of plasma screens, LCD TVs, DLP, OLED displays, and other technologies.
As a result of CRT technology, television continues to be referred to as "The Tube" well into the 21st century, even when referring to non-CRT sets
CRT Monitor – cont’d
LCD MonitorA liquid crystal display (LCD) is a thin, flat display device made up of
any number of color or monochrome pixels arrayed in front of a light source or reflector
Uses very small amounts of electric power, and is therefore suitable for use in battery-powered electronic devices
In color LCDs, each individual pixel is divided into three cells, or subpixels, which are colored red, green, and blue, respectively, by additional filters.
Each subpixel can be controlled independently to yield thousands or millions of possible colors for each pixel
- Use a physical contact with the paper to produce an image
- e.g. dot matrix printer and line printer
Printer
Printer
Impact Non Impact
-Place images on a paper without physically touching it (striking)
-e.g. thermal, inkjet, laser printer, plotters, photo printers, large-format printers
76
WHY?
Main memory stores data temporarily
Main memory space is limited
Secondary Storage
Storage Device vs Storage Media
There are three main classes for magnetic disk:-
- floppy disk (or flexible disk) – a 5.25” diskette which can store information from 360 KB (DD) to 1.2 MB (HD)
- microdisk - a 3.5”diskette which can store from 720 (DD) KB to 1.44 MB (HD)
- harddisk has a bigger capacity to store data, up to GBs, consists of layers of disks, one on the other within a sealed enclosure
Magnetic Disk
78
A hard disk internal view.
Magnetic Disk
Iomega provides removable disk storage in its range of Products e.g. Zip and Jazz
Magnetic Disk
-stores large volume of data as backup, typically in a mainframe environment
-many forms of magnetic tape, e.g. tape reel and data cartridge tape
-the storing and retrieving of data is using magnetize (1) to store and demagnetize (0) to retrieve data
Magnetic Tape
81
- Used to store digital data, originally developed for
storing digital audio.
- CD: A standard playback format for commercial audio recordings today
- provides direct access storage at a lower cost than magnetic disk
- including optical laser disks, optical cards and optical tape
Optical disk
82
- DVD: optical disc storage media format that can be used for data storage, including movies with high video and sound quality
- DVDs resemble compact discs as their physical dimensions are the same but are encoded in a different format and at a much higher density.
- Dual Layer recording allows DVD-R and DVD+R discs to store significantly more data, up to 8.5 Gigabytes per disc, compared with 4.7 Gigabytes for single-layer discs.
Optical disk – cont’d
Optical disk – cont’d
CD-R DVD-R
DVD-RWCD-RW
CD-ROM
DVD-ROM
Latest Storage Media/Device
USB Flash Drives
Smart Card
Compact Flash
SmartMedia
Secure Digital
xD Picure Card
Memory Stick
Flash Memory Cards
INTRODUCTION TO OFFICE PACKAGE
Microsoft Office Package
MICROSOFT WORD
MICROSOFT EXCELL
MICROSOFT POWERPOINT
Microsoft WordUsed to create a variety of documents such as letters, memos, resumes, forms or any document that can be typed and printed.
Comes with a variety of word processing features, including an in-built dictionary in various languages, document formatting options (indenting, double spacing, footnoting, headers and footers,etc.).
Documents created in the program can be saved in several formats, accessed and printed.
Microsoft Word
Microsoft Excel is a spreadsheet software used for storing, organizing and manipulating data.
Data can be entered into spreadsheet rows and columns, or "cells," which can be formatted in various fonts or colors; the data in the spreadsheet can then be converted into graphs for analysis.
Microsoft Excel also includes formulas and functions, used to calculate variables in the data.
Microsoft Excel
Some functions are complex, whereas others are used for simple calculation (adding, subtracting, multiplying or dividing) of several cell values.
Microsoft Excel is also used in finance to automatically calculate variables such as profit, loss or expenditure.
Microsoft Excel..cont
Microsoft PowerPoint is used to create multimedia presentations and slide shows.
Like Microsoft Word, it also includes tools to format text and incorporates design features used in Microsoft Publisher (e.g., built-in design templates, multimedia libraries).
Presentations can be created on Microsoft PowerPoint using slide transitions to make presentations more interesting, sound clips, images, animations or video clips.
Microsoft PowerPoint
COMPUTER VIRUSES
What Is..
Data security:
The means of ensuring that data is kept safe from corruption and that access to it is suitably controlled.
Thus data security helps to ensure privacy and helps in protecting personal data.
Causes of Data Loss
94
Internet & Network Attacks
Malware is software designed to infiltrate or damage a computer system without the owner's informed consent. It is a shortened combination of the words malicious and software.
Computer virus, worm, Trojan horse, spyware, adware, rootkit.
MyDoom, Blaster, Melissa, Y2K, etc.
• open infected files• run infected programs• boot pc with infected storage media
attached• connect unprotected pc to a network
self-replicating computer program that spreads by inserting copies of itself into other executable code or documents.
A computer virus behaves in a way similar to a biological virus, which spreads by inserting itself into living cells.
Extending the analogy, the insertion of a virus into the program is termed as an "infection", and the infected file, or executable code that is not part of a file, is called a "host".
Viruses are one of the several types of malicious software or malware.
Computer Virus
The characteristics of a computer virus :
1. A set of instructions - a program being made to disrupt or interfere other programs
2. Deliberately created - purposely created or by itself3. Actively propagates - reproducing itself4. Infects other programs - contaminate or polluting different types
of programs5. Able to do harm - can cause damage to others6. Able to evolve - developing, growing and changing in
programs or systems
Computer Virus
97
Damages to a computer system 1. Creates garbage in the computer system that takes up space in the hard disk and into the diskettes
2. Messing up files in their normal standard and altering some of the files
3. Messing up the FAT (File Allocation Table) which contains information of where are the other data's stored on your disk
4. Messing up the boot sector that can restrict your computer from being able to execute at all
Computer Virus - cont
98
Types of anti-virus software The Computer Virus Industry Association (CVIA) in the USA has
developed three basic categories of anti-virus software.
To prevent initial infection
To detectinfection
To identify and remove viruses
Antivirus Program
99
The Ultimate Safeguard- Backing Up
a duplicate of file, program or disk that can be used if the original is lost, damaged or destroyed.
Storage Media
To prevent against data loss caused by system failure or hardware, software, human and environment.
100
Uninterruptible Power Supply (UPS)
- A device that contains 1 or more batteries that can provide power during power loss.
- Connects between the computer and a power source.
- when power is interrupted, this result the UPS to function as a backup supply of power to the computer system
- depends on the type of UPS, it will operate in 20 minutes or more
- it is advisable to backup important data within the time limit to prevent any lost of data
Components of UPS
- one rectifier (charger) to convert AC to DC and to fully charge the battery
- one battery to supply DC power to the inverter and the supported time are based on the number and size of batteries
- one inverter to convert DC to AC
- one static bypass switch to control the load from/to the power source to/from the battery and allows certain load to transfer tolerances needed by the computer and its peripherals
Uninterruptible Power Supply (UPS)
102
END