CSC 111 Lecture Note PDF
CSC 111 Lecture Note PDF
➢ A computer is an electronic data processing machine that can follow instructions to accept input, process the
input and then produce information.
➢ A computer is a programmable machine that receives input, stores and automatically manipulates data, and
provides output in a useful format.
➢ A computer is an electronic machine that accepts information and instructions from a user, manipulates the
information according to the instructions, displays the information in some way, and stores the information for
retrieval later.
This stage refers to the period in which only manual "Mechanical devices" were used:
The Abacus
Date of development: 3000 B.C (5000 years ago)
Place: China
Function: Arithmetic calculation
Abacus: An early device to record numeric values
Use today: Soroban Abacus training enhances the essential element of learning Mental Math
better and faster calculation skills and improves problem-solving abilities.
Slide Rule
Date: 1632
Place: England
Inventor: William Oughtred
Components: Two movable rules
Function: Multiplication and Division
Date: 1642
Place: France
Inventor: Blasé Pascal
Function: All the arithmetic operations but it required considerable manual effort for
Multiplication and Division
Jacquard Loom
Date: 1801
Place: France
Inventor: Joseph Marie Jacquard
Components: Loom, threads and control cards (punched cards)
Punched Card: Jacquard’s Loom, the punched card
Date: 1833
Place: England / Cambridge University
Inventor: English inventor Charles Babbage/Professor of mathematics invented a viable
mechanical computer equivalent to modern digital computers. Created a mechanical,
steam-powered computing machine First machine was the Difference Engine, a
mechanical calculator. This was partially realized Second machine was the
Analytical Engine, a programmable calculation device
Major innovation:
▪ Arithmetic unit
▪ Punched-card input
▪ Printing unit and control system
▪ Storage unit (1000 numbers of 50 decimal digits each)
▪ special purpose calculator
▪ naval navigation charts
Ada Lovelace
In 1854, George BOOLE, a British mathematician performed a mathematical system named "Boolean Logic", that is
the mathematics of variables with values that can be only "True" or "False".
The major feature of this stage was the use of "Electro-Mechanical Device" to process data recorded on punched
cards.
Major innovation: a punched device for recording information by punching holes on cards.
The Simultaneous Punched Machine
Date: 1910
Place: USA Bureau Census
Inventor: James Power
Major innovation: An earlier card-punched equipment to cheek and correct data before it was actually
punched onto cards.
The major feature of this stage was the use of "Computers" to process data and storage. Examples are Harvard
Mark I, ENIAC, UNIVAC I. Early computers launch new era in mathematics, physics, engineering and economics
HARVARD MARK 1
Date: 1944
Type: The first electro-mechanical computer "automatically performing of arithmetical and
logical operations"
Inventor: IBM Company/ Howard G. Aiken, Professor of Math's at Harvard University
Size: 50 foot long, 8 foot high
ENIAC (Electronic Numerical Integrator and Computer)
Date: 1946
Type: The first electronics digital computer "automatically performing of arithmetical and
logical operations"
Inventor: Dr. John Mauchly in USA
Weight: 30 Ton
Details
➢ Decimal (not binary)
➢ 20 accumulators of 10 digits
➢ Programmed manually by switches
➢ 18,000 vacuum tubes
➢ 30 tons
➢ 15,000 square feet
➢ 140 kW power consumption
➢ 5,000 additions per second
Characteristics of Computers
➢ Speed
➢ Accuracy
➢ Diligence
➢ Versatility
➢ Storage Capacity
Generations of Computers
✓ First generation of computers (1946-1959) (Vacuum Tubes)
✓ Second generation (1959-1971) (Transistors)
✓ Third Generation Computer (1964-1971) (Integrated Circuit)
✓ Fourth Generation (1974-1984) (Very Large Integrated Circuit)
✓ Fifth\future Generation (Present and beyond) (Artificial Intelligence)
Classification of Computers
✓ Classification according to purpose
▪ General-purpose Computers
▪ Specific-purpose Computers
✓ Classification according to type of data-handling techniques
▪ Analog Computers
▪ Digital Computers
▪ Hybrid Computers
✓ Classification according to functionality
▪ Microcomputers
▪ Minicomputers
▪ Mainframe computers
▪ Supercomputers
The growth of computer development has been divided into five distinct generations.
➢ Each generation reflects the progress made so far in improving the performance of the machine.
Main Features
➢ The wires and thermionic values of the first generation were replaced with diodes and transistors.
➢ Processors operated in micro seconds (i.e. one millionth of a second)
➢ Invention and use of high level language such as FORTRAN and COBOL.
➢ Programs could be written in High Level languages and assembler e.g. BASIC
➢ Communication by using telephone line.
Example: Honeywell 200, IBM 1620, IBM 1400 etc.
Main Features
❑ Major Innovation: Transistors as main component.
❑ Main Memory: RAM and ROM.
❑ External Storage: Magnetic tapes and Magnetic Disk.
❑ Input Output Devices: Magnetic tapes and Magnetic Disk.
❑ Languages: Assembly language, some high level languages for Example BASIC, COBOL, FORTRAN.
❑ Operating System: Human handles punched card.
❑ Size: Mainframe for example IBM-1400, NCR-300, IBM-1600, UNIVAC-III, etc…
Main Features
❑ Major Innovation: Integrated circuit (ICs) as basic electronic component (SSIC and MSIC)
❑ Main Memory: PROM and DRAM
❑ External Storage: Improve disk (Floppy Disk)
❑ Input and Output Devices: Keyboard for input, monitor for output
❑ Languages: More high level languages
❑ Operating System: Complete operating systems were introduced
❑ Size: Mainframe and Mini Computer, for example: IBM SYSTEM /360, ICH-360, HONEY WELL-316,
etc…
Main Features
▪ Major Innovation: LSIC and VLSIC (Micro Processor)
▪ Main Memory: EPROM and SRAM.
▪ External Storage: Floppy Disk and Hard Disk.
▪ Input and Output Devices: Monitor for output.
▪ Languages: Languages and application software.
▪ Operating System: MS-DOS and PC-DOS
▪ Size: Microcomputer e.g. IBM-PC, Apple Macintosh etc..
➢ From 1990s upward, the fifth generation computers entered into the computer world by the application of
fibre optics technology.
➢ This generation of computers evolved a result of the need for computers to take decision in various
circumstances.
➢ This generation is witnessing the influx of super micro computers through AI whose main attraction over
previous computer is speed and power.
➢ Expert systems have capacity of making decisions and judgment.
Main Features
Major Innovations: ULSIC (Ultra large scale integrated circuit)
Main Memory: EEPROM, SIMM and DIMM.
External Storage: Modified magnetic and Optical disks.
Input/output Devices: Keyboard, Pointing Device, Scanner as input and Monitor as main output.
Languages: AI (Artificial Intelligence) Expert systems.
Operating System: GUI based e.g. Windows (95, 98, 2000, NT, XP, Vista, Seven and Eight)
Size: Very small in size example: Laptop, Note book, Digital Diary, Palmtop and Pocket PC.
CLASSIFICATION OF COMPUTER
Mainframe computer
Uses of mainframe:
▪ They are mainly used by government institutions and large companies for tasks such as large data processing,
census, financial transaction processing etc.
▪ Airline system (in this case, a mainframe is installed at the head office where all the information about flight
are recorded, small computers are installed in their various booking office, these computers are attached to
central data bank so that up to date information are readily available
Examples: Uivac 1100/10. Univac 1100/60, Honey well DSP88/ 86 IBM
Mini computer
▪ Desk-sized
▪ More processing speed and storage capacity than microcomputers
▪ General data processing needs at small companies
▪ Larger companies use them for specific purposes
▪ A multi-user computer capable of supporting up to hundreds of users simultaneously.
▪ It is a medium sized computer that is more powerful than micro computer?
▪ It is between mainframe and micro computer.
▪ The speeds are rated between one and fifty million instructions per second (MIPS).
▪ They have primary storage in hundred to three hundred megabytes range with access storage device.
▪ It is designed to serve many users simultaneously.
Uses
▪ They are generally used as mid-range servers.
▪ Also for scientific and engineering computations, business transaction handling and data base management
etc.
Example: TDC 316, P1W 11/70
Micro computer
Microcomputer =>Personal Computer => PC: A small, single-user computer based on a microprocessor.
There are 3 types of the Microcomputers :
1. Laptop
2. Desktop
3. Workstation
Personal Computer: Workstation: A powerful, single-user computer. A workstation is like a personal computer, but
it has a more powerful microprocessor and, in general, a higher-quality monitor.
➢ It is defined as a computer that has microprocessor as its CPU. The first microprocessor computer was built of
8-bit chip.
➢ This implies that 8-bit of data can be sent for process into CPU, later 16 bits system was introduced (8088,
80486).
➢ The latest computers are of 32-bits and are known as Pentium.
➢ These types of computer are the smallest, least expensive and the commonest.
➢ It has a small memory and less processing power.
There are many different types of microcomputers, such as personal computers, tablet computers, Smartphone, many
types of handheld devices including mobile phones, pocket, calculator, personal digital assistant and servers.
However they are grouped under the following:
Portable and Desktop:
Portable: Laptop, notebook and palmtop, handheld device
Desktop: This is a type of microcomputer placed on desk. The system unit can either be flatbed or slim line. Desktop
consists of all the features of a complete system (input, processing, output and storage).
Mobile Computer: Laptop, Notebook, Palmtop
COMPUTER HARDWARE
Functional units of a Computer
▪ Central Processing Unit (CPU)
▪ Main Memory
▪ Peripheral Units
✓ Input Devices
✓ Output Devices
✓ Auxiliary Storage Devices
➢ The hardware is divided into three areas or separate units for its operation:
▪ Central Processing Unit (CPU) or Processor
▪ Main Memory
▪ Peripheral Units or Electrical Gadgets
Computer Hardware
The hardware refers to the physical components or functional units of a computer which make up the computer
configuration
The design and construction of the hardware of a particular computer is referred to as its architecture or
configuration
The hardware components provide the physical interface to a computer system
What is hardware?
• A program to process words
• A physical component of a computer
• A database of facts
• A computer programming book
Input
Input unit – Input unit is a unit that accepts any input device. The input device is used to input data into the computer
system
This unit is used for entering data and programs into the computer system by the user for processing.
Most common are keyboard and mouse
INPUT DEVICES
You use an input device, such as a keyboard or a mouse, to input data and issue commands
▪ Keyboard
▪ Ergonomic
▪ Pointing device
▪ Controls the pointer
▪ Mouse
▪ Scroll wheel
▪ Trackball
▪ Touch pad
▪ Pointing stick
▪ Scanner
Output
Output Unit –Output unit is a unit that constituents a number of output device. An output device is used to show the
result of processing.
The output unit is used for storing the result as output produced by the computer after processing.
Monitor
▪ Flat panel
▪ LCD
▪ CRT
Printer
▪ Laser
▪ Inkjet
▪ Dot matrix
Storage Unit
Storage Unit – The storage unit is used for storing data and instructions before and after processing
A computer file is a named collection of stored data
An executable file contains the instructions that tell a computer how to perform a specific task
A data file is created by a user
Magnetic media
▪ Hard disk
▪ Tape
▪ Floppy disk
Optical storage device
▪ CD
▪ DVD
▪ CD-R
▪ CD-RW
▪ CD-ROM
Flash memory
▪ Flash memory cards
▪ USB flash storage device
▪ USB drive (flash drive)
Function of CPU
➢ It controls all the parts and software and data flow of computer.
➢ It performs all operations.
➢ It accepts data from input device.
➢ It sends information to output device.
➢ Executing programs stored in memory
➢ It stores data either temporarily or permanent basis.
➢ It performs arithmetical and logical operations.
Primary Memory
Also known as main memory.
Main memory is directly or indirectly connected to the central processing unit via a memory bus.
The CPU continuously reads instructions stored there and executes them as required.
Example: RAM and ROM
Primary Memory
Primary Memory can be further classified as RAM and ROM.
RAM or Random Access Memory
It is the place in a computer where the operating system, application programs and the data in current use are kept
temporarily so that they can be accessed by the computer’s processor.
It is said to be ‘volatile’ since its contents are accessible only as long as the computer is on.
The contents of RAM are no more available once the computer is turned off.
This is the part of the computer that stores operating system software, software applications and other information for
the central processing unit (CPU) to have fast and direct access when needed to perform tasks.
Secondary Memory
Secondary/auxiliary memory is storage. It is not directly accessible by the CPU.
Computer usually uses its input/output channels to access secondary storage and transfers the desired data using
intermediate area in primary storage.
Secondary storage devices are of two types;
▪ Magnetic devices include hard disks and
▪ Optical storage devices are CDs, DVDs, Pen drive, Zip drive etc.
Secondary Storage
Stores data and programs permanently: its retained after the power is turned off
Examples
• Hard Drive (Hard Disk) Located outside the CPU, but most often contained in the system cabinet
• Floppy Disk
• Optical Laser Discs
❖ CD-ROM, CD-RW, and DVD
Common Secondary Media
• Diskettes
– Data represented as magnetic spots on removable flexible plastic disks
– Most common size is 3 1/2 inches, in a rigid plastic case
– Disk drive holds the diskette, reads or retrieves the data and writes or stores data
• Hard drive
– Data is represented magnetically as with diskettes
– Normally more than one rigid platter in a sealed unit
– These disks are not removable
– Significantly more capacity and faster operating than diskettes
• Optical Laser Discs
❖ CD ROM & DVD’s
▪ Data is represented as pits and lands
▪ Some kinds are read only (CD-ROM) and some Kinds are rewritable (CD-RW)
▪ Significantly more capacity and faster operating than diskettes
Peripheral Units
According to the most technical definition, the only pieces of a computer not considered to be peripherals are the
central processing unit, power supply, motherboard, and computer case.
A Peripheral is a “device that is used to put information into or get information out of the computer. There are three
different types of peripherals:
i) Input
ii) Output
iii) Storage
A Peripheral Device is generally defined as any auxiliary device such as a computer mouse or keyboard, that
connects to and works with the computer in some way.
Other examples of peripherals are expansion cards, graphics cards, image scanners, tape drives, microphones,
loudspeakers, webcams, and digital cameras.
RAM—random access memory—straddles the line between peripheral and primary component; it is technically a
storage peripheral, but is required for every major function of a modern computer and removing the RAM will
effectively disable any modern machine.
Many new devices such as digital watches, smartphones and tablet computers have interfaces which allow them to be
used as a peripheral by a full computer, though they are not host-dependent as other peripheral devices are.
Input Devices
In computing, an input device is a peripheral (piece of computer hardware equipment) used to provide data and control
signals to an information processing system such as a computer or other information appliance. Examples of input
devices include keyboards, mice, scanners, digital cameras and joysticks.
Output Devices
An output device is any piece of computer hardware equipment used to communicate the results of data processing
carried out by an information processing system (such as a computer) which converts the electronically generated
information into human-readable form.
Common Peripherals
Input: Keyboard, Computer mouse, Graphic tablet, Touchscreen, Barcode reader, Image scanner, Microphone,
Webcam, Game controller, Light pen, Scanner, Digital camera.
Output: Computer display, Printer, Projector, Speaker, Storage devices, Floppy disk drive, Flash drive, Disk drive,
Smartphone or Tablet computer
Storage interface: CD/DVD drive, Input/Output, Modem, Network interface controller (NIC)
Processing Hardware
❖ The motherboard is the main electronic component of the computer
Circuit board
❖ The microprocessor is one of the most important pieces of processing hardware on the motherboard
❖ Cards are removable circuit boards
Application Software
▪ Word Processing Packages
▪ Spread sheet Packages
▪ Graphic Packages
▪ Database Packages
▪ Desktop Publishing Packages
▪ Games Packages
▪ Communication Packages
▪ User Programs
▪ Integrated Packages
Computer Languages
▪ Machine Languages
▪ Low-Level Languages
▪ High-Level Languages
Computer Software
Computer software is the set of programs that makes the hardware perform a set of tasks in particular order.
Hardware and software are complimentary to each other. Both have to work together to produce meaningful results.
Computer software is classified into two broad categories;
▪ System Software and
▪ Application Software.
Application Programs
Word-Processors, Spreadsheets, Database Software, IDEs,etc…
System Software
Compilers, Interpreters,Preprocessors, etc.
Operating System, Device Drivers
Systems Software
Set of programs that coordinates activities and functions of the hardware and various other programs.
The software that controls everything that happens in a computer.
Background software, manages the computer’s internal resources
Programs written for computer systems, Compilers, operating systems, …
System software consists of a group of programs that control the operations of a computer equipment including
functions
▪ managing memory,
▪ managing peripherals,
▪ loading, storing,
▪ an interface between the application programs and the computer.
MS DOS (Microsoft’s Disk Operating System), UNIX are examples of system software
System Software manages the fundamental operations of your computer
▪ Operating system
• System resource
• Multitasking
▪ Utilities
▪ Programming Languages
Operating Systems or OS
The operating system (OS) controls all other software and allows the hardware devices to work properly.
Without an operating system, a user cannot run an application program on their computer, unless the application
program is self booting.
Some popular operating systems are:
▪ Microsoft Windows - for PCs
▪ Mac OS - for Apple computers
▪ Linux - for very large network computers
▪ Handheld operating systems - for PDAs, MP3 players, and cell phones
Software consists of programs and data, that runs on computers, manages computer hardware resources, and provides
common services for execution of various application software.
The OS is the most important type of system software in a computer system.
Provides several essential services:
▪ Loading & running application programs
▪ Allocating memory & processor time
▪ Providing input & output facilities
▪ Managing files of information
LANGUAGE TRANSLATORS
A programming language (PL) is a vocabulary and set of grammatical rules for instructing a computer or computing
device to perform specific tasks.
PL refers to high-level languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and Pascal.
Each PL has a unique set of keywords (words that it understands) and a special syntax for organizing program
instructions.
A programmers uses PL to develop software programs, scripts, or other sets of instructions for computers to execute.
PL share similarities, each has its own syntax.
Language Translators
▪ A programmer learns the languages rules, syntax, and structure, they write the source code in a text editor or
IDE.
▪ The programmer often compiles the code into machine language that can be understood by the computer.
▪ Scripting languages, which do not require a compiler, use an interpreter to execute the script.
Assemblers
➢ An assembler is a program that converts assembly language into machine code.
➢ It takes the basic commands and operations from assembly code and converts them into binary code that can
be recognized by a specific type of processor.
➢ Assemblers are similar to compilers in that they produce executable code.
➢ However, assemblers are more simplistic since they only convert low-level code (assembly language) to
machine code.
Compilers
A compiler is a software program that transforms high-level source code that is written by a developer in a high-level
programming language into a low level object code (binary code) in machine language, which can be understood by
the processor.
The process of converting high-level programming into machine language is known as compilation.
The processor executes object code, which indicates when binary high and low signals are required in the arithmetic
logic unit of the processor.
The stages in compilation include:
▪ Lexical Analysis
▪ Syntax Analysis
▪ Semantic Analysis
▪ Intermediate code generation
▪ Code optimization
▪ Code generation
Compiler
A program that converts another program from some source language (or high-level programming language / HLL) to
machine language (object code).
Some compilers output assembly language which is then converted to machine language by a separate assembler.
It is distinguished from an assembler by the fact that each input statement, in general, correspond to more than one
machine instruction.
Interpreters
An interpreter is a computer program that is used to directly execute program instructions written using one of the
many high-level programming languages.
The interpreter transforms the high-level program into an intermediate language that it then executes, or it could parse
the high-level source code and then performs the commands directly, which is done line by line or statement by
statement.
Programming languages are implemented in two ways:
• Interpretation
• Compilation.
An interpreter transforms or interprets a high-level programming code into code that can be understood by the
machine (machine code) or into an intermediate language that can be easily executed as well.
The interpreter reads each statement of code and then converts or executes it directly.
In contrast, an assembler or a compiler converts a high-level source code into native (compiled) code that can be
executed directly by the operating system.
The interpreter stays around during execution
It reads and executes statements one at a time
JAVA
For flexibility: Just In Time (JIT) compiler translates bytecode into ML just before execution
Utility Software
It helps you maintain your computer and keep it in good running condition
Utility software is software designed to help to analyse, configure, optimize or maintain a computer.
It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly
performing tasks that benefit ordinary users.
Utilities often form part of application systems.
For example a batch job may run user-written code to update a database and may then include a step that runs a utility
to back up the database, or a job may run a utility to compress a disk before copying files.
File Conversion
File conversion is the process of converting a file into another type.
For example:
▪ Transferring a file used in Microsoft Word to Corel Word Perfect.
▪ It overs data transfer from any medium to another medium, making an exact copy or simultaneously editing
and Validating data.
▪ A copy from a hard disk to a diskette.
File Copy
File copying is the creation of a new file which has the same content as an existing file.
For example:
▪ Housekeeping Operations
These include programs to clear areas of storage, writing file labels, updating common data e.g. data.
Application Software
➢ Programs that help users solve particular computing problems
➢ Programs written for computer users and it enables you to perform specific computer tasks, such as
document production, spreadsheet calculations, and database management
▪ Word-processors, spreadsheets, & other application packages
➢ Software that can perform a specific task for the user, such as
▪ Word processors– example: Microsoft word
▪ Spreadsheets-- example: Microsoft Excel
▪ Database managers-- example: Microsoft Access
▪ Graphics-- example: Photoshop
Application Software – Basic Tools:
Examples are word processing, accounting, budgeting or payroll, fall under the category of application software.
Word processors, spreadsheets, database management systems are all examples of general purpose application
software
Word processing software:
▪ The main purpose of this software is to produce documents.
▪ MS-Word, Word Pad, Notepad and some other text editors are some of the examples of word processing
software
Spread sheet software:
▪ The spread sheet software is used to maintain budget, financial statements, grade sheets, and sales records.
▪ The purpose of this software is organizing numbers.
▪ It also allows the users to perform simple or complex calculations on the numbers entered in rows and
columns.
▪ MS-Excel is one of the example of spreadsheet software.
Presentation software:
▪ This software is used to display the information in the form of slide show.
▪ The three main functions of presentation software is editing that allows insertion and formatting of text,
including graphics in the text and executing the slide shows.
▪ The best example for this type of application software is Microsoft PowerPoint.
Multimedia software:
▪ Media players and real players are the examples of multimedia software.
▪ This software will allow the user to create audio and videos.
▪ The different forms of multimedia software are audio converters, players, burners, video encoders and
decoders.
Computer Languages
Computer language or programming language is a coded syntax used by computer programmers to communicate with
a computer.
Computer language establishes a flow of communication between software programs.
The language enables a computer user to dictate what commands the computer must perform to process data.
These languages can be classified into following categories
Level 6: The User Level
Program execution and user interface level.
The level with which we are most familiar.
Level 5: High-Level Language Level
The level with which we interact when we write programs in languages such as C, Pascal, Lisp, and
Java.
Level 4: Assembly Language Level
Acts upon assembly language produced from Level 5, as well as instructions programmed directly at
this level.
Level 3: System Software Level
Controls executing processes on the system.
Protects system resources.
Assembly language instructions often pass through Level 3 without modification.
Level 2: Machine Level
Also known as the Instruction Set Architecture (ISA) Level.
Consists of instructions that are particular to the architecture of the machine.
Programs written in machine language need no compilers, interpreters, or assemblers.
Level 1: Control Level
A control unit decodes and executes instructions and moves data through the system.
Control units can be microprogrammed or hardwired.
A microprogram is a program written in a low-level language that is implemented by the hardware.
Hardwired control units consist of hardware that directly executes machine instructions.
Level 0: Digital Logic Level
This level is where we find digital circuits (the chips).
Digital circuits consist of gates and wires.
These components implement the mathematical logic of all other levels.
Computer Languages
➢ Machine Language
▪ Uses binary code
▪ Machine-dependent
▪ Not portable
➢ Assembly Language
▪ Uses mnemonics
▪ Machine-dependent
▪ Not usually portable
➢ High-Level Language (HLL)
▪ Uses English-like language
▪ Machine independent
▪ Portable (but must be compiled for different platforms)
▪ Examples: Pascal, C, C++, Java, Fortran, . . .
Machine Language
➢ The representation of a computer program which is actually read and understood by the computer.
▪ A program in machine code consists of a sequence of machine instructions.
➢ Instructions:
▪ Machine instructions are in binary code
▪ Instructions specify operations and memory cells involved in the operation
Example:
Operation Address
Assembly Language
➢ A symbolic representation of the machine language of a specific processor.
➢ Is converted to machine code by an assembler.
➢ Usually, each line of assembly code produces one machine instruction (One-to-one correspondence).
➢ Programming in assembly language is slow and error-prone but is more efficient in terms of hardware
performance.
➢ Mnemonic representation of the instructions and data
High-level language
➢ A programming language which use statements consisting of English-like keywords such as "FOR", "PRINT"
or “IF“, ... etc.
➢ Each statement corresponds to several machine language instructions (one-to-many correspondence).
➢ Much easier to program than in assembly language.
➢ Data are referenced using descriptive names
➢ Operations can be described using familiar symbols
Syntax & Semantics
Syntax:
The structure of strings in some language. A language's syntax is described by a grammar.
▪ Examples:
▪ Binary number
<binary_number> = <bit> | <bit> <binary_number>
<bit> =0|1
▪ Identifier
<identifier> = <letter> {<letter> | <digit> }
<letter> =a|b|...|z
<digit =0|1|...|9
Semantics:
The meaning of the language
Source program
▪ The form in which a computer program, written in some formal programming language, is written by
the programmer.
▪ Can be compiled automatically into object code or machine code or executed by an interpreter.
▪ Pascal source programs have extension ‘.pas’
Object program
▪ Output from the compiler
▪ Equivalent machine language translation of the source program
▪ Files usually have extension ‘.obj’
Executable program
▪ Output from linker/loader
▪ Machine language program linked with necessary libraries & other files
▪ Files usually have extension ‘.exe’
What is a Linker?
▪ A program that pulls other programs together so that they can run.
▪ Most programs are very large and consist of several modules.
▪ Even small programs use existing code provided by the programming environment called libraries.
▪ The linker pulls everything together, makes sure that references to other parts of the program (code) are
resolved.
Program Execution
Steps taken by the CPU to run a program (instructions are in machine language):
1. Fetch an instruction
2. Decode (interpret) the instruction
3. Retrieve data, if needed
4. Execute (perform) actual processing
5. Store the results, if needed
Summary of Programming Languages
Fourth
▪ Even easy for non-programmers
▪ Tell what to do, not how to do it
▪ Focus, Powerhouse
Visual Programming Languages
▪ Point-and-click
▪ Drag-and-drop
▪ Useful for user interfaces
▪ Visual Basic, Visual C++
Object-oriented Languages
▪ Objects contain data, methods to operate data
▪ C++, Java
BATCH PROCESSING
Batch processing is the processing of transactions in a group or batch.
No user interaction is required once batch processing is underway.
This differentiates batch processing from transaction processing, which involves processing transactions one at a
time and requires user interaction.
Batch processing can be carried out at any time, it is particularly suitable to end-of-cycle processing, such as for
processing a bank's reports at the end of a day or generating monthly or biweekly payrolls.
NOTE:
▪ Batch processing is a technique for automating and processing multiple transactions as a single group.
▪ Batch processing helps in handling tasks like payroll, end-of-month reconciliation, or settling trades
overnight.
▪ Batch processing systems can save money and labor over time, but they may be costly to design and
implement up-front.
Real-time data processing is the execution of data in a short time period, providing near speedy output.
The processing is done as the data is inputted, so it needs a continuous stream of input data in order to provide a
continuous output.
In contrast, a batch data processing system collects data and then processes all the data in bulk in a later time, which
also means output is received at a later time.
On-line Processing
It concern the equipment which is connected or re-engaged and functioning with the CPU and main Programs, e.g.
teletype units, consoles card-readers, OCR, VDU etc.
It is at least a one-way communication between operators at terminals and the CPU.
Note:
An On-line system is not always a real time (Immediately inquiry response) System, but real-time systems must have
an On-line Capability and equipment.
Time-sharing Processing
Time-sharing, in data processing, method of operation in which multiple users with different programs interact nearly
concurrently with the central processing unit of a large-scale digital computer.
▪ the central processor operates significantly faster
▪ it has sufficient time to solve several discrete problems during the input/output process.
▪ Time-sharing was developed during the late 1950s and early ’60s to make more efficient use of expensive
processor time.
▪ Commonly used time-sharing techniques include multiprocessing, parallel operation, and multiprogramming.
▪ Computer networks organized for the purpose of exchanging data and resources are centred on time-sharing
systems.
Distributed Data Processing
▪ Distributed data processing is a computer-networking method in which multiple computers across different
locations share computer-processing capability.
▪ This is in contrast to a single, centralized server managing and providing processing capability to all
connected systems.
▪ Computers that comprise the distributed data-processing network are located at different locations but
interconnected by means of wireless or satellite links.
Networking
A network consists of 2 or more computers connected together, and they can communicate and share resources
(e.g. information)
A network connects one computer to other computers and peripheral devices, enabling you to share data and
resources with others
A network consists of two or more computers that are linked in order to share resources (such as printers and CDs),
exchange files, or allow electronic communications.
Networking
Network: A collection of computing devices that are connected in various ways in order to communicate and share
resources
Usually, the connections between computers in a network are made using physical wires or cables
The computers on a network may be linked through cables, telephone lines, radio waves, satellites, or infrared light
beams.
However, some connections are wireless, using radio waves or infrared signals
The generic (basic) term node or host refers to any device on a network
Data transfer rate The speed with which data is moved from one place on a network to another
Data transfer rate is a key issue in computer networks
Server:
Any device on a network providing a special engine service.
▪ File server A computer that stores and manages files for multiple users on a network
▪ Web server A computer dedicated to responding to requests (from the browser client) for web pages
File Transfer:
This is core of LAN. It is a microcomputer that runs the network operating system and controls the activities of the
network.
Host:
A computer within a network designed for running application, time-sharing operations, services like database access,
and special programs or languages a workstation.
Node: Any device PC or terminal on a LAN
Protocol:
A set of rules governing data transmission. All devices involved with sending or Receiving of data on the network
must accept the procedure in order to communicate.
Bridge:
Any device (i.e combination of hardware and software) that can form an interface between two similar LANs.
Routers:
While bridges can link similar LANs that do not necessarily have the same protocols, a router can only send data
through compatible protocols path.
Repeater:
A device set of interval along a circuit to regenerate or boost the signal preventing its decay over distance. Repeaters
regenerate digital signals without change; they simply boost analog signals.
Topology:
This refers to the configuration among nodes, including the wiring scheme (ring, bus or star)
Hierarchical Networks
A hierarchical network is the type of network topology in which a central "root" node (the top level of the hierarchy)
is connected to one or more other nodes that are one level lower in the hierarchy (i.e., the second level) with a point-
to-point link between each of the second level nodes and the top level central "root" node,
while each of the second level nodes that are connected to the top level central "root" node will also have one or more
other nodes that are one level lower in the hierarchy (i.e., the third level) connected to it, also with a point-to-point
link, the top level central "root" node being the only node that has no other node above it in the hierarchy.
Peer-to-Peer Networks (P2P)
➢ In a P2P network, the "peers" are computer systems which are connected to each other via the Internet.
➢ Files can be shared directly between systems on the network without the need of a central server, that is, each
computer on a P2P network becomes a file server as well as a client.
➢ The only requirements for a computer to join a peer-to-peer network are Internet connection and P2P
software.
Peer-to-Peer Networks
➢ Peer-to-peer network is also called workgroup
➢ No hierarchy among computers all are equal
➢ No administrator responsible for the network
Advantages of peer-to-peer networks:
• Low cost
• Simple to configure
• User has full accessibility of the computer
Disadvantages of peer-to-peer networks:
• May have duplication in resources
• Difficult to uphold security policy
• Difficult to handle uneven loading
Where peer-to-peer network is appropriate:
• 10 or less users
• No specialized services required
• Security is not an issue
• Only limited growth in the foreseeable future
Clients and Servers
Network Clients (Workstation)
▪ Computers that request network resources or services
Network Servers
▪ Computers that manage and provide network resources and services to clients
▪ Usually have more processing power, memory and hard disk space than clients
▪ Run Network Operating System that can manage not only data, but also users, groups, security, and
applications on the network
▪ Servers often have a more stringent requirement on its performance and reliability
Advantages of client/server networks
• Facilitate resource sharing – centrally administrate and control
• Facilitate system backup and improve fault tolerance
• Enhance security – only administrator can have access to Server
• Support more users – difficult to achieve with peer-to-peer networks
Disadvantages of client/server networks
• High cost for Servers
• Need expert to configure the network
• Introduce a single point of failure to the system
Types of Networks
➢ Local Area Networks (LAN)
➢ Wire Area Networks (WAN)
➢ Metropolitan Area Network (MAN)
Local Area Networks (LAN)
Local Area Network (LAN) A network that connects a relatively small number of machines in a relatively close
geographical area
➢ Small network, short distance
▪ A room, a floor, a building
▪ Limited by no. of computers and distance covered
▪ Usually one kind of technology throughout the LAN
▪ Serve a department within an organization
Examples:
▪ Network inside the Student Computer Room
▪ Network inside CF502
▪ Network inside your home
Various configurations, called topologies, have been used to administer LANs
Ring topology A configuration that connects all nodes in a closed loop on which messages travel in one direction
Star topology A configuration that centers around one node to which all others are connected and through which all
messages are sent
Bus topology All nodes are connected to a single communication line that carries messages in both directions. A bus
technology called Ethernet has become the industry standard for local-area networks
Local Area Networks connected across a distance to create a Wide Area Network
Gateways: Gateways are used to connect dissimilar networks.
Gateways handle messages, addresses, and protocol conversions necessary to deliver a message from one network or
another.
Internet
The internet is a globally connected network system that uses TCP/IP to transmit data via various types of media.
The internet is a network of global exchanges – including private, public, business, academic and government
networks – connected by guided, wireless and fiber-optic technologies.
The Internet is the largest network in the world, connecting millions of people
Electronic mail
World Wide Web
▪ Web page
▪ Web site
The terms internet and World Wide Web are often used interchangeably, but they are not exactly the same thing
The internet refers to the global communication system, including hardware and infrastructure, while the web is one of
the services communicated over the internet.
So, who owns the Internet?
Well, nobody does. No single person or company owns the Internet or even controls it entirely.
As a wide-area network, it is made up of many smaller networks. These smaller networks are often owned and
managed by a person or organization.
The Internet, then, is really defined by how connections can be made between these networks.
Internet Connections
Internet backbone A set of high-speed networks that carry Internet traffic
These networks are provided by companies such as AT&T, GTE, and IBM
Internet service provider (ISP) A company that provides other companies or individuals with access to the Internet
Internet Connections
There are various technologies available that you can use to connect a home computer to the Internet
▪ A phone modem converts computer data into an analog audio signal for transfer over a telephone line, and
then a modem at the destination converts it back again into data
▪ A digital subscriber line (DSL) uses regular copper phone lines to transfer digital data to and from the phone
company’s central office
▪ A cable modem uses the same line that your cable TV signals come in on to transfer the data back and forth
Internet Connections
Broadband: A connection in which transfer speeds are faster than 128 bits per second
▪ DSL connections and cable modems are broadband connections
▪ The speed for downloads (getting data from the Internet to your home computer) may not be the same as
uploads (sending data from your home computer to the Internet)
Security on Networks
Security refers to the steps a computer owner takes to prevent unauthorized use of or damage to the computer
❑ Malware
▪ Viruses & Antivirus software
▪ Spyware
▪ Adware
Firewall
Phishing
Pharming
Password
▪ can prevent people accessing computer systems, accounts, files or parts of files by requiring a user to enter a
password.
▪ This prevents people damaging files or getting into e-mail accounts or network accounts and disrupting them.
▪ It is a standard security precaution on many computer systems.
▪ Password security is at no cost to the network and is potential a useful security measures. Password that are
chosen should be those that could be easily remembered.
PROGRAMS
A program is a set of step-by-step instructions that directs the computer to do the tasks you want it to do and produce
the results you want.
A programming language is a set of rules that provides a way of telling a computer what operations to perform.
A program can only instruct a computer to:
• Read Input
• Sequence
• Calculate
• Store data
• Compare and branch
• Iterate or Loop
• Write Output
• A program can instruct a computer to perform mathematical operations.
• A program will often instruct a computer to store intermediate results.
• A program can instruct a computer to compare two items and do something based on a match or mismatch
which, in turn, redirect the sequence of programming instructions.
There are two forms:
▪ IF-THEN
▪ IF-THEN-ELSE
IF-THEN
IF – THEN – ELSE
• A program loop is a form of iteration. A computer can be instructed to repeat instructions under certain
conditions.
• Programmers arrive at these solutions by using one or more of these devices:
Logic flowcharts
Structure charts
Pseudocode
Structured Programming
Logic Flowcharts
These represent the flow of logic in a program and help programmers “see” program design.
Common Flowchart Symbols
PSUEDOCODE
This device is not visual but is considered a “first draft” of the actual program.
Pseudocode is written in the programmer’s native language and concentrates on the logic in a program—not the
syntax of a programming language.
INTERNET PROTOCOL
Email (Simple Mail Transport Protocol)
Telnet (Login to remote host computer)
FTP (File Transfer Protocol) - transfers files between server and client
HTTP (Hyper Text Transfer Protocol)
WHAT IS WEB?
The Web (World Wide Web) consists of information organized into Web pages containing text and graphic images.
It contains hypertext links, or highlighted keywords and images that lead to related information.
A collection of linked Web pages that has a common theme or focus is called a Web site.
The main page that all of the pages on a particular Web site are organized around and link back to is called the site’s
home page.
HTTP
The transfer protocol is the set of rules that the computers use to move files from one computer to another on the
Internet.
The most common transfer protocol used on the Internet is the Hypertext Transfer Protocol (HTTP).
Two other protocols that you can use on the Internet are the File Transfer Protocol (FTP) and the Telnet Protocol
INTERNET TERMINOLOGY
Internet a network that links networks worldwide by satellite and telephone
Web a collection of electronic files linked together; anatomy similar to a spider’s web
Search engine a computer program that searches for specific words or phrases on the web
Website a collection of one or more web pages
Intranet an internal network of data and information that is used in many companies; typically
password protected, accessible only from within the company’s confines, and housed on a
separate server. Contains the same features as the internet
Home page the first page of a website; usually contains an index of the entire website
Server systems that store information shown on the web; stores web pages and other information
used both on the internet and intranet
Address field the place on the screen in which you type the URL or web address
Online being connected to the Internet
Status bar a symbol at the bottom of a web page that indicates the percentage of the page that has loaded
URL Uniform Resource Locator; a unique address that sends a request to the server which houses
the information you are looking for
Window a screen that displays a web page
Domain an identification string located at the end of a web address; examples - .net, .org, .com
www world wide web; the extension which begins many URLs
Hyperlinks text and images within a website that reference other web pages or sites; usually appear in a
different color and are underlined. Cursor will change to a hand icon when touched
Tab a feature that allows you to open multiple web pages or windows at once
WEB APPLICATIONS
• Distributing and Sharing Scientific Data:
• Share scientific information ( data, papers, databases)
• among scientists around the world
• E-Commerce:
• Electronic marketing and advertising, online shopping
• (order/purchase, payment), online trading, online customer services.
• Online Education and Training:
• On-line courses, training program and information, distance learning
• Organization and Public Service:
• Distributing public service information for organizations and
• government offices.
• Online Publishing:
• Online books, magazines and journals, newspapers, Video, CD .
• Online Banking and Trading:
• Support online bank transactions for banks and stockbrokerages