This page provides a lot of ICT lesons and resources.
Competency Levels Suggested Learning Process Learning Outcomes Comments Time Duration M1: Introduction to Computers 1.0 What is a computer ? • Teacher initiates a friendly discussion regarding the Computer • Teacher asks about computers 1) What is a computer? 2) Where do we use computer? 3) Why do we use computer? Pupils answer 1) Computer is an electronic machine 2) In the bank, School, Office, etc To type a document, to send e mail, search internet, listen music, etc • Teacher introduces different parts of a computer and gives a brief description on each part. Ex: Monitor/VDU, System unit, Keyboard, mouse, etc Activity 01 • Teacher provides one name tag to each group. • Teacher asks them to show the particular object relevant to the given name tag by teacher. • Teacher explains the shutdown procedure Ex: Click on Button Go to Click • Teacher gives them to do it practically. While they are doing the practical teacher moniters the class and help the student those who dificult to do this. Teacher describes and demomstrates 1) How to switch on the computer 2) Booting procedure. • Teacher gives them a chance to do it practically. Assesmet Teacher gives following activity to each student. Activity Put them in to correct order – switch on a) Switch on the UPS b) Switch on the monitor c) Switch on the CPU d) Switch on the power supply Put them in to correct order – Switch off a) Click on turn off your computer b) Go to “shoutdown’ c) Click on “start” button • Teacher uses the peer correction methord to correct their activities. 1) Defines what is computer 2) Names the parts of a computer 3) Uses correct techniques of switch on and off the computer 4) Values the uses of a computer 40 min 1.1 Basic parts of a computer Teacher gets the pupils to sit-down separately as groups. Teacher provides picture cards (picture of a computer) to each group. Teacher gets each group to discuss and names 5 parts of following picture. Teacher pastes picture of a computer on the white board. Teacher asks pupil’s to “will you look at the white board” Teacher describes the parts of the computer with the help of this picture. Teacher asks to show picture cards which teacher distributed. Teacher gives following activity cards to each group. Complete the computer puzzle, using the clues given below. a) K B b) M c) N R d) P T e) S W f) H R Clues – a) An input device b) The device where information is stored c) A TV like screen d) Another output device e) Programs in a computer f) Parts of a computer that can be touched or felt While they are doing the activity teacher goes round the class and monitors the groups. Teacher introduces different parts of a computer and gives a brief description on each part. Ex: Monitor/VDU, System unit, Keyboard, mouse, etc Teacher gets each group to name one part of a computer. Teacher writes their answers on the white board. Ex: Input device Output device Keyboard Mouse Monitor Printer Teacher explains input output devices. Teacher provides papers to each group Teacher gets pupil’s to draws a picture of computer and name it. Teacher asks each group to present their drawings. Teacher does the correction with the help of pupils. (teacher lets pupil’s to do their correction by exchanging drawing them among them selves) Assesment Teacher gives following activity cards to each student. Match the following a)Key board Output device b)Memory Input device c)Monitor Like brain d)Control units Programs in a computer c) Software Like traffic police Teacher does the correction by exchanging activity cards themselves. Teacher briefly explain’s whole lesson oneceagain. 1) Names the parts of a computer. 2) Illustrates a computer system. 3) Lists what are the computer Input, output, & storage. 4) Explains the terms “Hardware” & “Software” 40 min 1.2 Why we use computers ? Teacher gets the pupil’s to form their own groups. Teacher provides papers to each group. Teacher gets each groups to discuss and write five usage of a computer Teacher collects their papers. Teacher demonstrates the uses of a computer(with the help of picture) Teacher gives pupils to following activity card Fill in the blanks a) Computer can…………………………a picture. b) Computer can………………………..your friend’s name and address. c) Computer can………………………..music. d) Computer can………………………..a letter. e) Computer can………………………..spellings for you. Teacher does the peer correction. Assessment Teacher explains the whole lesson again. Teacher gives following activity cards. Say true or false a) Computer can design house. b) Computer can to calculate. c) Computer can be used to play chess. d) Computer can arrange the books in your basket. e) Computer can store your friend names addresses. f) Computer can eat your food. 1) Lists uses of a Computer 2) Finds places where the computers are used. 3) Discusses the value of using the computer. 40 min 1.3 Places where computers can be used • Teacher initiates a friendly discussion on where the computers are used. • Uses a presentation to enhance the knowledge of • Teacher asks them discuss other places where computers are used. • Teacher gets the students to write the places where the computers are used. • Discusses the value of using a computer in a place to do their work effectively and efficiently. • Writes the places where the computers are used. 40 min 1.4 Things we can do using computers • Gets the students to discuss the things that they can do using the computer. • Discusses the things that can do the things using the computer and the things that they can do manually as well. • Discusses the differences of work do by using the computer and the things done in manually. • Gets the students to write the things that they can do using the computer. • Inculcates the value of the computer in different fields. • Writes the things that they can do using the computer. 40min 1.5 Introduction to keywords (Data, Process, Information) • Puts the following words on the white board respectively, Data, Process, and Information. • Teacher elicits the given vocabulary items by taking instances from the student background. • Gets the students to use the vocabulary items in the field of computing. • Develops the vocabulary knowledge. • Uses the given vocabulary items meaningfully. 40min 1.6 Introduce mouse and Keyboard 1.6.1 Mouse – Mouse clicks 1.6.2 Keyboard – Delete/Backspace/Shift/Caps lock Keys • Teacher demonstrates the mouse and shows how it works. • Teacher asks students to come before the computer and asks to click the mouse on the desktop. • Gets the students response after this activity. • Teacher shows how to move the mouse. • Gets the students to move icons on the desktop. • Teacher opens the MS Paint application and asks them to draw any picture as they wish. • Teacher shows the arrangement of the keys in the keyboard and initiates a small discussion the function of the keyboard. • Teacher gets the use of a “Typing Tutor” program and lets the students to practice. • Develops the skills in using the mouse and keyboard. • Uses the keyboard and mouse in the proper manner. • Discusses the value of using the keyboard and mouse. 40min 1.7 Advantages of computer compared with human • Teacher discusses the activities done by the human beings. • Teacher initiates a discussion on the things done by the computer. • Teacher gets the students to discuss the advantages of computer compared with human. • Teacher asks them to write the facts have discussed in the class. • Develops the value of computer compared with human. • Writes the advantages of computer compared with human. 20min 1.8 Disadvantages of computer compared with human • Teacher discusses the bad influence of the computer usage in the society. • Teacher gets the students to discuss the modern trends and negative aspect of the computer usage. • Teacher gets the students to write the disadvantages of computer compared with human. • Writes the disadvantages of computer compared with human. • Discusses value of getting remedial measures to overcome the problems occurred due to the bad use of computer. 20min
Competency Levels |
Suggested Learning Process | Learning Outcomes | Comments | Time Duration | |
M3: Computer Hardware
|
1) Have you seen a computer? 2) If you look at the computer what did you see?
|
|
|||
3.1. Hardware Components 3.1.1 Parts of a computer
1) Processors 2) Memory 3) I/O interfaces |
Underline the correct answer. 1) Hardware refers to a) The outside of the CPU. b) Any parts of the CPU.
2) What is RAM?
2) Name five devices of a computer? Teacher draws a picture of a computer on the white board
Chose the correct answer a) An example of an input devise is the a)CPU b) Monitor c) Keyboard d) printer b) An example of an output device is the a) keyboard c) floppy drive c) Which of the following devices is used for both Input and output. a) printer b)floppy drive c)keyboard a) Mouse Teacher shows a picture of a computer and asks
Teacher asks pupils to draw a picture of a computer and name it. Lists down Input & Output devices |
|
|||
(floppy disks) |
|
||||
| 3.4 Computer Architecture 3.4.1 Number Systems 3.4.1.1 Introduction to Binary Number System
3.4.1.2 Conversion between decimal and binary (optional) |
Teacher recapitulates about the previous lesson.“What is binary number system?”Puts the following on the white board and ask them to solve.Converts decimal to binary – 45
Converts binary to decimal – 1011 v Tells rules for binary addition. v Shows how to do binary additions. v Tells rules for binary subtractions. v Shows how to do binary substarctions. Gives an activity ( take them to the white board) Binary addition 1) 1010 + 0011 2) 0011+0101 3) 1101+0111 Binary substarctions 2) 1100-0010 2) 1101-0011 3) 1110-0010 |
|
Introduction to Programming Languages
• First Generation of Computer Programs
• Sequence of machine instructions
• loaded into memory through a set of switches
• Second Generation Computer Programs
• introduction of assembly languages
• enables the programmers to use mnemonic names for the machine instructions and symbolic names for memory locations.
• A translator called the assembler converts assembly language programs into machine code
• Third Generation Languages :
• High level languages such as BASIC, Fortran, Pascal, and C eliminate the close ties to the CPU’s machine instructions
• provide standard data types such as integers, floating point numbers, and characters etc.,
• Instructions are user friendly
• Compilers are available to translate these high- level language instructions to machine instructions.
The accepted programming style :
• to organize related data items using programming constructs such as Pascal Records or C Structures
• then treat the resulting block of data as a single unit.
• After data structures are laid out, the application is written as a collection of procedures that manipulate these structures.
• With ever-increasing:
• hardware capabilities such as faster CPUs, Main Memory Space, Hard Disk space
• better graphics, and
• easier networking,
• Users have come to expect software to have greater functionality
• Window-based graphical user interface,
• transparent access to data stored in mini or mainframe computers,
• and the ability to work in a network environment etc
• Faced with this complexity,
• More programmers are starting to use Object Oriented Programming (OOP).
• OOP is a new way of organising code and data
• OOP promises increased control over the complexity of the software development process.
• The underlying concepts of OOP are
• Data Abstraction with Encapsulation
• Inheritance and
• Polymorphism
Evolution of OOP Languages
• SIMULA67 gave us the crucial Object oriented concepts of classes, dynamic objects, encapsulation and inheritance.
• Smalltalk is another OOP Language and environment released in 1980.
• C++ first version 1983
• Eiffel in 1988 -not an extension of an existing procedural language syntax
Introduction to Java
• Java was developed by James Gosling at Sun Microsystems in 1991.
• His Original Aim was to develop a low cost, Hardware Independent Language based on C++.
• Due to technical reasons that idea was dropped .
• A new programming Language called Oak was developed based on C++ .
• The language oak was developed by removing undesirable features of C++.
• Those features include:
– Multiple Inheritance
– Automatic type conversions
– Use of pointers &
– Memory Management.
• By 1994 the World Wide Web Emerged and Oak was Re-named as Java.
• The Java language was Successfully used to develop a web browser called WebRunner and Java/Hotjava project was commenced.
• In Early 1995, Hotjava,Java,Java Documentation and Source code was made available over the web as an alpha version.
• In December 1995, beta version2 of Java was released.
• On January 23, 1996 Java 1.0 was officially released and made available to download over the net.
• Latest version of Java 2 SDK. And Documentation Can be downloaded at
– www.javasoft.com/
Running Java Programs
• Introduction to Java Development Kit (JDK)
– JDK provides core set of tools that are necessary to develop professional Java applications
– These tools are discussed in detail later
– JDK tools are also written in Java.
• Creating a Java Source File
– Any plain text editor or text editor capable of saving in ASCII format can be used to create a Source file
– Examples are DOS EDIT, Notepad etc.
– Source File should be saved with a .java extension
• Compiling and Running the Source File
– First set the Java Environment
Setting The Path
In your Autoexec.bat file set the PATH and
CLASS PATH as follows
PATH …………;\C:\JDK1.3\BIN\
…. Indicates any existing paths
SET CLASSPATH =C:\JDK1.3\lib\classes.zip;.;
• Compiling and Running the Source File contd..
– Assuming you saved your source file in myJavaPrg Directory;
Introduction to Programming Languages
• First Generation of Computer Programs
• Sequence of machine instructions
• loaded into memory through a set of switches
• Second Generation Computer Programs
• introduction of assembly languages
• enables the programmers to use mnemonic names for the machine instructions and symbolic names for memory locations.
• A translator called the assembler converts assembly language programs into machine code
• Third Generation Languages :
• High level languages such as BASIC, Fortran, Pascal, and C eliminate the close ties to the CPU’s machine instructions
• provide standard data types such as integers, floating point numbers, and characters etc.,
• Instructions are user friendly
• Compilers are available to translate these high- level language instructions to machine instructions.
The accepted programming style :
• to organize related data items using programming constructs such as Pascal Records or C Structures
• then treat the resulting block of data as a single unit.
• After data structures are laid out, the application is written as a collection of procedures that manipulate these structures.
• With ever-increasing:
• hardware capabilities such as faster CPUs, Main Memory Space, Hard Disk space
• better graphics, and
• easier networking,
• Users have come to expect software to have greater functionality
• Window-based graphical user interface,
• transparent access to data stored in mini or mainframe computers,
• and the ability to work in a network environment etc
• Faced with this complexity,
• More programmers are starting to use Object Oriented Programming (OOP).
• OOP is a new way of organising code and data
• OOP promises increased control over the complexity of the software development process.
• The underlying concepts of OOP are
• Data Abstraction with Encapsulation
• Inheritance and
• Polymorphism
Evolution of OOP Languages
• SIMULA67 gave us the crucial Object oriented concepts of classes, dynamic objects, encapsulation and inheritance.
• Smalltalk is another OOP Language and environment released in 1980.
• C++ first version 1983
• Eiffel in 1988 -not an extension of an existing procedural language syntax
Introduction to Java
• Java was developed by James Gosling at Sun Microsystems in 1991.
• His Original Aim was to develop a low cost, Hardware Independent Language based on C++.
• Due to technical reasons that idea was dropped .
• A new programming Language called Oak was developed based on C++ .
• The language oak was developed by removing undesirable features of C++.
• Those features include:
– Multiple Inheritance
– Automatic type conversions
– Use of pointers &
– Memory Management.
• By 1994 the World Wide Web Emerged and Oak was Re-named as Java.
• The Java language was Successfully used to develop a web browser called WebRunner and Java/Hotjava project was commenced.
• In Early 1995, Hotjava,Java,Java Documentation and Source code was made available over the web as an alpha version.
• In December 1995, beta version2 of Java was released.
• On January 23, 1996 Java 1.0 was officially released and made available to download over the net.
• Latest version of Java 2 SDK. And Documentation Can be downloaded at
– www.javasoft.com/
Running Java Programs
• Introduction to Java Development Kit (JDK)
– JDK provides core set of tools that are necessary to develop professional Java applications
– These tools are discussed in detail later
– JDK tools are also written in Java.
• Creating a Java Source File
– Any plain text editor or text editor capable of saving in ASCII format can be used to create a Source file
– Examples are DOS EDIT, Notepad etc.
– Source File should be saved with a .java extension
• Compiling and Running the Source File
– First set the Java Environment
Setting The Path
In your Autoexec.bat file set the PATH and
CLASS PATH as follows
PATH …………;\C:\JDK1.3\BIN\
…. Indicates any existing paths
SET CLASSPATH =C:\JDK1.3\lib\classes.zip;.;
• Compiling and Running the Source File contd..
– Assuming you saved your source file in myJavaPrg Directory;
Introduction to Programming Languages
• First Generation of Computer Programs
• Sequence of machine instructions
• loaded into memory through a set of switches
• Second Generation Computer Programs
• introduction of assembly languages
• enables the programmers to use mnemonic names for the machine instructions and symbolic names for memory locations.
• A translator called the assembler converts assembly language programs into machine code
• Third Generation Languages :
• High level languages such as BASIC, Fortran, Pascal, and C eliminate the close ties to the CPU’s machine instructions
• provide standard data types such as integers, floating point numbers, and characters etc.,
• Instructions are user friendly
• Compilers are available to translate these high- level language instructions to machine instructions.
The accepted programming style :
• to organize related data items using programming constructs such as Pascal Records or C Structures
• then treat the resulting block of data as a single unit.
• After data structures are laid out, the application is written as a collection of procedures that manipulate these structures.
• With ever-increasing:
• hardware capabilities such as faster CPUs, Main Memory Space, Hard Disk space
• better graphics, and
• easier networking,
• Users have come to expect software to have greater functionality
• Window-based graphical user interface,
• transparent access to data stored in mini or mainframe computers,
• and the ability to work in a network environment etc
• Faced with this complexity,
• More programmers are starting to use Object Oriented Programming (OOP).
• OOP is a new way of organising code and data
• OOP promises increased control over the complexity of the software development process.
• The underlying concepts of OOP are
• Data Abstraction with Encapsulation
• Inheritance and
• Polymorphism
Evolution of OOP Languages
• SIMULA67 gave us the crucial Object oriented concepts of classes, dynamic objects, encapsulation and inheritance.
• Smalltalk is another OOP Language and environment released in 1980.
• C++ first version 1983
• Eiffel in 1988 -not an extension of an existing procedural language syntax
Introduction to Java
• Java was developed by James Gosling at Sun Microsystems in 1991.
• His Original Aim was to develop a low cost, Hardware Independent Language based on C++.
• Due to technical reasons that idea was dropped .
• A new programming Language called Oak was developed based on C++ .
• The language oak was developed by removing undesirable features of C++.
• Those features include:
– Multiple Inheritance
– Automatic type conversions
– Use of pointers &
– Memory Management.
• By 1994 the World Wide Web Emerged and Oak was Re-named as Java.
• The Java language was Successfully used to develop a web browser called WebRunner and Java/Hotjava project was commenced.
• In Early 1995, Hotjava,Java,Java Documentation and Source code was made available over the web as an alpha version.
• In December 1995, beta version2 of Java was released.
• On January 23, 1996 Java 1.0 was officially released and made available to download over the net.
• Latest version of Java 2 SDK. And Documentation Can be downloaded at
– www.javasoft.com/
Running Java Programs
• Introduction to Java Development Kit (JDK)
– JDK provides core set of tools that are necessary to develop professional Java applications
– These tools are discussed in detail later
– JDK tools are also written in Java.
• Creating a Java Source File
– Any plain text editor or text editor capable of saving in ASCII format can be used to create a Source file
– Examples are DOS EDIT, Notepad etc.
– Source File should be saved with a .java extension
• Compiling and Running the Source File
– First set the Java Environment
Setting The Path
In your Autoexec.bat file set the PATH and
CLASS PATH as follows
PATH …………;\C:\JDK1.3\BIN\
…. Indicates any existing paths
SET CLASSPATH =C:\JDK1.3\lib\classes.zip;.;
• Compiling and Running the Source File contd..
– Assuming you saved your source file in myJavaPrg Directory;
Evolution
Abacus – calculating device (3000 BC)
Pascaline – mechanical adding machine (1642)
Babbage – analytical engine (1830s)
Ada – first programmer (1800s)
Punched cards – data storage (1800s)
Hollerith – tabulating machine (1890s)
Mark I – general purpose computer (1944)
ENIAC – electronic computer (1946)
UNIVAC – US Census Department (1951)
EDVAC – Stored Program Concept (1951)
Generation of Computers
Classification of Computers
Microprocessor chip
Floppy disk for data storage
Pocket Calculator
Apple II – first personnel computer
IBM PC
Portable computers
Laser Printing and Desktop Publishing
Multimedia desktop computers
Home video computers
Video conferencing
Abacus (3000 BC)
An ancient calculating device
Still being used in China, Russia and the Far East
Pascaline (1642)
A desktop mechanical adding machine
Developed by Blaise Pascal
Analytical Engine (1830s)
This was invented by Charles Babbage who is known as “the father of computers”.
Designed to store one thousand 50 digit numbers for calculations and decisions.
Ada (1800s)
Probably the world’s first computer programmer.
Collaborated with Charles Babbage.
Punched Cards (1800s)
A card punched with holes in certain places so that a computer can read data coded from the combination of holes.
First used by Joseph Jacquard to automate his weaving factory.
Tabulating machine (1890s)
This was invented by Herman Hollerith to tabulate 1890 US census data.
It was electrically powered and, used punched cards.
Mark I (1944)
This was invented in 1944 by Dr. Howard Aiken.
Worked on programmable, general purpose computer.
IBM product.
ENIAC (1946)
Electronic Numerical Integrator And Calculator (ENIAC).
This was invented in 1946 by John Presper Eckert and John William Mauchly.
It was the first large-scale electronic digital computer.
It was a valve based computer and now referred to as a computer in the first generation.
UNIVAC (1951)
Universal Automatic Computer (UNIVAC )
This was invented to tabulate 1950 Census by John Presper Eckert and John William Mauchly
Processed both numerical and alphabetical calculations with ease
EDVAC (1951)
Electronic Discrete Variable Automatic Computer (EDVAC )
This was invented by Dr John Von Neumann
They emphasized the idea of stroed program, in contrast to program supplied by an input device as required
First Generation (1951-58)
Vacuum tubes for internal operations
Low-Level languages for programming (machine language)
Magnetic drums for primary memory.
Primary memory limited.
Heat and maintenance problems.
Punch cards for input and outputs.
Slow input and output
e.g. UNIVAC I, EDVAC
Second Generation (1958-64)
Transistors for internal operations.
Increased use of high level languages.
Magnetic cores for primary memory.
Increased memory capacity.
Binary coded data.
Increasing processing speed.
Magnetic tapes and disks for secondary storage
e.g. IBM 1620, UNIVAC 1108.
Third Generation (1965-70)
Integrated circuits (ICs) on silicon chips for internal operations.
Increased memory capacity.
Common use of minicomputers.
Emergence of software industry.
Reduction in size and cost.
Increase in speed and reliability.
e.g. HONEY WELL-6000 SERIES
Fourth Generation (1971-today)
Large Scale Integration (LSI) and Very Large Scale Integration (VLSI) for internal operations.
Development of the microprocessor.
Fourth Generation (1971-today)
Introductions of micro and super computers.
Increase in speed,power and storage capacity.
Parallel processing.
Artificial intelligence and expert systems.
Robotics
Increased use of Micro/Personal Computers.
e.g. Apple II, IBM PC, Micro Computers
Fifth Generation (1981-1990s)
A project to develop intelligent computers.
They are computers with artificial intelligence.
Symbolic manipulation and symbolic reasoning is required.
Classification of Computers
Mainframe Computers.
Minicomputers.
Microcomputers.
Special Purpose Computers.
Comparison of Computers
Computers have become
Faster (more powerful and more memory),
Cheaper (cost less) and
Smaller in size
with time.
Types of Modern Computers
Microcomputers
Workstations and Personal Computers
Minicomputers
Mainframe Computers
Parallel Processing Computers
Supercomputers
Microcomputers
Based on a microprocessor – single silicon chip CPU.
Enables the integration of sound, video, graphics, as well as text into software
‘Multi-media’ systems now available.
Appeared mid-to-late 70s.
E.g. Apple II, TRS-80, Sinclair Spectrum, Commodore PET
Peripherals connected via ISA, PCI, EISA, PCMCIA/PC Card e.g. CD-ROM sound card, speakers, microphone
Portable models now available
Small computers that can fit on a desktop or briefcase.
Two types
Personal Computers (PC)
Workstations
Personal Computer (PC)
Desktop or portable (laptop, notebook, palmtop).
Used in most organisations and at homes.
Commonly used for easy-to-use programs such as word processing, spreadsheets.
Workstations
Powerful and expensive than a PC.
Often connected to large computer system.
Designed to work with large or complex applications.
Used by engineers and scientists.
e.g. drafting, engineering design, 3D-graphical models
Minicomputers
Scaled down mainframe. (refrigerator-size)
Designed to meet the computing needs of a department or small company. Typically 4-100 concurrent users.
Usually run without a special environment.
Can support a number of concurrent applications and often uses a time-sharing operation system that aims to keep the users busy.
Lesser processing speed and data-storing capabilities than mainframes and used by medium-sized companies for specific purposes.
Low-end mainframes and high-end microcomputers can overlap.
Mainframe Computers
A multi-user computer designed to meet the computing needs of a large organization.
Originally the term referred to the metal cabinet housing the CPU.
Generally refers to computers of the 1950s and 1960s.
A Large number of dumb terminals were used for input/output and it had a large number of peripherals attached.
Can process a number of applications concurrently.
Used by large organisations to handle millions of transactions.
Usually housed in specially wired air-conditioned rooms.
Less powerful than supercomputers.
Supercomputers
Sophisticated, expensive computers, using state-of-the-art technology.
Provide processing speeds, many times that of powerful workstations.
Particularly used in the simulation and modeling of complex systems.
e.g. weather, chemical processes, the US economy, motion of galaxy
Parallel Processing Computers
Mainframe power computer that uses more than one processor (e.g. 8 – 256 processors)
Used to serve several transactions simultaneously (e.g. ATM)
Evolution of Microprocessors
Intel
8086, 80286, 80386, 80486, Pentium
Motorola
68000
Evolution of Intel Microprocessors
CPU Year Speed (MHz) Size (Bytes)
8086 1978 4.77 2
8088 1978 4.77 1
80286 1984 10-20 2
80386DX 1986 16-33 4
80486DX 1989 25-33 4
Pentium 1993 66-200+ 4
PII 1995 200+ 4
PIII 1998 Upto GHz 4
Computer Software
Consists of step-by-step instructions that tells the computer how to perform tasks.
Types of software
System Software
Application Software
System Software
Enables the application software to interact with the computer and helps the computer manage its internal resources.
Application software
Software that can perform useful work on general-purpose tasks, such as word processing, spreadsheets, and other automated applications.
Role of Systems Software
User interacts with applications software. Systems software enables the application software to interact with the computer and help the computer to manage its internal resources.
Systems software interfaces between the user or application programs and the computer hardware
Systems software is of three basic types
Operating systems
Language translators
Utility programs
Operating systems
The main piece of system software in any computing system which controls the overall system.
Language translators
Translate a program written by a programmer (e.g. Java) into machine language, so that the computer hardware can understand.
Utility programs
Generally used to support, enhance or expand existing programs in a computer system
Operating Systems (OS)
Consist of the master system of programs that manage the basic operations of the computer.
Booting (starting) the computer operation
Load, execute, store and retrieve programs
Retrieve, process and store data
Monitor the resources in the computer
Different types and makes of computers have their own operating systems.
E.g. Mainframes: IBM uses MVS
Minicomputers: IBM uses OS/400
others UNIX, VMS
Microcomputers: IBM use DOS, Windows,
OS/2, Linux,
Apple uses Macintosh
Personal Computer OS
Two types are used
Single user (Stand-alone)
dedicated to a single computer system working all by itself.
Multi-user (Network operating systems)
designed for two or more users to share various resources
Single User OS
In the beginning all Personal Computer Operating Systems were designed for individual use.
To support the processing the needs of a single software application executed by an individual user at a given time in one Computer system.
Most popular stand-alone PC OS
MS-DOS
PC DOS
OS/2
Windows OS
Macintosh OS
MS-DOS
Usually referred to DOS was the most common personal computer operating system, until Windows OS appeared.
Developed by Microsoft
Now, integrated into Windows OS.
PC-DOS
Similar to MS-DOS, but developed specifically for the IBM PC.
Operating System/2 (OS/2)
Jointly developed by Microsoft and IBM for PS/2 line of personal computers.
It was the second generation of DOS.
Provided Multitasking and Graphical User Interface (GUI).
IBM has taken over all OS/2 development.
Windows OS
Began as a shell utility program for DOS.
Due to growing popularity of Macintosh OS, Microsoft began to develop Windows OS.
Now DOS is run through Windows.
Provides multi-tasking, graphics and multimedia capabilities.
Macintosh OS
Used icons and graphics instead of commands as in DOS and OS/2.
Was in use much before Windows OS.
Provides multi-tasking, graphics and multimedia capabilities.
Multi-User OS
A Network Operating System (NOS) operates separately but in addition to a stand-alone OS.
Coordinates activities among various computers and peripherals (disk drives, printers) connected in a network.
Main purpose is to enable people to share applications, files and printers.
One computer may be designated as the file server and the NOS may reside on it.
Files can be copied, shared and exchanged.
Servers
A server will provide various services to its users through a network.
File Server
Services users with data, application software, mass storage and other utilities.
Web Server
A system that hosts web sites that receives, manages and responds to the requests for documents and files.
Mail Server
Used to maintain all incoming and outgoing mail of the users associated with the network
Print Server
Used to share printers among users of the Local Area Network
Multi-User Operating Systems
Operating systems run on
Minicomputers,
Mainframe computers or
Network of personal computers
can be considered as Multi user operating systems.
E.g. Mainframe Computer OS
ACOS on NEC mainframes
IMS on IBM mainframes
E.g. Mini Computer Operating systems
OS/400 on IBM AS/400
UNIX on UNISYS 5000
E.g. Personal Computer Network OS (NOS)
NetWare
Apple Share
OS/2 Warp
Windows for Workgroups
Windows NT
Linux
NetWare
Created by Novell.
There are two versions ,one for PC compatibles and other Macintosh.
Apple Share
NOS for Macintosh PC.
One designated as the file server.
All the devices are connected in the Apple Talk network.
Windows NT
Microsoft’s full network version of Windows.
Linux
PC version of UNIX
Overview of DOS (Disk Operating System)
CONFIG.SYS file
A text file containing the environmental parameter setting of the computer. These parameters are loaded to the memory when computer boots up.
E.g.
files=20
buffers=30
device=Himem.sys CONFIG.SYS
COMMAND.COM file
An executable file automatically loads to the computer memory when the computer boots up. A limited set of frequently used DOS commands such as DIR, DEL, COPY etc. (resident commands) are stored in this command.com file.
Memory Map
A portion of main computer memory (RAM) is used for the OS. Most operating systems use three different sections:
Supervisor
Resident commands
Transient commands.
Remaining RAM is available for the application programs.
Supervisor
Instructions which communicate with the user, cause input/output operations to occur and generally control the operations of the computer.
Resident commands
Frequently used utility programs (e.g. DIR) reside permanently in the RAM.
Transient commands
Reserved for less frequently used functions which are loaded from the disk as required.
File Management
Formatting disks, diskettes
Deleting files from a disk
Copying files
Moving Files
Renaming files
Executing files
Displaying file structure
Setting system date and time
Drive names
Frequently used DOS commands
DIR
Lists the files and subdirectories in a directory
COPY
Copies files to different locations (creates backup files)
CD
Changes the current directory
MKDIR
Makes a new directory
REN
Renames a file
DEL
Deletes a file
PATH
Indicates which directories should search to execute files.
Other Utilities in DOS
A large number of DOS commands which are not frequently (transient commands) used are stored in C:\DOS directory.
E.g. FORMAT
XCOPY
FDISK etc.
Command Line Interface
Has the following distinguishing features:
Disk drive destination (e.g. C:)
A letter telling you which drive is in use.
Directory destination (e.g. WINDOWS)
Indicates which directory you are presently using. The root (\) has no directory.
Prompt (e.g. >)
A character or a message that tells you that the computer system is ready to accept a command or input.
Cursor (e.g. _)
Usually a blinking rectangle or a blinking underline that tells you where the next keyboard character typed will appear on the screen,
Batch File
An text file with the extension .BAT, including a sequence of dos commands or executable program names.
E.g.
AUTOEXEC.BAT
TRS Routines
Terminate and Stay Resident (TRS) utilities will not release occupied memory space after finishing execution. Allows to call and use TRS program while using another program.
Normally the other programs leave the RAM used to the next program that is to be loaded.
Graphical User Interface (GUI)
Most sophisticated but user-friendly, human-computer interface
GUI pronounced “gooey”
Enable to use
colour and graphics
icons
pull-down menus
pointing device
Windows Features
Mouse triggered icons for easy operation
Each task is backed by a rectangle shaped flexible window
Can open many windows as user desires depending on the availability of the memory
Menu bar and drop down menus for each window
Mouse operated Close, Minimize and Maximize buttons on each window
Folder and Document concept and small icon to indicate the document type
Availability of many colours on the desktop and windows
User friendly dialog boxes and error messages
Better graphical support using high resolution display settings
Entire control panel for changing settings and addition of new hardware or software
Rapid file or folder searching facilities
User management and sharing of resources
On line help facility
Advantages of GUI Operating Environment
Multitasking
Consistent application design and function
File compatibility
Cut and paste
Accessories
Evolution of Microsoft Windows
WINDOWS 3.1 ( 1990)
WINDOWS 95
WINDOWS 98
WINDOWS NT (1993)
WINDOWS 2000
WINDOWS XP
wINDOWS VISTA
Overview of WINDOWS 3.1
First enhanced multitasking operating system running on IBM compatible personal computers.
First graphical user interface and window based operating system.
Overview of WINDOWS 95
New Improved Interface
Taskbar & Start Button
Windows Explorer
Powerful browser
Long Filenames
Long file names are accepted
Improved Game and Multimedia support
Improved performance for playing video and sound files
Plug & Play Hardware Compatibility
Windows can recognize and configure your new hardware automatically
32 bit Preemptive Multitasking
Allows to see more than one program at a time
Microsoft Exchange
Facilitates electronic communications including E-mail and Faxes
Microsoft Network
Supports online service to communicate with people worldwide using E-mail Bulletin Boards and the Internet.
Overview of WINDOWS 98
Active Desktop
Allows to display any web page on the desktop without opening a web browser software.
Single Click Facility
Facilitates to open programs by simply clicking on the icon.
Multiple Monitors
Allows to connect up to nine monitors to a single computer to increase the workspace. Each monitor can be used to display different programs.
USB Support
Installation of new hardware using Universal Serial Bus (USB) standard allows to use new hardware without restarting the computer.
Supports DVD, DIGITAL AUDIO, VRML
High quality digital movies and audio along with the web pages that use virtual reality features.
Microsoft WEB TV
Television broadcasts and TV program listings can be checked.
Faster and Reliable
FAT 32 file system allows you to store files more efficiently and save hard disk space.
Supports online web site for answers to common questions and keeps your copy of windows upped date.
Overview of WINDOWS NT
In 1988 Bill Gates commissioned the creation of a new operating system. The premise for the design of this operating system was portability, Security, Compliance and Compatibility, Scalability, Extensibility, and ease of internationalization.
Portability
The system allows to run on different hardware platforms with minimal changes.
Security
Provides National Security Agency of United States C2-level criteria.
Scalability
Provides symmetric multiprocessing (SMP)
Compliance and Compatibility
Provides POSIX (Portable operating system interface)-compliance. Runs existing windows applications, and supports open international standards.
Extensibility
Can be easily expanded on by writing to a well defined application programming interface (API).
Ease of Internationalisation
Can be easily ported to run in numerous different languages and writing systems, with minimal modifications to the software.
Overview of WINDOWS 2000
Built on NT Technology, the Windows2000 Platform delivers the business operating system for the next generation of PC computing.
With built-in Web and application services, Internet-standard security, and record-breaking performance at a low cost, it’s a better operating system for doing business on the Internet.
And it’s the best operating system for taking advantage of all the latest hardware, from the smallest mobile devices to laptops to the largest, most powerful servers for e-commerce.
It is available in the form of four types.
Windows 2000 Professional
Windows 2000 Server
Windows 2000 Advanced Server
Windows 2000 Datacentre
Windows 2000 Server
Windows 2000 Server is the entry-level version and is a perfect solution for file, print, intranet, and infrastructure servers.
Windows 2000 Advanced Server
Windows 2000 Advanced Server delivers enhanced reliability, availability, and scalability for running
e-commerce and line-of-business applications.
Windows 2000 Datacentre
Windows Datacenter Server is the most powerful serveroperating system ever offered by Microsoft.
Datacenter Server is designed for enterprises that demand the highest levels of availability and scale.
Word Processing
A Word Processing software is designed to
write (create),
revise (edit),
format,
store and
print documents.
Creating a New Document
Start the word processing package.
Select new from the File menu bar
or click on the new icon of standard toolbar.
This will create a new document.
The workplace is the screen which appears.
You can type any text in the workplace.
Items of a typical WP Screen
Title bar
Displays the program name and current file; Document1 means that the current file is a new document, that is not yet saved.
Menu bar
Lists the available pull-down menus, which contain commands.
Ruler
Display the margin and tab settings.
Standard toolbar
Displays icons that execute commands used most frequently.
Formatting toolbar
Displays information and icons that pertain to text formatting options.
Drawing toolbar
Display information and icons that pertain to drawing and colours.
Document Window (work space)
Area in which you create the document.
Status bar
Displays information about current location in the text.
Scroll bars
On the right (vertical) and across (horizontal) the bottom of the document window. Allows to move through text in the document.
Saving
Process of storing the document in a file and giving it a unique file name
Protect the work while writing and preserve the finished document
Important to save the work done frequently (e.g. after completing a paragraph)
Autosave feature save open files without commands.
Saving a New document
Select Save from File the menu bar
or click the Save (disk) icon on standard toolbar.
Only for new documents
or when Select Save As from File the menu bar
Save As dialog box pops up
Select the directory or drive where the file should be saved.
Type the name in which the file should be saved.
Then click on Save button.
Opening a Document
Select Open from File menu bar
or click the Open (Document) icon on standard toolbar.
Select the directory or drive from where the file should be opened.
Select the name of the file to be opened.
Then click on Open button.
Writing
Process of conveying information by typing words.
Word Wrap
Automatically pushes the text to the next line and allows to continuously type without pressing the typewriter’s carriage return key at the end of each line of text.
Soft Copy
Don’t have to use paper to write as the document is stored in RAM. The output produced by the video monitor (what is screen on the screen) is the soft copy.
Scrolling
Enables to view successive portions of a document on the screen. Can scroll through the soft copy in memory using scroll bars.
Reorganise
Don’t have to retype the entire document when you reorganise or make changes or corrections.
Hard Copy
All changes can be made in soft copy before printing on paper (hard copy).
Revising
The process of re-reading, changing, deleting and replacing text that have been written.
Changes are made on the soft copy.
New draft or version is created when revising a document. This could be save using a new file name or the existing name.
Adding new text.
Editing modes
Delete / undelete portions of the document.
Delete unwanted text
Undelete text that was accidentally deleted.
Moving or rearranging portions of the document.
Selecting text
Drag and drop
Copy and paste
Cut and Paste
Drag and Drop (Move Text)
Select the required text and move the mouse cursor to the new position and release the mouse.
Similar to Cut and Paste, but paste only once.
Copy and Paste
Allows to repeat terms, symbols or text phrases.
Select the required text and
Copy the text by clicking the Copy icon on the standard toolbar (or click the Copy on Edit menu bar)
Move the mouse cursor to the new position and
Paste the text by clicking the Paste icon on the standard toolbar (or click the Paste on Edit menu bar)
Last two steps can be repeated.
Cut and Paste
Reorganise text for clearer meaning.
Select the required text and
Delete the text by clicking the Cut icon on the standard toolbar (or click the Cut on Edit menu bar)
Move the mouse cursor to the new position and
Paste the text by clicking the Paste icon on the standard toolbar (or click the Paste on Edit menu bar)
Last two steps can be repeated. Otherwise same as drag and drop.
Find / Replacing specific characters, words or phrases.
Find or Search
Find and Replace
Move to specific pages, footnotes and other specific locations (e.g. sections, table numbers)
Go To
Find or Search
Locate specific words or phrases. Has the ability to search through a document and find a particular section of text or ‘string’.
Find
Select Find from the Edit menu bar
Enter the text you want to search for in the dialog box
Click Find Next
Find and Replace
Make global changes to word or phrase (e.g. replace misspelled word).
Search through a document and find a particular section of text or ‘string’, and replace it with another. There are varied uses for
Find and Replace
Select Replace from the Edit menu bar
Enter the text you want to search for in the find what box and replacement text in the replace with box of the dialog box
Click Find Next, Replace, or All.
To cancel a search in progress, press ESC.
Editing Modes
Insert key is a toggle key that allows to switch between the two modes: Insert and Overtype.
In Insert mode (default normally), each character typed is inserted at the inserted point and any following characters are pushed to the right and down (word wrap).
In Overtype mode, each character typed replaces any existing characters at the insertion point.
Formatting
It is not enough just to type a document.
Must make that document look attractive.
Types of formatting
character / word
line / paragraph
page / document
Process of emphasising and arranging text.
Format words by underlining, boldfacing, italicising, type styles (font, size), colour.
Format lines / paragraphs by justification of text (left, right, center, full), bullets / numbering, tab spaces.
Format pages by setting margins, line spacing, layout, portrait / landscape, tables, graphics, borders, columns and page breaks.
Format documents by setting page numbers, creating headers / footers, include date / time, insert worksheet.
When formatting text, there are three major things you usually change:
Typeface
Size of the font
Its attributes
These can be changed from the Formatting toolbar.
There are other, less important changes to the fonts which can be changed only through a dialog box.
Selecting Text
You can select text using either the mouse or the keyboard.
Additionally, you need to select text before you can Copy or Cut it to the Clipboard, and before you can use drag-and-drop editing.
You must select all the text you wish to format prior to applying character formatting.
Selecting Text Using The Mouse
Word has mouse shortcuts for selecting text.
To select a single word, double-click on the word.
To select a single sentence, hold down the Control (Ctrl) key and click anywhere in the sentence.
If you hold down the mouse key when you click and move the mouse cursor, you will select additional text one sentence at a time.
To select an entire paragraph, move the mouse pointer to the left margin, beside the paragraph to be selected, until it turns into an arrow. Then, double-click to select that paragraph.
If you hold down the mouse key on the second click, Word will go into paragraph-selection mode.
If you then move the cursor up or down, you will select additional text one paragraph at a time.
To select all the text between the current cursor position and a different position, move the mouse cursor to the new position and hold down the Shift and click with the mouse.
Common Text Attributes
Boldface Darker and heavier characters
Italic Slant characters
Underline Draws a line under words
Typeface (font) Design characters (e.g. Arial)
Type size Varies size of characters
Bullet Insert symbols (•) in front of items of a list
Subscript / Superscript Characters appears below / above the line
Bulleted Lists
To distinguish a list of points from the rest of the text it is usual to highlight them using bullets or point numbers.
A bullet is a symbol at the start of each point as in the following illustration.
To add bullets or numbers to a list of sentences, select the items and click Bullets / Numbering.
Common Text Positioning
Justification Align text against the left, right, center or both margins
Line spacing Space between lines of text – single, double, triple-spacing
Margins Blank space on either side of the text (e.g. 1”)
Page break Determine the last line of text at the bottom of a page
Page numbering Automatically inserts consecutive page numbers
Header / Footer Information that appears at the top / bottom of the page. Usually repeated throughout a document (e.g. document title or chapter name / page number or file reference)
You can apply the formatting by using the
Formatting Toolbar.
Indenting
Indenting refers to the space that is left between the margin and the beginning of the sentence.
Text with a hanging indent
Hanging indents are frequently used for bibliographic entries, glossary terms, resumes, and bulleted and numbered lists.
Text with a first-line indent
To alter the indenting for a paragraph
Select Paragraph from Format menu bar
Type in the value for the indentation in the paragraph dialog box.
Line Spacing
Line spacing refers to the space between the bottom of one line and the bottom of the next line.
Normally text is typed in ‘single spacing’ i.e. line spacing is one. Word processor automatically adjusts the line height to accommodate the size of the font you are using.
Page Formatting
Page formatting controls how the document is printed on the page.
The main focus of page formatting is the margins.
Select Page Setup from File menu bar.
Page Setup dialog box will appear.
Page Break
Page breaks are inserted to keep two pages separately from each other
To add a page break
Position the insertion point at the place where the page break to occur and
Either Select Break from the Insert menu bar
or Press <Ctrl> and Enter
Spelling Checker.
Check spelling and other simple vocabulary or syntax errors (e.g. repeated words)
Checks both spelling and grammar.
If you want to check spelling only,
click Options on the Tools menu bar,
click the Spelling and Grammar tab,
clear the Check grammar with spelling check box,
and then click OK.
Click Spelling and Grammar on the Standard toolbar.
When possible spelling or grammatical error are found, suggestions will be displayed.
Make necessary changes in the Spelling and Grammar dialog box.
Thesaurus
A word-finding program that suggests synonyms, antonyms and related and contrasting words.
Document Enhancement
Borders
Draw a line or border using a different style and thickness , such as a heavier weight, click Line
Can add a border or line to
any or all sides of a table,a paragraph,
selected text in a document, any or all sides of each page in a document,
a drawing object including a text box, an AutoShape (ready made shapes), or a picture.
Shading
Fill in the background of a table, a paragraph, or selected text.
Drawing objects can be filled with solid or gradient (shaded) colours, a pattern, a texture, or a picture.
Select the table, paragraph or text for which you want to apply the border or shading.
Click Borders and Shading on the Format menu bar.
Apply borders using the Borders and Shading dialog box.
Headers and Footers
Header
A text or graphics that appears at the top of every page.
Footer
Appears at the bottom of every page.
Useful in long documents to indicate
e.g. the chapter or section title
a reference number or company logo
Click Header and Footer on the View menu bar.
Insert options (page no, date), add text or graphics to the header or footer using the Header and Footer dialog box.
Printing
Process of hard copy of the document on paper
Provides permanent record of the document
Allows to read and review a draft of the document on paper
Print preview enables to see what the document will look like when printed
Printing a Document
Select Print from File menu bar
or click the Print icon on standard toolbar.
Print dialog box pops up.
Select the printer (if not already set).
Select the page range.
Then click on OK button.
Some Printing Options
print more than one copy
print only specific pages
print only a selection of text
Print Preview
Allow to view the document and the general layout of the page before printing
Closing a Document
Select Close from File the menu bar
The file which is currently open will be closed
Need to save the file before closing the document, otherwise will abandon the changes made.
Usual Sequence of Use
1. Start Word Processor
2. Create a New file
or Open an existing document file.
3. Write (Type) text, add a picture or a chart
or Revise an existing document.
4. Save the document onto the disk.
5. Print the document.
6. Exit Word Processor.
Hyphenate
You can use the hyphenation feature to give your documents a polished and professional look.
helps eliminate gaps or “rivers of white” in justified text.
Also helps to maintain even line lengths in narrow columns.
To hyphenate text automatically
Select Language from the Tools menu, and then point to click Hyphenation.
Tables
Tables are an easy way to arrange and adjust columns of text and numbers, and are much more flexible than tabs.
A table can be inserted at any point in your text.
A table is made up of rows and columns of cells that you can fill with text and graphics
Can split or merge cells of a table
Can align numbers in columns and then sort and perform calculations on them
Can arrange text and graphics, such as side-by-side paragraphs in a resume
Can use shading to fill in the background
Can convert text to a Table
Can align text or orient the text vertically
Inserting a Table
Select Insert Table from Table menu bar and specify number of rows and columns.
or Click the icon to create a table and drag to select the number of rows and columns you want.
Tables…Sort
Select what you want to sort.
On the Table menu, click Sort (for a table)
Select the options for your sort.
Tables…Formula
An expression that can contain any combination of numbers, bookmarks that refer to numbers, fields resulting in numbers, and the available operators and functions. The expression can refer to values in a table and values returned by functions.
Operators used by = (Formula)
In an = (Formula) field, you can use any combination of values and the following mathematical and relational operators.
Operators:
+ (Addition), – (Subtraction), * (Multiplication), / (Division), % (Percentage), ^ (Powers and roots), = (Equal to), < (Less than), < = (Less than or equal to), > (Greater than), > = (Greater than or equal to), < > (Not equal to)
Functions used by = (Formula)
ABS(x) The positive value of a number or formula,
regardless of its actual positive or negative
value.
AND( x,y) The value 1 if the logical expressions x
and y are both true, or the value 0 (zero) if
either expression is false.
AVERAGE( ) The average of a list of values.
COUNT( ) The number of items in a list.
DEFINED(x) The value 1 (true) if the expression
x is valid, or the value 0 (false) if the
expression cannot be computed.
FALSE 0 (zero).
IF(x,y,z) The result y if the conditional expression x
is true, or the result z if the conditional
expression is false. Note that y and z
(usually 1 and 0 (zero)) can be either any
numeric value or the words “True” and
”False.”
INT(x) The numbers to the left of the decimal
place in the value or formula x.
MIN( ) The smallest value in a list.
MAX( ) The largest value in a list.
MOD(x,y) The remainder that results from dividing
the value x by the value y a whole number
of times.
NOT(x) The value 0 (zero) (false) if the logical
expression x is true, or the value 1 (true) if
the expression is false.
OR(x,y) The value 1 (true) if either or both logical
expressions x and y are true, or the value 0
(zero) (false) if both expressions are false.
PRODUCT( ) The result of multiplying a list of
values. E.g., the function { = PRODUCT
(1,3,7,9) } returns the value 189.
ROUND(x,y) The value of x rounded to the
specified number of decimal places y; x
can be either a number or the result of a
formula.
SIGN(x) The value 1 if x is a positive value, or the
value –1 if x is a negative value.
SUM( ) The sum of a list of values or formulas.
TRUE 1.
The following functions can accept references to table cells as arguments:
AVERAGE(), COUNT(), MAX(), MIN(), PRODUCT(), and SUM().
E.g. COUNT(above)
Formula: Reference Cells
Table cells are referenced as A1, A2, B1, B2, and so on, with the letter representing a column and the number representing a row.
Formula: Reference Cells
To reference cells in formulas, use a comma to separate references to individual cells and a colon to separate the first and last cells in a designated range
E.g. to average these cells, type
=average(b:b) or =average(b1:b3)
=average(a1:b2)
=average(a1:c2) or =average(1:1,2:2)
=average(a1,a3,c2)
There are two ways you can indicate an entire row or column.
If you use 1:1 to indicate a row and then add a column to the table, your calculation will include all the rows in the table;
if you use a1:c1 to indicate a row and then add a column to the table, the calculation will include only the rows a, b, and c.
Page Layout
General page layout can be changed by Selecting Page Setup from the File menu bar
Set the margins of the document
Page size
Page orientation
WYSIWYG
What You See Is What You Get (WYSIWYG)
Pronounced “wizzy-wig”
means that what you see on the screen (soft copy) is exactly what will be printed on paper (hard copy)
Mail Merge
Mail merge enables to insert individual names and addresses into a form letter and print a copy addressed to each individual.
Two documents are required for a mail merge
1.The main (master) document
This contains the standard text plus areas that are marked as ‘replaceable’ i.e. personal information can be slotted into them.
1.The main document
2.The data source:
This is a document containing the personal information, which is to be slotted into the standard letter. Each person’s information is in a separate paragraph.
Creating a Mail Merge
Use an existing letter as a form letter and open it
OR Create a new letter by
Selecting New from the File menu
Select a letter template
Select Mail Merge from the Tools menu
Mail Merge Helper dialog box pops up
Create a Master Document
To set up a mail merge begin by click Create
Define the merge type, e.g. Click Form Letters
Define main document by click Active Window
The active document becomes the mail-merge main document
Next use or create a list of names and addresses
Create a Data Source
Click Get Data
Click Create Data Source
Set up the data records and save. Enter values into the fields.
Click Edit Data Source on the Mail Merge Helper. The Data Form dialog box will appear
Use a Data Source
To use an existing list of names and addresses in a Word document or in a worksheet, database or other list
Click Open Data Source and designate the data source
Click Edit Main Document to type the text you want to appear in every form letter
Inserting Merge Fields
In the main document, click where you want to insert a name, address, or other information that changes in each letter.
Select Mail Merge from the Tools menu bar
Click Insert Merge Field from click the field name that you want
Merging Documents
After inserting all of the merge fields and complete the main document by
Clicking Mail Merge Helper from the Mail Merge toolbar and merge the document
Mail merged document will be created as another word document
Print or Save using usual way
Wizards
Wizard is a feature that asks questions and then uses your answers to automatically lay out and format a document, such as a newsletter or a resume.
It takes you through the process step by step using dialog boxes to prompt you
Templates
Template is a predefined form to help you quickly create commonly used documents, such as letters, resumes, reports, fax forms and memos.
A template can be used to define not only standard text but also aspects such as the font, borders, page size and orientation.
Once a template has been created it can be recalled and used to produce the required document. This saves time and ensures consistency.
Word comes with many predefined templates and several Wizards to help you create documents such as letters and memos. To create most documents the ‘normal document’ template Normal.dot is used.
If a document is started using File-New then a dialog box containing the names of the templates appears. These are grouped by type, which you select by clicking on the appropriate tab.
Creating a Template
A template can store boilerplate text, custom toolbars, macros, shortcut keys, styles, and AutoText entries.
An easy way to create a template is by opening a document that contains the items you want to reuse (e.g. margin settings, page size and orientation, styles, and other formats) and saving it as a document template (*.dot).
Formatting Sections
Using a section break, a document can be divided in sections, where each having its own formatting elements such as the margins, page orientation, headers and footers, and sequence of page numbers
A section break appears as a double dotted line that contains the words “Section Break.”
Types of Section Breaks
Next page
Inserts a section break, breaks the page, and starts the new section on the next page
Continuous
Inserts a section break and starts the new section on the same page
Odd page or Even page
Inserts a section break and starts the new section on the next odd-numbered or even-numbered page
Working with Graphics
(WordArt)
Allow to add a special text effect to text by using the WordArt button on the Drawing toolbar.
Can create shadowed, skewed, rotated, and stretched text, as well as text that has been fitted to predefined shapes.
Special text effect is a drawing object and is not treated as text.
Working with Charts
Create a chart by clicking Object on the Insert menu and then specifying Microsoft Graph
Microsoft Graph displays a chart and its associated data in a table called a datasheet
The datasheet provides sample information that shows where to type your own row and column labels and data
Once you have created the chart, you can
enter your own data on the datasheet
import data from a text file or
Lotus 1-2-3 file
import a Excel worksheet or chart,
copy data from another program
You can also create a chart from a table in Word
Chart Types
Several chart types can be selected, namely:
Column Bar Line
Pie XY (scatter) Area
Doughnut Radar Surface
Bubble Stock Cone
Cylinder Pyramid
Charts can have 3-D effect
Bar Charts
useful for representing growth, in time or value, of unrelated items
e.g. how much a sales territory has grown over consecutive years
Pie Charts
good for representing portions of a whole,
e.g. distribution of lunch sales as percentages
You can customise the colour and design of the chart, e.g. portion of the pie graph can be highlighted, the largest pie slice can be enlarged and separated, or a 3D image can be rotated
Line Charts
effective to show variations of data over a period of time, e.g. the number of influenza cases over the years
Inserting Pictures
Inserting from clipart
Place the insertion point where you want to place the picture in the document
Select Picture from the Insert menu bar, then select Clip Art on the cascading menu. The Insert Clipart dialog box appears
Select a particular clipart category and locate the clipart you want, click the image and select insert clip
Inserting from file
Place the insertion point where you want to place the picture in the document
Select Picture from the Insert menu bar, then select From File on the cascading menu. The Insert Picture dialog box appears
Locate the drive, folder and picture file, click the file preview it, and click Insert
Similarly you could insert
Charts
WordArt styles
Shapes
Inserting Other Package Objects
You may Copy objects from other package and Paste it in the Word document OR
Select File from on Insert menu bar
Insert File dialog box appears
Select the directory and folder from which the file should be opened
Select the file then click on OK
Inserting Worksheet
You can insert the worksheet or chart as a linked object or embedded object.
A linked worksheet or chart is displayed in your document, but its information is stored in the original Microsoft Excel workbook
An embedded worksheet or chart stores its information directly in the Word document
Inserting MS Access Data
You can insert the contents of a Microsoft Access table or query into an existing Word document. To keep the data in your document up to date, you can create a link to the Microsoft Access data.
OR export Microsoft Access data (table, query, report, or other database object) to a Word document
Bookmarks
Identifies a specific place in the document.
Used to identify specific text or graphics or to mark a location that you use frequently.
Customised Toolbars
Toolbar buttons can be added, reorganised or remove to suit an individual.
Footnotes / Endnotes
Cite sources of research and are required whenever you prepare a proper research document.
Placed at the bottom of each page or end of the document (as endnotes).
Indexes and Tables of Contents
An index is created by marking the words you want to include.
A table of contents is created by formatting the headings into categories (1, 2, 3, and so on).
Used for long documents like a textbook.
Macros
A macro is a program consisting of recorded keystrokes and an application’s command language that, when run within the application, executes the keystrokes and commands to accomplish a task.
A macro can automate tedious tasks and can also automate a series of procedures.
E.g. taking pages from a document and faxing them
Macros are often written in a simple programming language.
E.g. Visual Basic
Computer viruses infects a word processing document using this macro feature.
You could set the word processor to warn the user before invoking a macro and hence protect against viruses.
Introduction to Presentation Tools
What is a presentation ?
A Presentation is a Visual aid to a speaker who is explaining some matter to a large audience
Presentations can take the following forms
Paper
usually as reports, handouts
Transparencies
displayed with an Overhead Projector – OHP
Colour Slides
displayed with a Slide Projector
Screen displays
projected from the computer onto a multimedia projector
Introduction to Presentation Tools
OHP slide
Transparencies are used
Still images
Black & White mostly
Slides must be changed manually
Cheap in cost
Poor Quality
Slide Projector
35mm Colour Positives are used
Per slide cost is very high
Text & Still images
Slide advancing is done mechanically
Quality is high compared to the OHP
Recording to a slide must be done using an expensive side recorder
Computer based Presentation tools (Multimedia projector)
These are some application software specially developed for preparing effective presentations
Full capabilities such as multimedia features of the computer can be applied in making this type of presentations
Slide is prepared on the computer screen
A Video projector can be used for projecting what we have on the computer screen
Computer based Presentation tools…
Presentation of this type is a Series of slides arranged in a desired order
Each slide can have both textual and Graphical information
Both textual and Graphical objects can be animated to make an effective presentation
Visual effects such as effect of appearing a slide and erasing a slide are also possible
Examples for typical application software developed as Presentation tools
Harvard Graphics
Aldus Presentation
Corel Show
Microsoft PowerPoint etc.
Presentation Graphics
Analytical Graphics
graphical forms that make numeric data easier to analyse (e.g. bar chart) than it is in the form of numbers (e.g. electronic spreadsheet)
Presentation Graphics
graphics used to communicate to others. They use analytical graphics, texturing patterns (speckled, solid), colour, 3D.
Computer graphics can be highly complicated, such as those used in special effects for movies (Jurassic Park)
Microsoft PowerPoint
Window based Presentation Tool
Comes with Microsoft Office
User friendly and Easy to learn
To run the software
Start / Programs / Microsoft PowerPoint on windows flat form
Creation of slides
Two options:
Rapid Presentation design using wizards
Creating a Presentation using Blank Presentation Option
Rapid Presentation design using wizards
Ideal for an Absolute beginner as guided by the computer
Ready made standard presentation skeletons for easy and fast preparation
Good reference for experienced user
Go through this option before actually making your own presentation
Auto Content Wizard option
Presentation category selection
Presentation output selection
Filling Title Slide information
Modify contents of the given presentation
Creating a Presentation
Creating a Presentation using Blank Presentation Option
Good for experienced users
Layout of a slide can be selected
Good reference for experienced user
Go through this option before actually making your own presentation
You better have paper sketch with you
Creating a Presentation using Blank Presentation Option
User friendly – On screen guidance is available
Appropriate text is entered in text areas
New slides can be inserted using Insert Menu
Duplicate slides too can be inserted
At any moment selected layout can be altered through Format menu- slide layout
Slides Views
Different Views of a Slide
Slide view
Outline view
Slide sorter view
Notes pages view
Slide show view
Outline view
Outline of all text in the presentation is given here
Outline is readily printable for checking purpose
Slide sorter view
Shows many slide on single screen
Sorting of slides specially rearrangement is done in this view using drag and drop feature
Unnecessary slide deletion can be done by selecting and use of the delete key
Slide transition effects can easily be applied and monitored here
Notes Pages view
Relevant information to a slide can be introduced in notes pages using normal word processing
Notes are not visible to the audience
Speaker may keep printed version of these notes together with the corresponding slide
Slide Show view
This is the actual view of the slide to the audience
Switching to this view you can test its actual appearance
No modification is possible on this view
Graphical Objects
Clip Arts
Word Arts
Multimedia clips
Sound clips
Video clips
Still photographs
Auto Shapes
Clip Arts
Some ready made drawings in the package and can be inserted through insert menu.
Word Arts
Some ready made artistic lettering in the package and can be inserted through insert menu or using drawing tool bar
Multimedia Clips
Some ready made sound, video and photos in the package and can be inserted through insert menu
Auto Shapes
Some ready made shapes in the package and can be inserted through insert menu or Auto shapes button on the drawing tool bar
Selecting single object
Simply click on the object
Selecting many objects at the same time
Hold down shift key while selecting the next or by drawing a rectangle covering all objects to be selected using the cursor
Grouping selected objects
First select all objects to be grouped
Use Draw / Group on the drawing tool bar
Ungrouping selected objects
Select the grouped object by clicking on it
Use Draw / Ungroup on the drawing tool bar
Overlapped objects
Changing the order of overlapping
Select the object to be brought up
Use Draw / Order to change the order
Aligning and Distributing objects
Align to middle, Centre, Left, Right etc.
Distributing vertically, Horizontally
Select the objects to be aligned or distributed
Use Draw / Align or Distribute
Free Rotation and Mirror image of objects (flipping)
Select the object
Use Draw / Rotate or Flip
Visual Effects
Transition Effects
Appear effect or erasing effect between two consecutive slides
Build Effects
Visual effects appear on a slide to make any textual or graphical object
Animation effects
Simple animation introduced to graphical objects
Transition Effects
These effects can be introduced on slide sorter view
Slide sorter tool bar is activated on the slide sorter view
Slide advancement method, Transition effect and speed of effect
Build Effects
Animation Effects
These effects are introduced on the slide view
You have to place the objects at the destination after animation
Slide show menu / Custom animation will give necessary steps to be followed in animating objects on the slide
Animation Effects
Action Buttons
These are introduced to break the sequence of the presentation
Clicking on pre programmed button on the slide will trigger a display of a slide out of the sequence
On the slide view you may introduce action buttons and it can be programmed by the context menu
Action Buttons ( Pre defined set )
Action Buttons (Programming a tiny auto shape)
Input Devices
Input devices are used to feed data and instructions to the computer systems.They consist of a range of devices that take data and programs from the outside world that people can read or comprehend and convert them to a form that the computer can manipulate.
The form of the input may be by means of
Keyboard, Pointing device
Writing & drawing input devices
Video, Text, voice input
Key board
It’s similar as normal typewriter keyboard, plus a number of special keys.
Standard keys are used to enter words & numbers. Special keys so called “function keys” labeled as F1,F2 … are used to enter commands.
A numeric keypad that resembles an electronic calculator’s keypad.
Cursor-movement key
QWERTY keyboard
104-key enhanced keyboard
Used for data entry and to issue commands into the system.
Pointing device – Mouse
A mouse is a device that can be rolled on a desktop to direct a pointer (cursor) on the computers display screen. The cursor is the symbol on the screen that shows where data may be entered next or the command to be activated.
Pointing devices commonly have two or three buttons that are used to issue commands to the computer.
Command Actions
Point – an act of moving the pointing device to an object on-screen.
Click – select the object on-screen.
Drag – holding down the pointing-device button while moving the selected object on-screen.
Pointing device – Trackball
A trackball performs like a stationary, upside-down mouse.
Most portable laptop computers use a built-in or clip-on trackball.
Pointing device – Joystick
A joystick is a small lever that can be moved in any direction to move an object on the screen.
Usually associated with playing computer games.
Graphics Input – Scanner
Image scanners or graphic scanners convert the printed or photographic image on paper into electronic signals and then into digital form. These digital information then can be stored in a computer & manipulated.
Text Input – Scanner
Text are scanned from the printed page into the computer, as an attempt to reduce errors in data entry while speeding up the process as well. The software incorporated converts the scanned images into character codes and thus enables text processing.
Text Input – OCR
Optical Character Recognition (OCR)
An input device that can read and recognise the symbols of text (special printed characters) & convert them to the machine readable form.
Writing & Drawing Input Devices – Light Pen
The light pen is a light sensitive stylus, or pen like device, connected by a wire to the computer terminal.
The user brings the pen to a desired point on the display screen and presses the pen button, which identifies that screen location to the computer.
Writing & Drawing Input Devices – Touch Screen
The touch screen is video display screen that has been sensitized to receive input from the touch of a finger.
Writing & Drawing Input Devices – Digitizing Tablet
A digitizing tablet consists of a tablet connected by a wire to a stylus or puck.
A stylus is a pen like device with which the user “sketches” an image.
A puck is a copying device with which the user copies an image as it is moved over a desired path on a sketch.
More sophisticated stylus or pointing devices with high accuracy are used by designers, architects, artists, desktop publishers, map makers, etc.
Video input (Digital Camera)
As with sound, most films & video are generated and recorded in analog forms in which the signals are in continuously varying nature. Thus the signals come from the systems such as VCR, videodisk or laser disk, or a camcorder must be converted to digital form through a special video capture card installed in the computer.
Two type of video cards,
Frame grabber video card
can capture & digitize only a single frame at a time.
Full motion video card
can convert analog to digital signals at the rate of 30 frames per second, giving the effect of a continuously following motion picture.
Voice input (Voice Recognition)
Converts the person’s speech in to digital code by comparing the electrical patterns produce by the speaker’s voice with a set of prerecorded patterns stored in the computer.
Source Data Input – MICR
Magnetic Ink Character Recognition (MICR)
MICR characters which are printed with magnetic ink , containing magnetic particles are read by MICR equipment producing digitised signals.
Used by banks to read the information such as printed serial numbers on the bottom of cheques using magnetic ink.
MICR reader/sorter can process cheques and other documents at speeds of up to 2000 documents per minute.
Source Data Input – Magnetic strip
Used on the backs of credit cards and bank debit cards, and various other plastic cards.
Enables readers, such as automated teller machines (ATM) to read account information.
Source Data Input – OMR
Optical-Mark Recognition (OMR)
An input device that senses marks on a piece of paper, using a light beam, and converts them into electronic signals which are sent to the computer for processing.
Commonly used to mark the questionnaires or school examination answer sheets where the students, using pencils mark certain boxes on the examination answer sheets provided.
Source Data Input – Bar codes
Commonly used by sales and stock people in retail stores and supermarkets.
Point-of-sale (POS) terminal scans the bar codes of the Universal Product Code (UPC) to register the price, which is programmed into the host computer, as well as to deduct the item from stock.
Output devices
Translate information processed by the computer into a form that human or another machine can recognize. The two principle kind of output are hardcopy & softcopy .
Hardcopy refers to a printed output.
Softcopy refers to the information that is shown on the display screen or is in audio or video form.
There are several ways to produce output
Text output
Graphics output
Sound output
Video output
Text Output
is simply the alphanumeric characters that make up our language. Text output appearance ranges from typewritten to typeset quality.
Graphics Output
includes line drawings, maps, presentations business graphics, computer-aided design, computer painting, photographic reproduction.
Sound output
ranges from the message beeps produced by the computer system to the human voice to music and other forms of sound
Video output
Photographs (still images) or moving images such as television and videotaped material
Printer
A printer provides hard copy output on paper. The basic criteria for evaluating printers include:
Quality of the printed output.
Speed at which printed pages are produced.
Sound level during printing.
Cost of printing media (ribbons, cartridges).
Conservation of paper.
Impact Printers
Form characters or images by striking a mechanism such as print hammer or wheel against an inked ribbon leaving an image on paper. Make high noise. Now used less.
Non- Impact Printers
Form characters or images without making direct physical contact between printing mechanism and paper.
First printing technology.
Early days typewriters were adapted, produced same high-quality output. Cannot change fonts nor can print graphics or colours. Only the symbols available in the printing mechanism can be produced on the paper.
e.g. daisy wheel printer, drum and belt printers.
Followed by dot-matrix printers.
Dot-matrix output is produced by printers that use wires in the print head. These wires extend out in different patterns, pressing against the ribbon to print the characters on paper. As this mechanism enables the print control up to the dot level on the paper, the can be used to produce both text and graphics.
Fast, but noisy. Wear out ribbons very quickly.
Non-Impact Printers – Laser Printing
Provide high-quality non-impact printing. Output is created by directing a laser beam onto a drum to create an electrical charge that forms a pattern of letters or images.
As the drum rotates, it picks up black toner on the images and transfers them to paper. The heating process then fixes the toner particles permanently on the paper.
Excellent print quality and font selection.
Fast printing. E.g. 8-500 pages per minute
High quality graphics with colour. High resolution.
Medium level noise, but high cost.
Primary disadvantages are expensive
maintenance and the high cost of toner
cartridges.
Non-Impact Printers – Inkjet Printing
Inkjet printer transfers characters and images to paper by spraying a fine jet of ink.
Offers nearly the quality of laser printing, but not the speed. Low-cost alternative for high quality printing
Plotters
It is a specialized output device designed to produce high-quality graphics in a variety of colours. That are especially useful for creating maps and architectural drawings, although they may also produce less complicated charts and graphics.
Type of plotters
Pen plotter
Electrostatic plotter
Thermal plotter
Video Monitor
Provides soft copy output.
Comes in either monochrome or colour.
A monochrome display a single colour against a different coloured background, such as green on black amber on black or white on black.
Colour display can show a variety of colours.
Video Displays
Resolution – describes the degree
of details in a video display.
The higher the resolution the characters and images are sharper and crisper as film image.
Conventional television display is low resolution as we can see lines, jagged edges and graininess in the image.
Bit-mapped display offers extremely high-resolution. Bit map means that each dot on the screen, called a pixel (for picture element) is represented by one bit (a 1 or 0) by the computer. (monochrome)
Bit-mapped graphics is the colour version of a bit map display. Each pixel identifies a number (e.g. 1-256 on a 256-colour palette) indicating what colour that pixel should be.
The liquid crystal display (LCD) is a flat-screen display commonly used with portable computers.
Terminal
A monitor-keyboard combination.
Has no system unit of its own, but instead uses the facility from a central computer via a communication link.
Mainframes, minicomputers and workstation systems support multiple terminals.
Dumb terminal performs the simplest input and output operations but no processing.
e.g. A bank ATM
Smart (intelligent) terminal may have its own CPU or processing capabilities, as well as built-in disk for storage
e.g. Point-of-sale (POS) cash register
Virtual Reality
An artificial, three-dimensional reality created by the computer giving the real world-like feeling to the user.
Involves many human senses. Special gloves and stereoscopic eyewear are used.
Pilots being trained in a flight simulator
Storage device
A functional unit into which data can be
placed
retained (stored)
retrieved (accessed)
Main Parameters
Location
Internal storage
External storage
Capacity
Speed
Access Method
Primary Storage (Main memory) always uses Random Access method.
Two methods for storing and accessing instructions or data in secondary (external) storage
direct access
Sequential access
Random Access
Random Access means, that in any cell in the memory can be accessed in a fixed time irrespective of its physical location.
Direct access
Direct access means that the data is stored in a specific location so that any data can be found quickly.
e.g. Hard disk, floppy disk, CD-ROM.
Direct access is the most widely used storage method in external storage devices. The most common direct-access storage medium is the disk.
Access Time
RAM
60 nanoseconds (ns) or less to access memory locations in RAM
Secondary Storage
7 to 9 milliseconds (ms) to access sectors in a hard disk
Sequential access
Sequential access means that the data is stored and accessed in a set order, perhaps alphabetically or by date and time. The most common sequential storage medium is magnetic tape on reels or cassettes.
Sequential-access storage devices are used mostly for backup purposes.
e.g. Reel-to-reel magnetic tape, Tape Cartridges
Magnetic Diskette
First magnetic diskette was 8” with mini/mainframe computers
A thin flexible disk is permanently sealed within a rigged protective plastic cover
Sizes were evolved through 8”,5 1/4” & 3 1/2” (diameter)
Storage capacity is
H/D L/D
3 1/2” 1.44 MB 720MB
5 1/4” 1.2 MB 360KB
Track
On a data medium, a path on the recording surface associated with a single read/write head as the data medium moves past it.
Sector
A predetermined angular part of a track or band on a magnetic drum or a magnetic disk, that can be addressed.
Most industry-standard PCs use sectors which can store 128 or 256 or 512 or 1024 bytes of information
Seek Time
Time required for the access arm of a direct access storage device to be positioned on the appropriate track
Rotational delay (Latency)
Time taken for the sector containing the required record to come under the read/write head
Access time
The interval of time between the moment data is called from memory / storage and the moment the transmission to the requesting device is completed.
i.e. Total time taken to find and transfer data.
Access time = Latency + Transfer time
Block transfer
The process of transferring one or more blocks of data in one operations.
Block size
The number of bytes or any other appropriate unit, in a block
Blocking Factor
The number of records to be contained in a block
Inter-blocking gap
Space between two consecutive blocks on a data medium.
Magnetic Diskette (3 1/2 inch)
Sector = 512 bytes
Track = 18 sectors = 18 * 512 bytes = 9.0Kb
Disk = Double sided = 2 * 80 tracks
= 2 * 80 * 9.0 Kb = 1.44Mb
Size = 3 ½ inch
Capacity = 1.44 Mb
Access time = 275 ms
Rotational speed = 720 rpm
Magnetic Diskette (5 1/4 inch)
High Density
Sector = 512 bytes
Track = 15 sectors = 15 * 512 bytes = 7.5 Kb
Disk = Double sided = 2 * 80 tracks
= 2 * 80 * 7.5 Kb = 1.2 Mb
Low Density
Sector = 512 bytes
Track = 9 sectors = 9 * 512 bytes = 4.5 Kb
Disk = Double sided = 2 * 40 tracks
= 2 * 40 * 4.5 Kb = 360 Kb
Magnetic Diskette (5 1/4 inch)
Rotational speed = 360 revolutions per minute (rpm)
Two Read/write heads capable of addressing 80 cylinders per diskette at the speed of 3 ms from track to track
Average Access time = 80 milliseconds (ms)
Settling time = 15 ms
Magnetic Disk (Hard Disk)
REMOVABLE DISK
Removable disk pack used in earlier Mainframe & Mini Computers
Disk cartridge – easy to remove like cassettes
FIXED DISK
Installed in a sealed container and it’s not removable
most of the fixed disks use the “Winchester” technology
Disk consists of several platters (e.g. 3). Each platter has two sides. A number refers to each side (e.g. side 0, 1, 2, 3 for 4 surfaces). A Disc pack may have 20 surfaces or = 11 Platters
A disk starts out very unstructured – just a lot of bits of magnetic stuff without any organisation, rhyme or reason. Before the system can start writing records to it, the disk must have a structure- a grid work into which the information can be placed.
Formatting a disk is the process of putting the grid work on the disk and building the organisational structure so that file can be found. Once a disk is formatted it is ready for the system to write data to it
Formatting organises disks into numbered rings called cylinders. A cylinder on a single side is referred to as a track. Each track is broken into numbered pie slices called sectors. Each sector stores information.
Disk pack = 20 surfaces = 11 Platters
Disk = 2048 cylinders (figure has only 4)
Cylinder = 20 tracks (track in each surface)
Track = 72 sectors (figure outermost has 13)
Sector = 512 bytes
Disk Storage = 512 * 72 * 20 * 2048 bytes = 1.44 GB
Rotational speed = 3600 rpm (revolutions per minute) = 16.66 ms per revolution
The time required to position the read-write heads over the required track is the seek time.
The time required for the read-write head to come to a complete stop after it is moved is called the settling time.
The time required for the disk to rotate to the position where the beginning of the desired bock arrives at the read-write head is latency.
Average Rotational delay (latency) = ½ revolution
Track capacity = 72 x 512 = 36 KB
Cylinder capacity = 20 x 36 = 720 KB
Disk capacity = 2048 x 720 = 1.44 GB
Hard Disk Technology
Removable-pack hard disk system
Contains 6-20 hard disks of 10 1/2 or 14 inch diameter, aligned one above the other in a sealed unit.
Fixed disk drive
High-speed, high-capacity disk drives that are housed in their own cabinets.
Redundant Arrays of Inexpensive Disks (RAID)
The disk system consists of a number of 5 1/4-inch disk drives within a single cabinet and sends data to the computer along several parallel paths simultaneously.
The main purpose is to increase the reliability and availability. I.e. If one disk fails, still no data is lost
Magnetic Tapes
Very popular with mainframe computers
Storage density is expressed in ‘bytes per inch’ (bpi) or character per inch (cpi)
Storage density varies with the quality of the tape & the equipment used to read form and write on it.
Inter record Gap
for logical records on tape to be individually accessible, they must be separated by gaps.
Inter block Gap
if records can be grouped into blocks (physical records), then process is faster and less tape is wasted because fewer gaps, in this case called inter block gaps (IBG).
BOT {header block} {gap} {data block} {gap} …..
….. {data block} {gap} {data block} EOT
Tape header block = 80 bytes
{label identifier (1-3), label number (4), volume identifier (5-10), accessibility (11), reserved (12-37), owner identifier (38-51), reserved (52-79), label standard version (80)}
Tape width = ½ inch
Data storage in tracks
Tape tracks = 9
Data recorded in blocks of characters
Read/write speed = 50 ips (inches per second)
Blocking factor = 20
Block size = 512 bytes
Recording density = 1,600 bpi (bytes per inch)
Inter-block gap = 0.5 inches
Tape length = 2400 feet = 28,800 inches
Block length = blocking factor
x block size / recording density
= 20 x 512 / 1,600 = 6.4 inches
Block + gap = 6.4 + 0.5 = 6.9 inches
Tape blocks = tape length / (block + gap)
Storage capacity = Tape blocks
x blocking factor x block size
= 4,173 x 20 x 512 bytes ? 40 MB
= 28,800 / 6.9 = 4,173
Tape efficiency = block length / (block + gap)
= 6.4 / 6.9 * 100 % ? 93 %
Time to write a block = block length / tape speed
= 6.4 / 50 sec (seconds) = 128 ms
Tape start/stop time = 0.02 sec = 20 ms
Time to write a block + start and stop times
= 20 + 128 + 20 = 168 ms
Average Access time for a block
= average distance + speed
= 28,800/2 x 168/6.9 = 350 sec
Digital Tape
Magnetic tape
A tape made of thin plastic with a magnetizable layer on which data can be stored
Digital tape store data in digital format, instead of analogue format
ZIP Devices
Zip drive (portable or internal) uses a special 3.5 inch disk that holds 100 Mb or 250 MB.
Optical disk storage system
Data recording is done by using laser technology
common type of optical disk
Compact Disk Read Only Memory (CD-ROM)
Compact Disk Recordable (CD-R)
Write Once Read Many times (WORM)
Erasable Optical Disk (EOD)
Optical card
CD-ROM
Holds approximately 650 MB
Used for
Data Storage
Encyclopaedias
Catalogues
Games
Entertainment
Movies
Magazines and books
DVD Devices
Originally - Digital Video Disk (DVD)
Now - Digital Versatile Disk (DVD)
Refers to a storage medium that can store TV-quality images on a CD-ROM disk with a capacity exceeding 5 GB
Main Circuit Board of a PC
The main circuit board (motherboard or system board) is the central nervous system of the computer. All the important components are either mounted on it or connected to it.
Primary electronic circuitry resides in it.
Consists of
RAM slots - ROM chips
CPU - Clock chip
BIOS chip - Expansion slots
Disk drive controller chip
Connectors for disk drives
Keyboard connectors
Connectors for serial and parallel ports
Integrated Circuit
An integrated circuit (IC) is a small chunk of silicon semiconductor material that contains hundreds of thousands to millions of electronic circuits.
Chips
Integrated circuit chips are used in several different ways
CPU (microprocessor)
ROM chips
RAM (SIMMs)
Video display controller chip
Disk drive controller chip
Coprocessor chip
RAM Chips
Random Access Memory (RAM, main memory, primary storage) is memory that temporarily holds data and instructions that will be needed shortly by the CPU.
Data are stored and retrieved at random from anywhere in the electronic RAM chip, in approximately equal amounts of time, no matter what the specific data locations are
RAM chips are often mounted on a small circuit board, such as Single Inline Memory Module (SIMM) which is plugged into the motherboard.
Two principal types of RAM chips are
DRAM (Dynamic RAM) commonly used
SRAM (Static RAM) for specialised useRAM is of the four following types.
Conventional memory
Upper memory
Extended memory
Expanded memory
Conventional Memory
Consists of the first 640 kilobytes of RAM
This area is used for running the operating system and applications programs.
Upper Memory
Memory located between 640 KB and 1MB of RAM (384 KB).
Microcomputers with ‘286’ or higher chips use this area for storing parts of the operating system, leaving conventional memory available for running application programs.
Extended Memory
All memory over 1MB. Used by ‘286’ or higher chips.
Not all programs can use extended memory. Indeed, DOS and DOS programs can’t access it. Programs to be able to use this, they must being written with DOS extenders.
Expanded Memory
Lets 8088-chip-based PCs access memory over the limit of 640KB conventional memory.
Used with ‘386SX’ or higher chips
ROM Chips
Read-Only Memory (ROM, firmware) cannot be written on or erased by the computer user.
Contain programs that are built in at the factory.
There are instructions for basic computer operations, such as those that start the computer or put the characters on the screen
Three variants of ROM chips
PROM (Programmable ROM)
blank chips on which the buyer, using special equipment writes the program. Once the program is written it cannot be erased.
EPROM (Erasable PROM)
like PROM chips, but new material can be written.Erasing needs the use of UV rays.
EEPROM (Electrically EPROM)
can be reprogrammed using special electrical impulses. Need not be removed from the computer in order to be changed.
Other forms of Memory
Performance of microcomputers can be enhanced further by adding other forms of memory
Cache memory
Video memory (Video RAM)
Flash memory (flash RAM)
Cache memory
a special high-speed memory area that the CPU can access quickly
Video memory (Video RAM)
are used to store display images for the monitor.
Flash memory (flash RAM)
Card consists of circuitry on credit-card size cards that can be inserted into slots connecting to the motherboard. Is non-volatile. Used in notebooks.
Ports
A port (interface) is a connection from the main circuit board to a peripheral device. The peripheral is connected to the port by a special cable.
Ports are arranged along the rear of the main circuit board and provide connections through the back of the system of the system unit.
Ports commonly connect the main circuit board to the following
Keyboard
Monitor
Printer
Mouse
External modem
Joystick
A port is a socket on the outside of the system unit that is connected to an expansion board or the main board on the inside of the system.
Common types of ports
Parallel ports
Serial ports
Video adapter ports
SCSI ports
Game ports
Parallel port
Allows lines to be connected that will enable 8 bits to be transmitted simultaneously (printer).
Serial port (RS-232 port, COM)
Enables a line to be connected that will send bits one after the other on a single line (modem, mice, keyboard).
Video adapter ports
Used to connect the video display monitor outside the computer to the video adapter card inside the system unit. Monitors may have 9-pin plug or 15-pin plus.
SCSI ports
Small Computer System Interface (SCSI) provides an interface for transferring data at high speed for up to eight SCSI-compatible devices (external hard-disk drives, magnetic-tape backup units, CD-ROM drives, Scanners).
Games ports
Allows you to attach a joystick or similar game-playing device to the system unit.
Expansion Slots
Expansion card (adapter card) is a printed circuit card with circuitry that gives the computer additional capabilities. This is inserted into an expansion slot on the main board.
Expansion Cards
Memory Expansion cards (SIMMs)
Expansion cards are used to connect the following devices to the main circuit board
Video monitor (Display adapter, graphics display cards)
Dirk drive (controller cards)
Scanner (controller cards)
External CD-ROM (controller cards)
Internal modem - Sound
TV tuner- Network
Bus Lines
A bus line (bus) is an electrical pathway through which bits are transmitted within the CPU and between the CPU and other units in the system unit.
Principal PC bus standards (architectures)
Industry Standard Architecture (ISA)
Micro Channel Architecture (MCA)
Enhanced ISA (EISA)
PCI (Peripheral Computer Interface)
Personal Computer Memory Card International Association (PCMCIA)
Industry Standard Architecture (ISA)
First 8 bits, then 16 bits, is the most common PC bus.
Micro Channel Architecture (MCA)
Used in IBM PS/2 line of microcomputers. 32 bits.
Enhanced ISA (EISA)
32 bits. ISA cards will run in EISA slots.
PCI
The latest standard available in 32-bits and 64 bits
Personal Computer Memory Card International Association (PCMCIA)
Completely open, nonproprietary bus standard for notebooks, sub-notebooks and palmtops.
Local Bus Extensions
Used to bypass existing standards bus systems (connect to peripheral computers directly to the microprocessor).
Peripheral Component Interconnect (PCI)
64-bit data path used in Pentium-based systems.
Video Electronics Standard Association (VESA)
32 bits, used with ‘486 systems
Memory Hierarchy
CPU Registers
Used to store the information required by the current instruction being processed and to keep the status of the processor.
Cache memory
used to reduce the speed gap between the CPU and the main memory by placing in between
RAM
used as storage for data and/or instructions involved in the programs currently being executed by the CPU
Secondary Storage
used for data or instructions that may be processed at some later time or stored indefinitely
Registers
CPU must have the currently being executed instruction and the other components related to that within the CPU itself.
Both control unit and ALU have registers.
Registers are high-speed temporary storage areas, to hold both instructions and data during a processing sequence of an instruction.
Several types of registers
Instruction register
holds an instruction (e.g. to add, to multiply or to perform a logical comparison)
Storage register
temporarily holds data retrieved from RAM prior to processing.
Accumulator
temporarily stores the results of continuing arithmetic and logical operations.
Data Representation
The computer understands only the binary language of 1s and 0s.
Each 1 or 0 is a bit, and the representation they form (an 8-bit character: a letter, a digit, a symbol) is called a byte.
Bytes are organised into words for presentation to the processor.
Word is a logical unit of information, made up of bits and bytes, that can be stored in a single memory location.
Word length (size) is the number of bits in a single memory location.
The Machine Cycle
Machine Cycle is the sequence of steps by which an instruction is processed.
Cycle is the length of time the CPU takes to process one machine instruction or word.
A machine cycle is comprised of two cycles
instruction cycle (fetch, decodes)
execution cycle (execute, store)
CPU Speed
The CPU performance is measured in Million Instructions Per Second (MIPS)
CPU speed is measured based on an internal clock. Clock speed is measured in Hertz, which is a unit of measurement of electrical vibrations.
One Hertz is equal to one cycle per second.
One million Hertz is one megahertz (MHz)
Time to complete one machine cycle, in fractions of a second
milliseconds (one-thousandth of a second) in older computers
microseconds (one-millionth of a second) for most microcomputers
nanoseconds (one-billionth of a second) for mainframes
picoseconds (one-trillionth of a second) in some experimental machines
Buffer
A temporary data-storage area.
e.g. a file sent to the printer is held in the printer’s buffer because the printing speed is much slower than the data transfer speed.
A disk buffer is an important element in advanced disk input/output strategies.
When an application program requests data from a disk, the system software allocates a buffer and transfers the data from the appropriate disk sector into the buffer.
Disk Cache
Semiconductor memory which temporarily stores information that is frequently requested from the disk drives.
Improves the speed of disk-intensive applications (e.g. database)
Comparison of Capacity and Speed
Memory Capacity Access Time
CPU Bits (8 – 64) MHz (4 – 700)
RegisterBits (8 – 64) MIPS (0.8-100)
Cache KB (64 – 512) ns (25-50)
RAM MB (8 KB – 64) ns (60 – 80)
Disk GB (10 MB – 10) ms (6 – 15)
Tape MB (40) minutes (128ms – 5)
What is a Computer?
A Computer is a programmable, multipurpose machine that accepts data (e.g. raw data, facts & figures) and processes, or manipulates it into information we can use, such as summaries or totals
E.g. An automatic teller machine (ATM) computes the deposits and withdrawals to give you the total in your account.
Data: (ISO) A representation of facts, concepts or instructions in a formalised manner suitable for communication, interpretation or processing by human beings or by automatic means.
Letters, numbers, colours, symbols, shapes, temperatures, sound or other facts and figures are data suitable for processing.
Information: (ISO) The meaning that is applied to data by means of the conversions applied to that data. I.e. processed data.
A computer is an electronic device, operating under the control of instructions stored in its own memory unit,
which can accept and store data
(e.g. data entered using a keyboard),
perform arithmetic and logical operations on that data without human intervention and
(e.g. process data into information)
produce output from the processing
(e.g. view information on the screen).
Computer: (ISO) A programmable functional unit that consists of one or more associated processing units and peripheral equipment, that is controlled by internally stored programs and that can perform substantial computation, including numerous arithmetic operations or logic operations, without human intervention during a run.
A computer may be a stand-alone unit or may consist of several interconnected units.
Personnel computers, microwave ovens, portable phones are machines that use processing devices (microprocessors).
A collection of circuits implementing the representation and manipulation of bits.
A collection of programs, which allow us to
control the devices, attached to it.
A collection of tools, which are designed to improve our productivity. (e.g. Calculator, clock, diary, notepad, spreadsheet, appointment scheduler, word processor)
Why Computers Needed?
Fundamental Characteristics, to Increase
Accuracy
Speed
Storage capacity
The three fundamental characteristics enable the following by-products
Increased Productivity
Efficient Decision Making
Cost Reduction
Hand over our recursive & tedious work to the computer
Typewriter Word Processor/Printer
Card file Database Management System
letter e-mail
phone dialler Communication Management program
What does a Computer do?
Input Operations
Arithmetic Operations
Logic Operations
Output Operations
Storage Operations
Input Operations
computer can accepts data & instructions.
Arithmetic Operations
Computer can process arithmetic operations such as Addition, Multiplication, Subtraction & Division
Logic Operations
Computer can perform logic operation such as
AND, OR, NOT ….
Output Operations
Computer can produce an output as a screen view, as a hard copy, as a sound output.
Storage Operations
Computer can store a large amount of data & programs permanently & perform tasks later.
Components of a Computer System – Input Units
Input units are used to feed data and instructions to the computer system.
Input units provide the interface between the outside world and the computer system for this purpose.
The most common examples for the input units are
Keyboard
Mouse
Other pointing devices.
Components of a Computer System – Output Units
The output units of a computer system are used to produce the results of the operations performed by the computer.
They are also used to output the error messages and other status of the system.
The most common examples for the output units are
Display monitors
Printers
Components of a Computer System – Internal Storage
This is also called as the main memory, and most commonly RAM (Random Access Memory).
Volatility is one of the specific features of the main storage. That is, it requires continuous supply of electrical power to retain information.
The internal store is used is used to
Receive the commands and data from the input units.
Store the information ready to be sent to the output units.
Store the currently running program(s).
Store the data required for the currently running program(s).
Store the intermediate data generated by the currently running program(s).
Components of a Computer System – External Storage
The external storage units are non-volatile.
They are used to store programs and data for future use.
They are also used when the capacity of the internal storage is insufficient to keep the currently running program(s) and the data required.
The common external storage units are
Floppy Disks
Hard Disks
CD ROMs
Magnetic Tapes
Components of a Computer System – Arithmetic & Logic Unit
Both the Arithmetic & Logic Unit (ALU) and the Control Unit of a computer system are collectively called as the Central Processing Unit (CPU) of a computer system.
When all the electronics required to implement the functions of the CPU are included in a single Integrated Circuit(IC) chip, it is called a Microprocessor.
The ALU performs all the arithmetic and logical operations required during the execution of the programs.
Components of a Computer System – Control Unit
Main function of the control unit is to issue the control signals to all the components to activate the role of each of them during the process of running a program.
It receives the individual instructions in a program one by one and then decodes them to identify the type and the sequence of the control signals to be generated.
The control unit is responsible for the overall control of the system.
Hardware, Software and Firmware
Hardware
Consists of all machinery and equipments which comprise a computer system .
All tangible items in a Computer system fall into the category of hardware.
That is, in a Computer system the hardware includes, among other devices, the Keyboard, the Screen, the Printer and the Computer or processing devices itself.
Software
Intangible in nature.
Consists of the step-by-step instructions that tell the computer what to do.
Needs some media to exist.
Runs on top of hardware making the hardware usable.
Software is divided into two basic categories
Application Software
System Software
Firmware
Inbuilt software which has been installed by the manufacture.
The permanent pieces of software which are not supposed to be altered by the users are presented in this form.
Firmware brings some flexibilities in the manufacturing process of the computer systems.
E.g. Machine-language programs stored
on ROM chip
User interacts with applications software. Systems software enables the application software to interact with the computer and help the computer to manage its internal resources.
System Software
System Software provides the interface between the hardware and the application software.
In this context it hides the hardware complexities and also brings the different hardware configurations into common platforms
Enables the Application software to interact with the computer & help it manage it’s internal resources.
System software make the hardware of the computer system accessible by the application programs and the users.
The systems software consists of several programs, one of the most important of which is the operating system. The operating system acts as the master control program that runs the computer.
Application Software
Application software may be either customized or Packaged
Customized Software
is the Software designed for a particular customer according to their needs.
Packaged Software
Also called as Software Package, is the kind of “Off-the-Shelf” program developed for the general use.
Packaged Software
Word Processing
The Most popular kind of applications program, allows a person to use a computer to create, edit, save and print documents. Used to prepare letters, memos, reports, manuscripts, etc.
E.g. Microsoft Word
Spreadsheet
Allows a person to use rows, columns and formulas to display, analyse and summarise data, mostly numerical data. Used to do budgets, sales projections, financial plans, etc.
E.g. Microsoft Excel, Lotus 1-2-3
Allows a person to use a computer to define files, records within files and data elements within records in a relatively easy manner and provide a convenient method to access, update and create reports from the data managed in multiple files. Used to manage employee lists, student list letters, etc.
E.g. Microsoft Access, dBase, SQL Server
Graphics
Allows a person to present information in the form of charts and graphics or to create complex freehand artwork. Used for presentations.
Simple graphics are provided by spreadsheet software, while others are more sophisticated s/w.
E.g. Microsoft PowerPoint, Adobe Illustrator
Communications
Allows a person to manage the transformation of data between computers over wired or wireless channels. Used for E-mail, Internet, FTP, etc.
E.g. ProComm, Smartcom, Crosstalk
Other useful Software
Personal information managers, desktop publishing, hypertext, scheduling programs.
Customised Software
Accounting, Sales and Distribution, Manufacturing, Management Sciences, Medical and Health Care, Real Estate, Personal Investor, Tax Manager, Time Scheduler, etc.
e.g. ACCOUNTING
Inventory Control
Accounts Receivable
Payroll
General Ledger
Integrated Software
Put together functions of separate software into a single software package.
Application Software Users
Individual
Disable User
Office Secretary
Classroom/Labs
Company Manager
Artwork
Research
Fishing, coastal data
Air control
Types of Processing
Data may be taken from secondary storage and processed in either of two ways
batch processing (later)
real-time processing (right now)
Batch Processing
Data is collected over several days or weeks and then processed all at one time, as a “batch”.
e.g. banks for balancing checking accounts. After all checks have been processed in a batch.
Real-time Processing
Records information immediately and responds to user requests at the time transactions occur.
e.g. when you use ATM card to withdraw cash, the system automatically computes your account balance then and there.
Storage devices in Data Processing
Storage devices can be classified into two main types
online
offline
Online Storage
Data is directly accessible for processing
Storage medium physically connected to and controlled by the central processing unit.
e.g. : Magnetic Disk, Magnetic Diskette, Optical Disk
Offline Storage devices
Data is not directly accessible for processing until tape or disk has been loaded onto an input device.
The use of removable computer media. Data not readily accessible to the CPU
e.g. : Magnetic tapes, Tape cartridges
Numbering Systems
Decimal
Binary
Octal
Hexadecimal (Hex)
Decimal Number System
Base (Radix) 10
Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
e.g. 345
Binary Number System
Base 2
Digits 0, 1
e.g. 1101
Octal Number System
Base 8
Digits 0, 1, 2, 3, 4, 5, 6, 7
e.g. 664
Hexadecimal Number System
Base 16
Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
A, B, C, D, E, F
e.g. A74D
Data Representation
How Data is Stored
BIT – B i n a r y d i g I T ( Either 0 or 1 )
Basic unit for storing data in main computer memory is the bit. A bit can represent one of only two values.
bit 0 is said to be “off”
bit 1 is said to be “on”
byte – 8 bits
Many computers use a combination of 8 bits (called a byte) as a unit for storing data.
Thus a byte is a location in the computer main memory consists of 8 adjacent bits.
When a character is entered from the keyboard, the computer interprets the character and stores it as a series of bits being “on” and “off”.
How Capacity is Expressed
Kilobyte (KB) is about 1000 bytes
1024 Bytes (2-10 bytes)
Megabyte (MB) is about 1 million bytes
1024 KB (2-20 bytes)
Gigabyte (GB) is about 1 billion bytes
1024 MB (2-30 bytes)
Terabyte (TB) is about 1 trillion bytes
1024 GB (2-40 bytes)
Data Measurement Units for Characters
American Standard Code for Information Interchange (ASCII)
Most widely used coding system to represent data.
Extended Binary Coded Decimal Interchange Code (EBCDIC)
EBCDIC is commonly used on mainframes.
Character Codes – ASCII
Numbers (0-9)
bits 5 and 6 on and bits 1-4 used based on binary number system
Letters (A-Z)
bits 7 on and bits 1-4 used based on binary number system
Number ASCII
0 0110000
1 0110001
2 0110010
3 0110011
4 0110100
5 0110101
6 0110110
7 0110111
8 0111000
9 0111001
Letter ASCII
A 1000001
B 1000010
C 1000011
D 1000100
E 1000101
F 1000110
G 1000111
H 1001000
I 1001001
J 1001010
K 1001011
L 1001100
M 1001101
N 1001110
O 1001111
P 1010000
Q 1010001
R 1010010
S 1010011
T 1010100
U 1010101
V 1010110
W 1010111
X 1011000
Y 1011001
Z 1011010
Character Codes – EBCDIC
Each 8-bit byte is divided into two portions
zone portion and digit portion
digit portion is based on the binary number system
Numbers
All zone bits “on” and binary digits
Letters (A-I)
Two zone bits (7,
“on” and binary digits
Letters (J-R)
Three zone bits (5, 7,
“on” and binary digits
Letters (S-Z)
Three zone bits (6, 7,
“on” and binary digits
Number EBCDIC
0 11110000
1 11110001
2 11110010
3 11110011
4 11110100
5 11110101
6 11110110
7 11110111
8 11111000
9 11111001
Letter EBCDIC
A 11000001
B 11000010
C 11000011
D 11000100
E 11000101
F 11000110
G 11000111
H 11001000
I 11001001
J 11010001
K 11010010
L 11010011
M 11010100
N 11010101
O 11010110
P 11010111
Q 11011000
R 11011001
S 11100010
T 11100011
U 11100100
V 11100101
W 11100110
X 11100111
Y 11101000
Z 11101001
Number Representation
Sign bit (leftmost position of the number)
0 for positive
1 for negative
Binary point (decimal point)
two ways of specifying
Fixed point number representation
Floating-point number representation
Fixed Point Number Representation
Assumes that the binary point is always fixed in one position
this method is not used in most computers
either
in the extreme left to make the stored number a fraction
or
in the extreme right to make the stored number an integer
Integer Representation
Three different ways to represent negative integer with eight bits. Most computers use the signed-2’s complement representation when performing arithmetic operations with integers.
E.g. +14 0 0001110
-14 1 0001110 (signed-magnitude)
-14 1 1110001 (signed-1’s complement)
-14 1 1110010 (signed-2’s complement)
Signed-magnitude
used in ordinary arithmetic, awkward in computer arithmetic
Signed-1’s complement
Used in some old computers, 0 has two representations (+0 and -0)
Signed-2’s complement
Formed by leaving all least significant 0’s and the first 1 unchanged and then replacing 1’s by 0’s and 0’s by 1’s in all other higher significant bits
2’s Complement Arithmetic
Does not require subtraction, only addition and complementation.
Add two numbers, including the sign bit and discard any carry out of the sign (leftmost) bit position.
E.g. 6+13, -6+13, 6-13, -6-13
+6 00000110 -6 11111010
+13 00001101 +13 00001101
________________________________________________________
+19 00010011 +7 00000111
_______________________________________________________
+6 00000110 -6 11111010
-13 11110011 -13 11110011
__________________________________________________________
-7 11111001 -19 11101101
________________________________________________________
Floating-Point Number Representation
Two parts
a signed, fixed-point number called the mantissa, which can be a fraction or an integer
the position of the decimal (binary) point called the exponent
E.g. Decimal number +6132.789 can be written as fraction +0.6132789 and an exponent +04
The radix r and the radix-point position of the mantissa are always assumed.
A floating-point binary number is represented in a similar manner except that it uses base 2 for the exponent.
E.g. The binary number 10.11
can be written as
0.1011 x 2
Word Size
Capacities of the CPU’s are expressed in terms of word size (number of characters).
A word is a group of bits that may be manipulated or stored at one time by the CPU.
Transferring data will be done in chunks of bits (e.g. 8-bit or 32-bit).
Word size can be 8-bit, 16-bit, 32-bit, 64-bit.
Register
A register is a group of flip-flops with each flip-flop capable of storing one bit of information
An n-bit register has a group of n flip-flops and is capable of storing any binary information of n-bits
Register is part of the internal storage having specified storage capacity and usually intended for a specific purpose.
Data Transmission
The conveying of data from one place for reception elsewhere by telecommunication means.
Serial Transmission
data (binary digits) can be transmitted only 1 bit at a time using only one communications line.
Parallel Transmission
sends each byte (a series of bits) simultaneously using separate lines.
Serial Data Transmission
Data Terminal Equipment (DTE)
Devices such as terminals or computers which connect to data communications equipment
Parallel Data Transmission
Signals
Binary information is represented in digital computers by physical quantities called signals.
Electronic signals such as voltages exist throughout the computer in either one of two recognisable states.
The two states represent a binary variable that can be equal to 1 or 0.
E.g. 3 volts to represent binary 1
0.5 volt to represent binary 0
Parity Bit
Binary information transmitted through some form of communication medium is subject to external noise that could change bits from 1 to 0 and vice versa.
Error detection code is a binary code that detects digital errors during transmission.
The most common error detection code used is the parity bit.
Parity bit
A parity bit is an extra bit included with a binary message to make the total number of 1’s either odd or even.
Parity odd is chosen such that the sum of 1’s in all bits is odd. I.e. if odd = 0, if even = 1
Parity even is chosen such that the sum of 1’s in all bits is even. I.e. if even = 0, if odd = 1
At the sending end the parity bit is generated and included to the message. At the receiving end parity check is applied to detect errors.
Gates
Binary logic deals with binary variables and with operations that assume a logical meaning.
The manipulation of binary information is done by logic circuits called gates.
Gates are blocks of hardware that produce signals of binary 1 or 0 when input logic requirements are satisfied.
The input-output relationship of the binary variables for each gate can be represented in tabular form by a truth table
Logic Operations
AND
OR (Inclusive-OR)
NOT (Complement)
NAND (Complement of AND)
NOR (Complement of OR)
XOR (Exclusive-OR)
Exclusive-NOR (Equivalence)
AND Logic Gate
Truth Table
A B x
________
0 0 0
0 1 0
1 0 0
1 1 1
A, B Binary Input Variables
x Binary Output Variable
OR Logic Gate
Truth Table
A B x
________
0 0 0
0 1 1
1 0 1
1 1 1
NOT Logic Gate
Truth Table
A x
________
0 0
1 1
NAND Logic Gate
Truth Table
A B x
________
0 0 1
0 1 1
1 0 1
1 1 0
NOR Logic Gate
Truth Table
A B x
________
0 0 1
0 1 0
1 0 0
1 1 0
XOR Logic Gate
Truth Table
A B x
________
0 0 0
0 1 1
1 0 1
1 1 0
Exclusive-NOR Logic Gate
Truth Table
A B x
________
0 0 1
0 1 0
1 0 0
1 1 1
Types of Computer Infestations
Virus
a program that can replicate itself by attaching itself to other programs.
Worm
a program that spreads copies throughout a network without needing a host program.
Trojan horse
like a worm, but is substituted for a legitimate program and cannot replicate itself.
What is a virus?
Program
copies itself
may modify system
may have obvious effect
may do other damage
Infecting by an Appending Virus
INSTALL.BAT
INSTALL.BAT
VIRAL.BAT
VIRAL.BAT
PROGRAM.EXE
PROGRAM.EXE
VIRAL.EXE
VIRAL.EXE
Infecting by an Insertion Virus
PROGRAM.EXE
PROGRAM.EXE
VIRAL.EXE
VIRAL.EXE
Infecting by a Replacement Virus
PROGRAM.EXE
PROGRAM.EXE
VIRAL.EXE
VIRAL.EXE
PROGRAM.COM
Virus Symptoms
Program takes longer than normal to load
Excessive disk access for simple tasks
Less memory than usual available
Files mysteriously disappear or appear
Noticeable reduction in disk space
Executed files have changed size
Files constantly get corrupted
File extensions or file attributes change without software
Bad sectors on the hard drive continue to increase
Hard disk boots but hangs before DOS prompt or Windows
A message display from virus scanner s/w
How do they get transmitted?
Boot Sector Infectors
Program/File Infectors
.exe; .com; .sys; .dll; .ovl; .mnu; .bat; .prg; .obj
.doc; .xls; .dot;
File System Infectors
Where do we get them from?
Installing infected software
Pirate software
Free software (magazines, etc.)
Internet
Email attachments
Shared documents
What are the dangers?
Trigger dates
Some viruses have trigger dates
26 April, etc. is well known
Also …
Viruses with no trigger date are 10 times more likely
Some general precautions
Educate users
Backups of all mission critical applications and data
Original source discs for all software
Disable floppy drive at boot up
Disable macros in MS Office products
General precautions – 2
Take care with Internet files
Buy and use virus scanning software
Create an integrity check and use it
Take care with Internet files
Buy and use virus scanning software
Create an integrity check and use it
Don’t assume everything is due to viruses
Antivirus (AV) Software
Norton AntiVirus by Symantec Corporation
McAfee Virus Scan by McAfee Associates, Inc.
PC-cillin II by Touchstone Software
Dr. Solomon’s Software
etc., etc.
Protecting Against Viruses
Antivirus (AV) Software
Set AV to run at Startup
e.g. AutoExec.Bat
Anti-Virus Techniques
Boot from a Floppy Disk
FORMAT A:/S
COPY AUTOEXEC.BAT CONFIG.SYS
SET COMSPEC=A:\COMMAND.COM
Write Protect Disk
Log Available Disk Space
CD\
DIR >> DIR.LOG
TYPE DIR.LOG > PRN
Same for Bad Sectors
Types of Processing
Data may be taken from secondary storage and processed in either of two ways
batch processing (later)
real-time processing (right now)
Batch Processing
Data is collected over several days or weeks and then processed all at one time, as a “batch”.
e.g. banks for balancing checking accounts. After all checks have been processed in a batch.
Real-time Processing
Records information immediately and responds to user requests at the time transactions occur.
e.g. when you use ATM card to withdraw cash, the system automatically computes your account balance then and there.
Storage devices in Data Processing
Storage devices can be classified into two main types
online
offline
Online Storage
Data is directly accessible for processing
Storage medium physically connected to and controlled by the central processing unit.
e.g. : Magnetic Disk, Magnetic Diskette, Optical Disk
Offline Storage devices
Data is not directly accessible for processing until tape or disk has been loaded onto an input device.
The use of removable computer media. Data not readily accessible to the CPU
e.g. : Magnetic tapes, Tape cartridges
Terminology
Data
Information
Database – File, Record, Field, Byte, Bit
Database System
Database Management System
Relational Database Management System
Data
Raw data which is unprocessed
Text, numbers and other symbolic representations, suitable for communication or interpretation
E.g. Sri Lanka – An island
1957 – FORTRAN was introduced
- Bachelor of Information Technology
Information
Processed data
An organised collection of facts or data
E.g. BIT – Bachelor of Information Technology, External Degree
17 – Minimum age to register for the BIT
A database is a collection of information related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection. If your database isn’t stored on a computer, or only parts of it are, you may be tracking information from a variety of sources that you’re having to co-ordinate and organise yourself.
Database
A collection of interrelated files
E.g. Course file, Student file, Results file
File
A collection of related records
E.g. BIT Courses (Modules)
IT1101: Mathematics for Computing I
IT1201: Fundamentals of Programming
……
IT2301: Database Management Systems (DBMS)
All data of the database may be in one file (simplest)
or
it may be in a number of files, depending on the way database was designed and the data subsequently represented
E.g. Student information (name, address, registration number, date of birth) and course results for each module in one file
or
Student information in one file and course results in another file
When a DBMS work with many files, they are linked together as a database, allowing to use them as a single file.
E.g. Student information and course results are linked using the student examination index number
Record
A group of related fields. Each field is a data item that is part of a large record
All the student information required for the registration process (Student surname, initials, reference number, date of birth, address, examination centre, entry requirements, registration number)
E.g. {Dias|A.B.|00A123|01/01/80|
10,Galle Rd,Colombo 3|
Colombo|O/L A/L|R001234}
Field
Represents an attribute or a characteristic or a piece of information
It is a grouping of characters into a word, a group of words (text) or a complete number (group of digits) or symbolic representation.
E.g. A.B. Dias – Name of a student
00A123 – Reference number of a student
20 – Age of a student
Byte
A single character (letter, number, symbol) is represented using a group of bits
E.g. 10101010 letter J in ASCII
Bit
The smallest unit of data
E.g. 0 or 1
Database System
A computerised record keeping system that organises data into records in one or more databases / files.
Database Management System (DBMS)
DBMS
An application software that organises data into records in one or more databases and allows organising, accessing and sorting of the data in a variety of formats.
Relational DBMS
Most common type of DBMS. Data elements are stored in different tables made up of rows and columns. Relates data in different tables through the use of common data element(s).
Types of Files
Many types of files
Program files – files containing software instructions
Data files – files that contain data
Two commonly used data files
Master file – a file containing relatively permanent records and is generally updated periodically, e.g. address-label file
Transaction file – a temporary holding file that holds all changes to be made to the master file: additions, deletions, revisions, e.g. new enrolments
Access Modes
Sequential Access
information is accessed in sequence. Sequential access storage (magnetic tape) stores data in sequence to support sequential access
Direct Access
information can be accessed directly. Direct access storage (disk) is required. Data may or may not be stored in sequence.
File Organisation
A technique for physically arranging the records of a file on secondary storage devices
Sequential file organisation
Direct / Random / Hashed file organisation
Index file organisation
index sequential file organisation
index non-sequential file organisation
Sequential file organisation
stores records in sequence, one after the other (used with magnetic tape)
Direct (random) file organisation
stores records in no particular sequence, and a record is retrieved according to its key field or unique element of data (used with hard disk)
Hashed file organisation
a direct file organisation which determines the location of the record using a hashing algorithm
Index
a table or other data structure used to determine the location of records in a file that satisfy some condition
Indexed file organisation
stores records either in sequence or non-sequence. However, the file in which the records are stored contains an index that lists each record by its key field and identifies its physical location on the disk. (require magnetic disk)
Indexed sequential file organisation
stores records in sequential order and an index is created to locate individual records
Indexed non-sequential file organisation
stores records in non-sequential order and an index is created to locate individual records
Key Field
An important concept in data organisation is the key field.
Key field is a particular field that is chosen to uniquely identify a record so that it can be easily retrieved and processed.
The key field is often a number, e.g. an identification number (NID), customer account number, employee number
Primary characteristics of the key field is that it is unique
Keys
Two types of keys
Primary key and Secondary Key
Primary Key
One field or a combination of fields that uniquely identifies a record
Primary key can be natural (a field(s) of the record is usable as the primary key; e.g. NID of person) or user defined (a new field is introduced as the primary key; e.g. empno of an empoyee)
Secondary Key
One field or a combination of fields for which more than one record may have the same combination of values
indexed files are used for this purpose
multiple indexes can be created for a single file
Examples of Databases
Three general types:
personal, public and company
Personal (microcomputer) database
consists of integrated files on a microcomputer hat is used mainly by one person. It is a stand-alone database that not on-line
e.g. Paradox, Access, dBASE, FoxPro, Alpha Five,
FileMaker Pro, Approach
Public database
an enormous compilation of data, any part of which is available for a fee to the public
e.g. Lexis for lawyers, news, weather, travel
Company database
a collection of records shared throughout a company or other database. Generally records are private. It may be located in one place (centrally) or may be distribute
e.g. multi-user RDBMS such as Oracle, MS-SQL
Traditional File Environment
Origins goes back to 1950s when traditional file management systems were used.
is a way of collecting and maintaining data in an organisation that leads to each functional area or division creating and maintaining its own data files and programs
Payroll, Personnel, Benefit divisions maintaining their own data files and programs
Types of Database Organisations
Many types of Database organisations have been used to manage databases (e.g. hierarchical, network, relational, object-oriented, object-relational)
Relational DBMS is the most widely used type of database organisation
Relational DBMS
relates or connects, data in different files through the use of a key field or common data element
Advantages of DBMS
over the traditional file management systems
Sharing of data – same information is available for different users
Economy of files – less data redundancy (excess storage of data)
Data integrity – consistent data
Security – specific data can be limited to selected users
Flexibility – can respond to unanticipated information requirements in a timely fashion.
Relational Data Model
Relational model was proposed during the same period (1970)
but took some time for acceptance
delay in emergence of commercial products
e.g. INGRES, Oracle, System R (late 70s)
Became dominant due to the complexity of programming, navigating and changing data structures in the older DBMS data models
Used non-procedural (declarative and non-navigational) language, e.g. SQL
The relational model of data has three major components:
Relational database objects
Relational operators
Relational integrity constraints
The Relational Objects
Table
A table is a collection of data about a specific topic, such as employees or suppliers. Using a separate table for each topic means you store that data only once, which makes your database more efficient and reduces data-entry errors. Tables organise data into columns (called fields) and rows (called records).
Data is presented to the user as tables
Tables are comprised of rows and a fixed number of named columns.
Columns are attributes describing an entity. Each column must have an unique name and a data type.
Rows are records that present information about a particular entity occurrence
Within the database, divide your data into separate storage containers called tables; view, add, and update table data using online forms; find and retrieve just the data you want using queries; and analyse or print data in a specific layout using reports
Each table has a primary key. The primary key is a column or combination of columns that uniquely identify each row of the table.
A foreign key is a set of columns in one table that serve as the primary key in another table
data in different tables are related or connected through the use of a foreign key field or common data element
To store your data, create one table for each type of information you track. To bring the data from multiple tables together in a query, form, or report, you define relationships between the tables.
Index
An ordered set of pointers to the data in the table
A primary key must always have a unique index
Relational Operators
Relational operations are specified using Structured Query Language (SQL) — a standard for relational database access.
Relational operations are set level, meaning that they operate on multiple rows, rather than one record at a time.
SQL is non-procedural, meaning that the user specifies what data is to be retrieved rather than how to retrieve the data.
Each operator takes one or more tables as it operand(s) and produces a table as its result.
Any column value in a table can be referenced, not just keys.
Operations can be combined to form complex operations.
Relational Integrity Constraints
User defined integrity constraints can be enforced by the database server using triggers and stored procedures.
Stored procedures are explicitly executed (i.e. called) by a client application. They are useful for encapsulating application logic in the database server:
Triggers are implicitly executed by the database server when a DELETE, UPDATE or INSERT SQL command is issued. They are useful for enforcing user defined integrity constraints.
Setting up a Database
Determine the DBMS and storage environment
Design the database and determine its name (filename for personal database)
Define the data and build the data dictionary
Create the database (keys, indexes, constraints, users, access rights) using the software
Enter and edit data (use forms)
Make views, queries, reports and labels
Build application programs
Designing the Database
Determine the contents of the database
Determine what data is needed and the best way to organise it
Determine the tables and their fields
Determine the primary key
Define the data
Define the field names, their type and width
Field name is the name that describes the data to be entered in a field, e.g. emp_no
Field type defines the type of data that will be stored in a field
alphanumeric, numeric, date, logical, memo
Field width has a defined limit on the number of characters it can hold (e.g. 255)
Numeric data may specify the number of decimal places
Naming Fields
Can be up to 64 characters long.
Can include any combination of letters, numbers, spaces, and special characters except a period (.), an exclamation point (!), an accent grave (`), and brackets ([ ]).
Can’t begin with leading spaces.
Can’t include control characters (ASCII values 0 through 31).
Include spaces in field names can produce naming conflicts in Visual Basic for Applications in some circumstances.
To avoid unexpected results is to always use the ! operator instead of the . (dot) operator to refer to the value of a field.
e.g. [TableName]![FieldName]
Define the data type
Alphanumeric (String) fields [TEXT, CHAR, VARCHAR]- consists of letters, numbers and special characters; you can’t perform numerical calculations using these fields
Numeric fields [NUMBER, INTEGER, DECIMAL, FLOAT]- consists of numbers for calculations; you can’t store text in these fields
Currency fields [CURRENCY, MONEY]- prevent rounding off during calculations numbers
Date fields [DATE/TIME, DATE]- consists of day, month, year
Logical fields [TRUE/FALSE, LOGICAL]- consists of two states (true/false; yes/no; on/off)
Sequence fields [AutoNumber]- Unique sequential (incrementing by 1) or random numbers automatically inserted when a record is added.
Memo fields [MEMO]- consists of lengthy amounts of text and numbers, such as notes or descriptions
Binary fields [OLE Object, RAW]- binary data such as images
OLE Object – Objects (such as Microsoft Word documents, Microsoft Excel spreadsheets, pictures, sounds, or other binary data), created in other programs using the OLE protocol, that can be linked to or embedded in a Microsoft Access table
Hyperlink – Field that will store hyperlinks to access web pages
Lookup Wizard – Creates a field that allows you to choose a value from another table or from a list of values using a combo box. Choosing this option in the data type list starts a wizard to define this for you.
Data Types and Limits
Data type Size
Text Up to 255 characters.
Memo Up to 64,000 characters.
Number 1, 2, 4, or 8 bytes.
Date/Time 8 bytes.
Currency 8 bytes.
AutoNumber 4 bytes.
Yes/No 1 bit.
OLE Object limited by disk space
Hyperlink Up to 64,000 characters.
Lookup Wizard 4 bytes.
Predefined Data Type Formats
Number
Setting Data Display
General Number –3456.789 –3456.789
Currency –3456.789 ($3,456.79)
Fixed –3456.789 –3456.79
Standard 3456.789 3,456.79
Percent 0.45 45%
Scientific –3456.789 –3.46E+03
Date/Time
Setting Display
ddd”, “mmm d”, “yyyy Mon, Jun 2, 1997
mmmm dd”, “yyyy June 02, 1997
”This is week number “ww This is week number 22
”Today is “dddd Today is Tuesday
Yes/No
display in place of Yes, True, or On values
display in place of No, False, or Off values
Text / Memo
Symbol Description
@ a character or a space is required.
& Text character is not required.
< Force all characters to lowercase.
> Force all characters to uppercase.
You can also create a custom display format for all data types except the OLE Object data type
Selecting the Data Type
Minimise storage space
decide on the storage space required to use for values in the field, e.g. 2 byte integers for marks
Represent all possible values
eliminate illegal values, e.g. can’t store text in numeric fields
Improve data integrity
further restrict possible values, e.g. marks > 0
Support all data manipulations
e.g. numeric for arithmetic calculations; sorting, grouping, indexing operations
Creating a Database
Choose file, new database or choose the file new database button in the toolbar
Choose blank database and choose ok
In the save in list box, select the desired drive & folder
Enter the file name & select create
Database window
The window that appears when you open a Microsoft Access database. It contains Tables, Queries, Forms, Reports, Macros, and Modules tabs that you can click to display a list of all objects of that type in the database.
Create a table
In database window click ‘table’ tab & choose new
Select design view & click ok
Enter field names & field types
Apply the primary key (if you want)
Close & save the table
Datasheet View • Design View
Table Wizard • Import Table
Link Table
Datasheet View
Enter data directly into a blank datasheet. When you save the new datasheet, Microsoft Access will analyse your data and automatically assign the appropriate data type and format for each field. Data from a table, form or query is displayed in a row-column format.
In table Datasheet view, you can add, edit, or view the data in a table. You can also check the spelling and print your table’s data, filter or sort records, change the datasheet’s appearance, or change the table’s structure by adding or deleting columns
Design View
Use Design view to specify all of your table details (field names, data types, primary key) from scratch.
In table Design view, you can create an entire table from scratch, or add, delete, or customise an existing table’s fields.
Relationships
An association established between common fields (columns) in two tables.
A relationship can be
one-to-one,
one-to-many, or
many-to-many.
A one-to-many relationship
The most common type of relationship.
A record in Table A can have many matching records in Table B, but a record in Table B has only one matching record in Table A.
A many-to-many relationship
A record in Table A can have many matching records in Table B, and a record in Table B can have many matching records in Table A.
It is really two one-to-many relationships with a third table.
A one-to-one relationship
Each record in Table A can have only 1 matching record in Table B, & each record in Table B can have only 1 matching record in Table A.
This type of relationship is not common. You might use it to divide a table with many fields, to isolate part of a table for security reasons, or to store information that applies only to a subset of the main table.
Define Relationships
The kind of relationship depends on how the related fields are defined:
A one-to-many relationship is created if only one of the related fields is a primary key or has a unique index.
A one-to-one relationship is created if both of the related fields are primary keys or have unique indexes.
A many-to-many relationship is really two one-to-many relationships with a third table whose primary key consists of two fields – the foreign keys from the two other tables.
After you’ve set up different tables for each subject in your database, you need a way of telling how to bring that information back together again.
The first step in this process is to define relationships between your tables.
After you’ve done that, you can create queries, forms, and reports to display information from several tables at once.
You define a relationship by adding the tables you want to relate to the Relationships window, and
then dragging the key field from one table and dropping it on the key field in the other table.
Integrity Controls
Restrict Update, e.g. a customer ID can only be deleted if it is not found in Order table
Cascaded Update, e.g. changing a customer ID will result in that value changing to match in the Order table
Set Null Update, e.g. when a customer ID is changed, any customer ID in the Order table which matches the old customer ID is set to NULL
Similar integrity controls can be defined for Delete
Appending, Updating Records
Once tables and views have been created, it is necessary to populate them with data and maintain those data before queries and reports can be written
Use Datasheet or Form view
Datasheet
Form View
Form view is a window that usually displays one or more whole records. Form view is the primary means of adding and modifying data in tables.
To easily view, enter, and change data directly in a table, create a form. When you open a form, Microsoft Access retrieves the data from one or more tables and displays it on screen using the layout you chose in the Form Wizard or using a layout that you created from scratch.
Form View
Forms focus one record at a time, and they can display fields from multiple tables, pictures, and more.
Query
To find and retrieve just the data that meets conditions you specify, including data from multiple tables, create a query. A query can also update or delete multiple records at the same time, and perform built-in or custom calculations on your data.
You use queries to view, change, and analyse data in different ways. You can also use them as the source of records for forms and reports.
Query-By-Example (QBE)
By using a query we can select the records for a given condition(s)
QBE is the most widely available direct-manipulation database query language.
It is not an international standard like SQL
It is easy to learn for wide variety of people wanting to make inquires against a database
Database systems like Microsoft Access, translate QBE queries into SQL
Create a Query
In the database window click the ‘Query’ tab & choose New
Select design view & click ok
Select the table or query that you want
Attach the field names with criteria (if any)
close & save the Query
There are several types of queries
Select query (Simple/Single-table / Multiple-table)
Cross tab query
Parameter query
Self-join Query Query based on another query
Others
SQL query
(union, pass-through, data-definition, sub-query)
Action query
(make-table, delete, append, update)
Auto Lookup query
Simple query
Single Table
Selected Columns
Selected Rows (Filter using criteria)
Sort order
Multiple-table query
Cross tab query
calculate a sum, average, count, or other type of total for data that is grouped by two types of information
— one down the left side of the datasheet and another across the top.
Cross tab query
You create a crosstab query with a wizard or from scratch in the query design grid. In the design grid, you specify which field’s values become column headings, which field’s values become row headings, and which field’s values to sum, average, count, or otherwise calculate.
Parameter query
Displays one or more predefined dialog boxes that prompt you for the parameter value (criteria). You can also create a custom dialog box that prompts for the query’s parameters.
Action query
An action query is a query that makes changes to many records in just one operation.
There are four types of action queries: delete, update, append, and make-table.
Delete query
Deletes a group of records from one or more tables.
E.g. remove products that are discontinued.
Update query
Makes global changes to a group of records in one or more tables.
E.g. raise prices by 10 percent for all dairy products.
Append query
Adds a group of records from one or more tables to the end of one or more tables.
E.g. suppose that you acquire some new customers and a database containing a table of information on those customers (Germany Customers). To avoid typing all this information in, you’d like to append it to your Customers table.
Append queries are also helpful for:
Appending fields based on criteria.
E.g. you might want to append only the names and addresses of customers with outstanding orders.
Appending records when some of the fields in one table don’t exist in the other table.
E.g. Customers table has 11 fields. Suppose that you want to append records from another table that has fields that match 9 of the 11 fields in the Customers table. An append query will append the data in the matching fields and ignore the others
Make-table queries
Make-table query
Creates a new table from all or part of the data in one or more tables.
Make-table queries are helpful for:
Creating a table to export to other databases.
E.g., you might want to create a table that contains several fields from your Employees table, and then export that table to a database used by your personnel department.
Make-table queries are helpful for:
Creating reports that display data from a specified point in time.
E.g., suppose you want to print a report on 15-May-01 that displays the first quarter’s sales totals based on the data that was in the underlying tables as of 9:00 A.M. on 1-Apr-01.
To preserve the data exactly as it was at 9:00 A.M. on 1-Apr-01 , create a make-table query at that point in time to retrieve the records you need and store them in a new table. Then use this table, rather than a query, as the basis for the reports.
Make-table queries are helpful for:
Making a backup copy of a table.
Creating a history table that contains old records.
E.g., you could create a table that stores all your old orders before deleting them from your current Orders table.
Make-table queries are helpful for:
Improving performance of forms and reports based on multiple-table queries.
E.g. suppose you want to print multiple reports that are based on a five-table query that includes totals. You may be able to speed things up by first creating a make-table query that retrieves the records you need and stores them in one table. Then you can base the reports on this table, so you don’t have to rerun the query for each report.
Auto Lookup queries
You can design a multiple-table query to automatically fill in certain field values for a new record. When you enter a value in the join field in the query or in a form based on the query, Microsoft Access looks up and fills in existing information related to that value.
E.g. if you know the value in the join field between a Customers table and an Orders table (typically, a customer identifier such as CustomerID), you could enter the customer ID and have Microsoft Access enter the rest of the information for that customer (Customer Name, Address). If no matching information is found, Microsoft Access displays an error message when the focus leaves the record.
Reports
To analyse your data or present it a certain way in print, create a report. E.g., you might print one report that groups data and calculates totals, and another report with different data formatted for printing mailing labels. Charts can be inserted in reports.
A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can display the information the way you want to see it.
Most of the information in a report comes from an underlying table, query, or SQL statement, which is the source of the report’s data. Other information in the report is stored in the report’s design.
Charts
In most cases, you use the Chart Wizard to create a chart. The Chart Wizard will determine from the data you specify whether it should display data from all fields in one global chart, or whether it is more appropriate to show a record-bound chart, so that when you move from record to record you see a chart that represents only the data in the current record.
Chart Wizard
Choose a table or query and its fields.
Choose a chart that will appropriately display the fields selected
Forms
You can use a form for a variety of purposes:
data-entry, dialog box, switchboard
Most of the information in a form comes from an underlying record source. Other information in the form is stored in the form’s design.
You create the link between a form and its record source by using graphical objects called controls. The most common type of control used to display and enter data is a text box.
Sub-Forms
A subform is a form within a form. The primary form is called the main form, and the form within the form is called the subform. This type of forms is used to display the master and detail records.
A form/subform combination is often referred to as a hierarchical form, a master/detail form, or a parent/child form.
The main form and subform in this type of form are linked so that the subform displays only records that are related to the current record in the main form.
For example, when the main form displays the Beverages category, the subform displays only the products in the Beverages category.
A subform can be displayed as a datasheet, as in the preceding illustration, or it can be displayed as a single or continuous form.
A main form can only be displayed as a single form.
A main form can have any number of subforms if you place each subform on the main form.
You can also nest up to two levels of subforms. This means you can have a subform within a main form, and you can have another subform within that subform.
For example, you could have a main form that displays customers, a subform that displays orders, and another subform that displays order details.
Sorting
Arrange the records in given order (Ascending, descending), using of one or more key fields.
Eg. Department name
Salary within Department name
Sort order
The order in which records are displayed – either ascending (A to Z or 0 to 100) or descending (Z to A or 100 to 0).
You can sort records in Form view of a form or subform, or in Datasheet view of a table, query, form, or subform, even if a filter is already applied.
You can also sort filtered data by specifying a sort order in the Advanced Filter/Sort window, or sort a query’s results by specifying a sort order in query Design view.
Filtering
A set of criteria applied to records in order to show a subset of the records.
Select the records for given condition(s).
E.g. Employees in ‘Computer’ Department
Employees who are earning more than “$800”
Microsoft Access has four kinds of filters: Filter By Selection, Filter By Form, Advanced Filter/Sort, and Filter For Input.
A window in which you can create a filter from scratch.
You enter criteria expressions in the filter design grid to restrict the records in the open form or datasheet to a subset of records that meet the criteria.
You can also specify a sort order on one or more fields in the design grid.
Introduction to Macros
A macro is a set of one or more actions that each perform a particular operation, such as opening a form or printing a report.
Macros can help you to automate common tasks.
e.g., you can run a macro that prints a report when a user clicks a command button.
Enter the actions you want to carry out
Action arguments (object name, data to use, filter name, condition)
Introduction to Modules
A module is a collection of logically related program statements (e.g. Visual Basic for Applications declarations and procedures) that are stored together as a unit.
Each module has only a single function, which limits the module’s size and complexity.
Each procedure in a module can be a Function procedure or a Sub procedure
Class Modules
Form and report modules are class modules that are associated with a particular form or report.
Form and report modules often contain event procedures that run in response to an event on the form or report.
You can use event procedures to control the behavior of your forms and reports, and their response to user actions such as clicking the mouse on a command button.
Standard Modules
Standard modules contain general procedures that aren’t associated with any other object and frequently used procedures that can be run from anywhere within your database.
Introduction to Wizards
Wizard is a tool that help the user to do specific tasks
It asks you questions and take you through the process step by step, using dialog boxes
It creates an object according to your selections.
e.g. you can create a table using the Table Wizard
i.e., choose the fields for your table from a variety of sample tables and sample fields such as business contacts or household inventory.
Prototyping Database Applications
A prototype database application, including database design, tables, menus, forms, queries and reports can be created using its application development environment.
To build a robust application macros needs to be converted to modules (e.g. access macros to VBA modules)
Need to accomplish complex functionality, include error handling, easier maintenance and more program control.
Multimedia
Multimedia refers to technology that presents information in more than one medium, including text, graphics, animation, video, music and voice
A single digital presentation can contain all media
Multimedia have added greater depth and variety to presentation
Multimedia Features
Text
Colour
Powerful Graphics
Animation
Sound (Stereo)
Video
Voice
Music
Allow users to play games or perform interactive learning
Interactive – user controls the direction of a program or presentation on the storage medium
1st multimedia PC introduced in 1991
Multimedia PC (MPC)
MPC machine is a multimedia personnel computer that adheres to standards set by the Multimedia PC (MPC) Marketing Council.
The council is made up of h/w and s/w companies including Intel, Microsoft, IBM, NEC, and Fujitsu.
The MPC Marketing has published standards for multimedia PC h/w specifications which is an extension of a desktop PC configuration.
(e.g. MPC Level 1 in 1990, MPC Level 2 in 1993)
Requirements for Multimedia Applications
Processor RAM
Colour Display Pointing Device
Keyboard CD-ROM drive
Sound Board Hard-disk drive
Floppy-disk drive Ports
Software
Processor
The central processor has a numerical name that indicates the basic type (e.g. Pentium) and speed of the processor (e.g. 200MHz)
The more powerful the processor, the faster the multimedia computer will respond.
Random Access Memory (RAM)
It is the main memory at the heart of the computer in which multimedia programmers execute. RAM is measured in megabytes (MB).
Since multimedia objects are big, 32 MB minimum required. 64 MB Works well.
64 MB or 128 MB recommended for the large programmers like windows 2000 and for quick hype.
Colour Display (Monitor)
Produce video output that include Colour, Graphics, Animation and Video
Digital video /graphics adapter is used for video output
14” colour monitor is good for multimedia with 640 x 480 pixels on the screen.
Colour Display: Most important is the number of colours the system unit can display.
SVGA monitor can display 256 simultaneous colours chosen from more than 16 million colours.
Pointing Device
The mouse is the pointing device on multimedia computers and is used to engage the interactive parts of the multimedia program.
Mouse pens which let you write with stylus instead dragging the mouse, trackballs, which lets you spin a ball track point mounted in the center of the keyboard on IBM notebook computers.
Other Hardware
Standard Key-board (e.g. 101-key keyboard) and two-button mouse.
Multimedia Tools and Devices
They give the multimedia computer the ability to make sound play music and record movies.
CD-ROM Drive
Audio-input devices and output
Video-input devices and output
Electronic cameras
CD–ROM Drive
Early CD–ROM drives could need computer data but did not have audio circuitry needed to make sound.
Triple and quadruple speed CD–ROM is an evolving technology that keeps improving. 48x drives are common now 50x speed drives too.
Digital Audio
Multimedia computer requires waveform audio to record and play back waveform digital audio files
16-bit sound card produces a dynamic range to 50dB whereas 32-bit sound card increases the dynamic range to 98dB (dB = decibel, a measurement of loudness )
The greater the dynamic range the more faithful sound reproduction
A sound board (e.g. AdLib, Microsoft Windows Sound System, Sound Blaster Pro) works with both digital and synthesized sound.
Digital sound: a sound boards converts analog sound (e.g. microphone) into digital. When play back through speakers and headphones, it converts digital sound into analog
Synthesized sound is created by the computer to simulate sound of music instruments
Audio Output
A pair of audio speakers to listen the stereo sound
Sound output is through a digital audio card
Speakers or headphones are used for Audio output.
The audio output types are sound, voice, and music.
MIDI
Musical Instrumental Digital Interface (MIDI) was invented to provide a means for music keyboards synthesizers and computer to communicate with each other.
MIDI synthesizer or keyboard purchased follows general MIDI specifications which standardize the set instrumental sounds MIDI device produce.
Unlike waveform data which stores actual digitized sound, a MIDI file contains a series of 3-Byte key-on and key-off messages.
Conventional MIDI system, Cassette deck, CD Player, Keyboard instruments and microphone can be used for audio input.
Using an audio board or a MIDI board analog sounds from these devices are digitised.
Digital Video
It is a combination of sound, video and animation.
This requires a massive disk space, faster drives and processors because video play back has to be done at 30 frames per second to achieve the TV quality.
Use software (e.g. MS video for windows) to display digital movie clips and use frames grabber cards to convert video footage to digital files.
Video Input
Conventional VCR and Camcorder (still-video camera) can be used for video input
Image Scanner can be used to input text and images
Using a video card (frame-grabber card or full-motion video card) analog signals from these devices are converted to digital form.
Users / Applications
Use is becoming more common in business, the professions and entertainment, education, training, sales presentations as a means of improving the way information is communicated
Used by telephone, cable, broadcasting and entertainment companies
Various kinds of information and entertainment are delivered to homes through wired and wireless communication lines
Multimedia Applications
Home/library Education Business Government
Education Interactive
Learning Training Public information
Access
Information Simulation Education Department
Information
Entertainment Reference Retail Sales Tourism
Reference Simulation visual
Audio catalogues
Business
Presentations Surveys
Introduction to CAD/CAM
Computer-Aided Design (CAD) and Computer-Aided Manufacturing (CAM) are widely used in manufacturing industries for both design and manufacturing tasks
Introduction to CAD
Engineers, architects and other designers use the computer to assist in designing products and structures by generating drawings objects on a graphic display screen and then manipulating them until a final design is obtained.
One of the first applications of CAD was to automate the drafting process, which is the process of creating drawings of products.
Special terminals with very high resolution graphics are used to produce drawings of products they are designing.
On the terminal the user has options
of moving the drawing,
turning it to see all aides,
changing its size or perspective,
enlarging a portion of it to display more details,
and other options as well.
In most cases, hard copy can also be produced.
The designer can easily make changes to the design without having to completely redraw the entire drawing.
Changing the design which once required hundreds of engineers and drafting hours, now can be done in a second.
Basic Features of CAD
Technology allows three-dimensional objects to be displayed in a wide variety of colours.
The objects may then be turned, rotated or displayed in a variety of sizes or angles.
Furthermore, using mathematical modelling, the engineer can subject the object to mechanical stresses, heat, motion and pressure, and observe the results on the graphic terminal display.
CAD programs allows users to do “what if” overhauls of designs using parametric.
Provide layers like transparent and overlapping sheets.
Allow automatic dimensioning and ensure greater accuracy than traditional hand-drafting methods.
Applications of CAD
Computers and computer graphics are being used to design products ranging from automobiles and aeroplanes to buildings and electronic circuits.
E.g. Designing shock absorbers
The shock absorber and wheel are drawn by a computer program. The program can then simulate the wheel and tire moving on different surfaces and watch the effect the movement will have on the shock absorber and tire. Better designs are developed faster and less expensively using modelling and simulation capabilities.
E.g. Designing yours office
Start by measuring your office space and enter the dimensions into the program to create a diagram of the exterior walls.
Next, add panels to divide the space into cubicles or work areas.
Now you are ready to furnish your new spaces using nearly 200 symbols representing desks, tables, chairs, computers, even plants.
Each symbol can be labelled for a particular occupant, department, manufacturer, price and size
When finished, you can give the diskette or print to your architect or builder to modify into working drawings or create lists of furniture and equipment to be purchased.
E.g. Automobile break assembly
A designer can draw in three-dimensions and rotate the figure on the screen and view the break system
E.g. Monitoring Pressure / Depth
Use of colour and three-dimensional effect with high resolution graphics allows intricate and complicated drawings to be placed on the computer screen.
CAD Programs
E.g.
Autosketch EasyCAD2
TurboCAD
These programs include libraries of options such as
- cabinetry, furniture, fixtures for office designs
- trees, shrubs and vegetables for landscaping designs
CADD
Application programs that helps people to do drafting is called Computer-Aided Design and Drafting (CADD)
E.g.
AutoCAD Microstation
These programs include symbols (points, circles, straight lines, arcs) that help the user put together graphic elements, such as the floor plan of a house
Applications for Professionals
Architects
Plan views, elevations, sectional elevations, perspectives, 3D rendering and walkthrough
Civil Engineers
Structural drawings, plumbing, mapping, highway, contouring
Surveyors
Plotting survey plans, longitudinal and cross sections, contouring, mapping
Electrical Engineers
Control schematics, connection diagrams, printed circuit boards
Electronic Engineers
Schematic diagrams, printed circuit boards
Mechanical Engineers
Machine design, processes, sheet metal layouts, tooling and fixtures, robotics, plant layout
Introduction to CAM
CAD/CAM software allows products designed with CAD to be input into an automated manufacturing system that makes the product.
The manufacturing process is done by robots under the control of computers.
Industrial robots are machines, operating under the control of a computer and related software, that are designed to perform repetitive manufacturing and operational tasks required by a company.
e.g. welding, drilling and material handling
Features of CAM
Robots are ideal for performing repetitive tasks, hours after hours, in a hostile environment, with the last operation being performed using the same precision as the first.
Robots are equipped with arms, hands, optic sensors, etc.
Robots are used for a variety of tasks which either can be performed by a robot more precisely and with more consistency than a human being can perform them, or which are performed in an environment which may endanger the health of a person.
Applications of CAM
E.g. Manufacturing Automobiles
design the manufacturing process of an automobile and use robots for welding of moving car bodies in automobile industry
E.g. Manufacturing Electronic Circuits
Design electronic circuit boards and using a moving robot arm, place electronic components on a printed circuit board
E.g. Manufacturing Garments
Design the garments for the fashion industry. Input designs and specifications into CAM system that enable robot pattern-cutters to automatically cut thousands of patterns from fabric, with only minimal waste.
Introduction to PC Networks & Internet
Evolution of Networks Pre-Network Environment
All Computers were big, expensive, and difficult to maintain.
Concept of Computer Centre.
Manual method for transportation of data.
Multi-user systems
Number of terminals attached to the same computer.
Remote terminals connected through telecom links
First step in the integration of communications and computers
Evolution… – Islands of Automation
Use of ICs in producing computers made them
less expensive
smaller in size
specialized in usage.
Large organizations became able to procure different computers for their different divisions such as accounts, engineering, sales, etc.
This paved the way to realize the need of getting them interconnected.
Evolution … – Early Computer Networks
Proprietary nature.
Made the purchasers married to one brand
Inter-operability among the different brands was not addressed.
Evolution … – ARPANET
Advanced Research Project Agency Network.
Originated by the Defense Department of United States.
To interconnect the computing facilities then available at the government institutions of the United States.
Could interconnect the computers of different brands.
Introduction of TCP/IP (Transfer Control Protocol/Internet Protocol).
ARPANET is the root of the today’s Internet.
Evolution… – Heterogeneous Networks
Development of Interoperability standards
Computers moving data quickly between dissimilar computers
Evolution of Networks – Global Networks
The Internet.
Networks used by Banks.
Networks used by Airlines.
Networks used by Multinational companies.
The Concept of Networking
The idea of networking has been around for a long time and has taken on many meanings. If you were to look up “network” in your dictionary, you might find any of the following definitions:
An openwork fabric; netting
A system of interlacing lines, tracks, or channels
Any interconnected system; for example, a television-broadcasting network
A system in which a number of independent computers are linked together to share data and peripherals, such as hard disks and printers
Introducing Computer Networking
At its most elementary level, a computer network consists of two computers connected to each other by a cable that allows them to share data.
Computer networking arose as an answer to the need to share data in a timely fashion.
Personal computers are powerful tools that can process and manipulate large amounts of data quickly, but they do not allow users to share that data efficiently.
When they are used without networking, it is known as “working in a stand-alone environment.”
Sharing of Information among the Stand-alone computers
Types of Computer Networks
Computer networks are classified into one of two groups, depending on their size and function.
A local area network (LAN) is the basic building block of any computer network. A LAN can range from simple (two computers connected by a cable) to complex (hundreds of connected computers and peripherals throughout a major corporation).
The distinguishing feature of a LAN is that it is confined to a limited geographic area.
A Wide Area Network (WAN), on the other hand, has no geographical limit.
It can connect computers and other devices on opposite sides of the world.
A WAN is made up of a number of interconnected LANs. Perhaps the ultimate WAN is the Internet.
Why Use a Computer Network?
With the availability and power of today’s personal computers, you might ask why networks are needed. From the earliest networks to today’s high-powered Personal Computers, the answer has remained the same: networks increase efficiency and reduce costs. Computer networks achieve these goals in three primary ways:
Sharing information (or data)
Sharing hardware and software
Centralizing administration and support
Network Applications
Traditional Network Applications
Telnet
Users desiring to connect to a remote system and interact with any of the various servers on a remote system can use the Telnet command.
Rlogon
Users desiring to run commands interactively on a remote computer can use this facility which enables the user to logon to the remote system.
FTP
Transferring of files among the remote systems are enabled through FTP.
E-mail
Enables the users to send messages to the others without sender knowing where the receiving host is.
Modern Network Applications
Most of the currently used applications on the networks are based on the WWW platform.
PC Networking Environment…
PC networks are formed by interconnecting PCs into a Local Area Network.
Each PC should consists of a Network Interface Card.
The port available on the Network Interface Card is used to connect the PC onto the cabling system forming the network.
The peripheral devices attached to the PCs can be shared on this kind of networks.
Servers — Computers that provide shared resources to network users.
Clients — Computers that access shared network resources provided by a server.
Media — The wires that make the physical connections
Shared data — Files provided to clients by servers across the network.
Shared printers and other peripherals — Additional resources provided by servers.
Resources — Any service or device, such as files, printers, or other items, made available for use by members of the network.
Two Broad Categories of Networks
Peer-to-peer Network
Server-based Network
Other Networking Devices
Modem – A device used to provide remote connectivity over the Telephone lines.
Routers – Used to connect one LAN to another or to connect a LAN to the Internet.
PC Communications Process
A PC can send data to and receive data from other computers using PC Communications s/w.
The steps in the communications s/w process:
Connect
Dial up
Handshake and log on
File transfer
Disconnect
Connect
open the phone line circuit and get a dial tone
Dial up
Place a call to the host computer
Handshake and log on
make the connections and establish a session
File transfer
send or receive data to or from the host computer
Disconnect
hang up the phone line and reset the communications software to place or receive the next communication
What is the Internet ?
The Internet is a worldwide collection of computer networks, cooperating with each other to exchange information using a common software standard.
Through telephone lines, satellite links and the other data cables the networks and the computers on the Internet are connected together.
The Internet’s basic job is to organize and share information between computers, regardless of the …..
Location
Computer
Information
Transmission
Software
People Use the Internet to :
Publish information
Get information
Buy things
Kind of Information are Available
Text documents
Graphics files (digitized photographs and artwork)
Sound and video files
Downloadable software
etc.
Internet Services
Email
Audio
Video
User groups
World Wide Web
Conferencing
Bulletin Boards
Virtual Reality
World Wide Web
Web Page – A file that contains text, images, etc. and the links to the other pages, sites, etc.
HTML – Hyper Text Markup Language, the language that describes how a page should be formatted.
Web Browser – The piece of software that pulls the requested page from the Web Server and it interprets the HTML code and displays the page on the client computer.
Web Server – The computer system which has the necessary hardware and software to hold the web pages and to respond to the requests.
URLs “Internet Address”
Uniform Resource Locator (URL) is the Internet address of the web page requested.
http://www.lk
The address of the Sri Lanka web site
http://www.microsoft.com
The address of the Microsoft web site.
http://www.ict.cmb.ac.lk
The address of the ICT web site
Controls on Web Pages
Browser tools help you navigate around the Web.
moving back and forth between pages
A “Bookmark” list, “favorites” list or “hotlist”
lets you save the names and locations of favorite sites for easy reference
The Uniform Resource Locator (URL) is the address of a Web site.
Some Web pages contain special graphic buttons that, when clicked, take you to another resource as would a regular hotlink.
Hypertext hotlinks are connections to other pages and resources.
To contact the author or sponsor of a Web site, most contain one or more E-mail links.
Most Web pages use several applets, or small program segments run by Java, ActiveX or some other protocol.
Applets are downloaded when you access a Web site, and run only as long as you remain at that location.
Applets can perform a variety of functions.
Internet Browsers
Browsers provide viewing of html’s, photo’s, graphics, email programs, and news groups.
Netscape
Internet Explorer
What browsers do!
You ask something.
Browser tells other computer what you want.
Other computer responds.
Browser receives and displays.
Navigating with a Browser
Moving from page to page in the Web is called navigating.
A page created putting the introducing information of a particular organization, company or a person is called the home page.
From the current page you can move onto another page using a feature called links.
When you pass your mouse pointer over a link on the current page, it automatically changes to a hand symbol. If you click the mouse button at this instant the new page pointed by that link will be displayed.
Introduction to C++
C++ is totally an object-oriented programming language which was developed by Bijarne Stroustrup USA in the early 1980’s.
C++ is basically an extension of C with a major addition of the class construct feature.
The object-oriented features in C++ allow programmers to build large programs with clarity, extensibility and ease of maintenance.
Advantages of C++
1) C++ allows creation of hierarchy-related objects, which can be used by many programmers.
2) C++ is capable to map the real-world problems properly, so the C part of C++ program provides the ability to get close to the machine-level details.
3) C++ programs are easy to maintain.
4) The compilers which are used to execute C++ programs are cheap and easily available.
Structure of C++ Program
Execution of all C++ programs begins at main() function.
All the C++ statements terminates with semicolons. In C++ , main() returns an integer type value to the operating system.
Every main() in C++ should end with a return(0) statement.
cout << “introduction to C++ ” : cout is a predefined object that represents the standard output stream in C++.
So, cout << causes the string “introduction to C++” to be displayed on the screen.
#include <iostream> : it is called C++ header files which causes the preprocessor to add the contents of the iostream file to the program.
using namespace std: Namespace is a new concept introduced by the ANSI C++ standards committee. This defines a scope for the identifiers used in the program.
So, based upon the information’s ,it can be concluded that C++ program contain four sections:
Section 1 : Include files
Section 2 : Class declaration
Section 3 : Member functions definitions
Section 4 : Main function program
Program 1: program to print a string on the screen
#include <iostream>
using namespace std;
int main()
{
cout << “First program on C++”<<”\n”;
return 0;
}
a) C++ directives (#include<header file name>.
b) using namespace std.
c) int main(). main method is always followed by int. Students will get more information about this concept in chapter 3 which deals with functions.
d) return 0, which will be the last line of the program.
The smallest individual units in a program are known as Tokens.
a) Keywords
b) Identifiers
c) Constants
Constants are fixed values that do not change during the execution of a program. C++
supports several kinds of literal constants and it includes: integers, characters, floating point numbers and strings.
1890 Decimal integer
15.45 Floating point integer
OX2 H Hexadecimal integer (H signifies the number is of Hexa Decimal type).
Keywords are the reserved words and cannot be used as name for the program variables or other user-defined program elements or any other user defined variables.
asm Used for embedding assembly language statements in C++ programs.
auto It is a storage class specifier for the local variables.
bool It is a data type.
break A break statement is used to cause an exit from the loop.
catch catch is used to describe the exception handler code that catches the exception.
char It is a fundamental data type.
A’ Character constantC++” String constant37 Octal integer (O signifies the number is of octal type).is called the insertion or put to operator
Introduction to Identifiers and Constants in C++
auto It is a storage class specifier for the local variables.
bool It is a data type.
Break A break statement is used to cause an exit from the loop.catch catch is used to describe the exception handler code that catches the exception.
Char It is a fundamental data type.
class class is used to create user –defined data types.
const It is a data type qualifier.
default It is a default label in a switch statement.
delete It is an operator used to remove the objects from memory.
Do It is a control statement.
False It is a Boolean type constant.
For It is a control statement.
goto It is a transfer statement.
double It is a floating-point data type’s specifier.
long It is a data type.
Private It is a access specifier.
public It is a access specifier.
Identifiers are used to refer the names of variables, functions, arrays, classes etc. which are created by the user.
The rules used for naming convention for C++ are:
a) Only alphabetic characters, digits and underscores are allowed.
b) Name must not start with a digit.
c) Uppercase and lowercase letters are distinct.
d) Keywords cannot be used as a variable name.
Example of valid identifiers are: person , _person , p_erson
Example of invalid identifiers are: 2person , switch , for.
#include <iostream>
using namespace std;
float y = 10.50; // globally defined
int main()
{
float y = 10.60; // local to main
{
float y = 10.70; // local to inner block
cout << “INNER BLOCK \n”;
cout << “y = ” << y << “\n” ;
cout << “:: y = ” << ::y << “\n” ; // accessing the global
// variable
}
cout << “OUTER BLOCK \n”;
cout << “y = ” << y << “\n” ;
cout << “::y =” << y << “\n”;// accessing global variable
It is very much possible that the same variable name can be used with different values in different blocks
The variable which is declared globally irrespective of any block is said to be global variable.
And the variable which is declared inside the block is said to be local variable with respect to that block.
Assignation Operator
If condition is true the expression will return result1, if not it will return result2.
7= =5 ? 4 : 3 returns 3 since 7 is not equal to 5.
7= =5 + 2 ? 4 : 3 returns 4 since 7 is equal to 5+2.
5 >3 ? a : b returns a, since 5 is greater than 3.
a>b ? a : b returns the greater one, a or b.
#include <iostream>
using namespace std;
int main()
{
int values;
cout << “\n Enter 25 , 45 or 75 :”;
cin >> values;
Switch (values)
{
case 25 :
cout << “You have entered 25 \n” ;
break;
case 45 :
cout << “You have entered 45 \n” ;
break;
case 75 :
cout << “You have entered 75 \n”;
break;
default :
cout << “You have entered different value \n”;
}
return 0;
for Loop
For example the listing 2.14 displays the cube of numbers from 0 to 14.
for loop executes a section of code fixed number of times ; this loop is extensively used when it is already known that how many times it is required to execute the code. The syntax of this loop is as under:
The syntax for while loop is as shown under:
The three C++ looping statements are explained in this section.
While loop
Do while loop
For loop
Whenever decision tree is large, and all the decisions depend upon the value of the same variable, then in that case switch statement may be used. The syntax for switch statement is as shown under:
For example, the program shown in listing 2.9 will ask user to enter 25, 45 or 75, if the values entered are among these three values, then the corresponding matching statements will be executed but if the entered value is different from these then the default statement will be executed.
There is another way of putting “ifs” together when multi path decisions are involved. A multi path decision is a chain of “ifs” in which the statement associated with each “else” is an “if”.
The if –else statement is used to do something if a condition is true, if the condition is not true, nothing happens. But if user wants to do one thing if a condition is true, and do something else if it’s false.
The syntax for if….else statement is as under:
For example, the code shown in listing 2.6 accepts a number from user and if the number is greater than 10; then displays a message stating that “Number entered by user is greater than 10″ but if the number entered is less than 10, again a message will be displayed stating that “Number entered by u is less than 10″.
if statement is the simplest of the decision statements. The if keyword is followed by a test expression in parenthesis. The syntax is as shown:
For example, the code shown in Listing 2.4 accepts a number from user and if the number is greater than 10 ; then it displays a message stating that “Number entered by user is greater than 10″ but if the number entered is less than 10, the program will terminate without displaying the message.
The C++ constructs extensively used for decision making are:
a) if statements.
b) if – else statements.
c) Nested if – else statements
d) switch statements.
Control statements classified into constructs which are as under:
1. Looping constructs: loops causes a section of the program to be repeated a certain number of times however, repetition continues while a condition is true and the loop terminates and control passes to the statements following the loop; whenever the condition becomes false. Loops provided in C++ are, for loop, while loop and do while loop.
2. Decision making constructs: In a program a decision causes a one-time jump to a different part of the program, depending upon the value of an expression. Statements provided in C++ for decision making are, if statements, if – else statements and switch statements.
The assignation operator serves to assign a value to a variable.
a = 2 + (b = 5);
is equivalent to:b = 5; a = 2 + b;
The five arithmetical operations supported by the language are:
+ Addition
- Subtraction
* Multiplication
/ Division
% module
Different types of Compound operators available in C++ are:+=, -=, *=, /=, %=, >>=, <<=, &=, ^=, |=
value += increase ; is equivalent to value = value + increase ;
a – = 5; is equivalent to a = a– 5 ;
a /= b; is equivalent to a = a / b;
price *= units + 1; is equivalent to
price = price *(units + 1);
and the same for all other operations
As specified by the ANSI-C++ standard, the result of a relational operation is a Boolean value that can only be true or false, according to the result of the comparison.Here is a list of the relational operators that can be performed in C++:
== Equal
!= Not Equal
> Greater than
< Less than
>= Greater than or equal t
<= Less than or equal to
The conditional operator evaluates an expression and returns a different value according to the evaluated expression, depending on whether it is true or false. Its syntax is:condition ? statement 1 : statement 2
Operator ! is equivalent to boolean operation NOT
Operator ! is equivalent to boolean operation NOT
Another example of operator commonly used are the increment operator (++) and the decrement operator (–).
They increase or reduce by 1 the value stored in a variable. They are equivalent to +=1 and to -=1, respectively.
In case that the increment operator is used as a prefix (++a) the value is increased before the
expression is evaluated and therefore the increased value is considered in the expression;
in case that it is used as a postfix (a++) the value stored in a is increased after being evaluated
Example 1 : B=3;A=++B;// A is 4, B is 4Example 2 : B=3;A=B++;// A is 3, B is 4The values associated with variables keeps changing through out the program; that’s why it is known as Variables.All variables have to be declared first before they are used in programs
Thus, in C++ variables can be declared wherever it is required.
data-type &reference-name = variable-name
An example pertaining to illustration of reference variable is as explained:
float difference = 5;
float &deviation = difference;
Here, in the example shown “difference” is of type float and “deviation” is the alternative
Reference variables are used to provide an alternative name for a previously defined variable,Reference variables are created by using the syntax as under:
Data-types supported by C++ are :1. Built-in data type (also known as basic or fundamental data type).2. User-defined data type.3. Derived data type.
C++ permits its users to define a powerful data type known as class, which can be extensively used just like any other basic data type, to declare variables.Apart from classes; C++ also supports a data type which facilitates a way for attaching names to numbers and these data types are known as Enumerated Data Type.
enum keyword is used for defining Enumerated data type. The Syntax for defining enum statement is as under:
enum size {small, medium, large};
size is known as tag and by using these tags it is possible to declare new variables as for
example: size extralarge; // extralarge is of type size
Arrays are a series of elements (variables) of the same type placed consecutively in memory that can be individually referenced by adding an index to a unique name, for example: int i[5];
Functions are the building blocks of C++ Programs.
Functions basically groups a number of program statements into a unit. This unit can be invoked from other parts of the program.
Pointers are extensively used in C++ for memory management and achieving polymorphism as well. Pointers are basically used to store the address of the memory location.
a) Arraysb) Functions
c) Pointers
The built-in (or fundamental) data types, the size occupied by these data types and ranges allowed, as per ANSI C++ are as shown in table
Section 1.1
Numerical Presentation
In science, technology, business, and, in fact, most other fields of endeavour, we are constantly dealing with quantities. Quantities are measured, monitored, recorded, manipulated arithmetically, observed, or in some other way utilized in most physical systems. It is important when dealing with various quantities that we be able to represent their values efficiently and accurately. There are basically
two ways of representing the numerical value of quantities: analog and digital.
Analog Representation
In analog representation a quantity is represented by a voltage, current, or meter movement that is proportional to the value of that quantity. Analog quantities such as those cited above have an important characteristic: they can vary over a continuous range of values.Below is a diagram of
analog voltage vs time:
Digital Representation
In digital representation the quantities are represented not by proportional quantities but by symbols called digits. As an example, consider the digital watch, which provides the time of day in the form of decimal digits which represent hours and minutes (and sometimes seconds). As we know, the time of day changes continuously, but the digital watch reading does not change continuously; rather, it changes in steps of one per minute (or per second). In other words, this digital representation of the time of day changes in discrete steps, as compared with the representation of time provided by an analog watch, where the dial reading changes continuously.Below is a diagram of
digital voltage vs time:
The major difference between analog and digital quantities, then, can be simply stated as follows:
Analog = continuous
Digital = discrete (step by step)
Section 1.2
Advantages and Limitations of Digital Techniques
Advantages
1. Easier to design. Exact values of voltage or current are not important, only the range (HIGH or LOW) in which they fall.
2. Information storage is easy.
3. Accuracy and precision are greater.
4. Operation can be programmed. Analog systems can also be programmed, but the variety and complexity of the available operations is severely limited.
5. Digital circuits are less affected by noise. As long as the noise is not large enough to prevent us from distinguishing a HIGH from a LOW.
6. More digital circuitry can be fabricated on IC chips.
Limitations
There is really only one major drawback when using digital techniques:
The real world is mainly analog.
Most physical quantities are analog in nature, and it is these quantities that are often the inputs and outputs that are being monitored, operated on, and controlled by a system.To take advantage of digital techniques when dealing with analog inputs and outputs, three steps must be followed:
1. Convert the real-world analog inputs to digital form. (ADC)
2. Process (operate on) the digital information.
3. Convert the digital outputs back to real-world analog form. (DAC)
The following diagram shows a temperature control system that requires analog/digital conversions in order to allow the use of digital processing techniques.
Section 1.3
Digital Number System
Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems. The decimal system is clearly the most familiar to us because it is a tool that we use every day. Examining some of its characteristics will help us to better understand the other systems.
Decimal System
Decimal System The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; using these symbols as digits of a number, we can express any quantity. The decimal system, also called the base-10 system because it has 10 digits.
| 103
|
102
|
101
|
100
|
10-1
|
10-2
|
10-3
|
|
| =1000
|
=100
|
=10
|
=1
|
.
|
=0.1
|
=0.01
|
=0.001
|
| M
|
Decimal point
|
L
|
Binary System In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other number system. Binary Counting The Binary counting sequence is shown in the table:
Section 1.4 In digital systems the information that is being processed is usually presented in binary form. Binary quantities can be represented by any device that has only two operating states or possible conditions. Eg. a switch has only open or closed. We arbitrarily (as we define them) let an open switch represent binary 0 and a closed switch represent binary 1. Thus we can represent any binary number by using series of switches.
Typical Voltage Assignment Binary 1: Any voltage between 2V to 5V
We can see another significant difference between digital and analog systems. In digital systems, the exact value of a voltage is not important; eg, a voltage of 3.6V means the same as a voltage of 4.3V. In analog systems, the exact value of a voltage is important.
23
22
21
20
2-1
2-2
2-3
=8
=4
=2
=1
.
=1/2
=1/4
=1/8
M
Binary point
L
Representing Binary Quantities
Binary 0: Any voltage between 0V to 0.8V
Not used: Voltage between 0.8V to 2V, this may cause error in a digital circuit.










I am impressed by the site and want to know more if possible.I will be glad to use your resources.
By: Bulus L. Gadiga on September 10, 2008
at 11:53 pm
This is a really cool website, not to mention very helpful. But it could do better by including some exampler projects, whish is what i was looking for.
By: Saffana Syeed on September 14, 2008
at 1:36 am
i admire your website, i solicit for more terms such as defintion of software, computer inventor and central processing unit.
By: samson paul idoko(mr. sam) on April 1, 2009
at 1:04 pm
I’m really impressed with the site, don’t hesitate 2 reply my text
By: Swabrina Abdalla on May 4, 2009
at 4:57 pm