0% found this document useful (0 votes)
162 views193 pages

Class 11 Computer Notes

The document is a comprehensive guide for Class 11 students on basic concepts of Information Technology, covering topics such as computer systems, input/output devices, processing hardware, and data representation. It includes detailed explanations of computer components, their functions, and various coding schemes like ASCII and EBCDIC. Prepared by Sir Aqib, it serves as a resource for understanding the fundamentals of computer science and information technology.

Uploaded by

ishwahnaveed91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views193 pages

Class 11 Computer Notes

The document is a comprehensive guide for Class 11 students on basic concepts of Information Technology, covering topics such as computer systems, input/output devices, processing hardware, and data representation. It includes detailed explanations of computer components, their functions, and various coding schemes like ASCII and EBCDIC. Prepared by Sir Aqib, it serves as a resource for understanding the fundamentals of computer science and information technology.

Uploaded by

ishwahnaveed91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ME English Center

New Computer Book


Class 11th Notes

er
nt
(According Ce
to new book )
ish
gl

If you are needed for other classes guess papers


En

contact on this number 03408057780


E
M

Prepared by | Sir Aqib


1st year CS - Chapter # 01

Class: 1st year

Chapter # 1

Basic Concepts of Information Technology

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 59


1st year CS - Chapter # 01
Contents
Computer Science ....................................................................................................................................................................... 4
Information Technology.............................................................................................................................................................. 4
Computer System ....................................................................................................................................................................... 4
Input Devices: ............................................................................................................................................................................. 5
Processing Hardware .................................................................................................................................................................. 5
Central Processing Unit ............................................................................................................................................................... 6
Main Memory ............................................................................................................................................................................. 6
How Data and Programs are Represented in the Computer ....................................................................................................... 7
Binary Coding Schemes ............................................................................................................................................................... 8
The Parity Bit .............................................................................................................................................................................. 9
The System Unit of Micro-computer ......................................................................................................................................... 10

er
Main Memory or Random Access Memory (RAM) .................................................................................................................... 11
Read Only Memory (ROM)........................................................................................................................................................ 12

nt
Expansion Cards and Slots ........................................................................................................................................................ 13

Ce
Ports ......................................................................................................................................................................................... 13
Output Devices ......................................................................................................................................................................... 14
Types of Output ............................................................................................................................................................... 14
ish
Softcopy Output Hardware ....................................................................................................................................................... 14
Monitors ................................................................................................................................................................................... 14
gl

Types of Monitors ............................................................................................................................................................ 14


En

Key Considerations When Choosing a Monitor.............................................................................................................. 15


Voices and Sounds .................................................................................................................................................................... 15
Voice-Output Devices....................................................................................................................................................... 15
E

Sound-Output Devices .............................................................................................................................................................. 16


M

Hardcopy Output Hardware...................................................................................................................................................... 16


Printers ..................................................................................................................................................................................... 16
Categories of Printers ...................................................................................................................................................... 16
Impact Printers ................................................................................................................................................................ 16
Non-Impact Printers ........................................................................................................................................................ 17
Plotters ..................................................................................................................................................................................... 17
Types of Plotters .............................................................................................................................................................. 17
Computer Output Microfilm/Microfiche (COM) Systems ............................................................................................. 18
Applications ..................................................................................................................................................................... 18
Storage Hardware ..................................................................................................................................................................... 18
Key Features .................................................................................................................................................................... 18
Benefits of Secondary Storage ......................................................................................................................................... 18
Types of Storage Devices ................................................................................................................................................. 18
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 59
1st year CS - Chapter # 01
Magnetic Storage ...................................................................................................................................................................... 19
Floppy Disk:........................................................................................................................................................................... 19
Types of Floppy Disks ...................................................................................................................................................... 19
Features of a 3½-Inch Floppy Disk.................................................................................................................................. 19
Disk Storage Mechanics ................................................................................................................................................... 19
Care for Floppy Disks ...................................................................................................................................................... 20
Hard Disks: ............................................................................................................................................................................ 20
Key Components .............................................................................................................................................................. 20
Types of Hard Disks ......................................................................................................................................................... 20
Data Organization............................................................................................................................................................ 20
Capacity Calculation........................................................................................................................................................ 20
Fragmentation and Defragmentation .............................................................................................................................. 21

er
Example: Capacity Computation .................................................................................................................................... 21
Magnetic Tape: ..................................................................................................................................................................... 21

nt
Advantages of Magnetic Tape: ........................................................................................................................................ 22

Ce
Disadvantages of Magnetic Tape:.................................................................................................................................... 22
Hard Disk Storage: .......................................................................................................................................................... 22
Conclusion:....................................................................................................................................................................... 22
ish
Optical Storage Devices: ....................................................................................................................................................... 22
Types of Optical Disks: .................................................................................................................................................... 23
gl

Comparison of Optical Disk Types: ................................................................................................................................ 23


En

Software ................................................................................................................................................................................... 24
Classification of Software: ............................................................................................................................................... 24
Comparison Between System Software and Application Software: ............................................................................... 24
E

The Operating System............................................................................................................................................................... 24


M

Functions of an Operating System: ................................................................................................................................. 24


Types of Operating Systems: ........................................................................................................................................... 25
Popular Operating Systems: ............................................................................................................................................ 25
Operating System Environments: ................................................................................................................................... 25
Language Translators ................................................................................................................................................................ 25
Compiler........................................................................................................................................................................... 25
Interpreter........................................................................................................................................................................ 26
Programming Languages ........................................................................................................................................................... 27
Generations of Programming Languages........................................................................................................................ 27
Section (A)................................................................................................................................................................................ 29
-: Answer Keys :-.............................................................................................................................................................. 31
Section (B / C) .......................................................................................................................................................................... 32

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 59


1st year CS - Chapter # 01
Computer Science
The study of computers, focusing on their design (architecture) and uses in computations, data processing, and system
control. It involves hardware and software design and is distinct from computer engineering, though both overlap in
computer architecture.

Sub-disciplines:

1. Architecture: Design and integration of hardware and software.


2. Software: Includes software engineering, programming languages, operating systems, databases, AI, and
graphics.
3. Theory: Covers algorithms, data structures, and computational methods.

Information Technology
A combination of computer and telecommunications technology used for efficient data processing and
communication. It emphasizes the effective use of information in various domains.

er
Characteristics of a Computer:

nt
1. Speed: Performs millions of operations per second.
2. Accuracy: High precision, with errors usually caused by humans.
3.
4.
5.
6.
Diligence: Works tirelessly without errors.
Ce
Versatility: Can perform diverse tasks with appropriate programs.
Memory: Stores and recalls information accurately for any duration.
No IQ: Operates based on instructions, with no independent decision-making.
ish
7. No Feelings: Lacks emotions or subjective judgment.

Computer System
gl

A computer system is a group of integrated parts working together to achieve a goal. It has:
En

1. Multiple elements.
2. Logically related components.
3. Coordinated control to achieve objectives.
E
M

The computer integrates input/output devices, CPU, and storage, functioning as a system where all components
depend on each other.

Parts of a Computer System:

1. Hardware: Physical components like keyboard, monitor, mouse, and printer.


2. Software: Programs or instructions that tell the computer what to do.
3. Data: Raw facts processed into meaningful information.
4. Procedures: Guidelines or steps to use hardware, software, and data.
5. People: Users who operate the computer system and utilize its output.

Core Functional Elements:

1. Input: Devices to provide data to the computer.


2. Processing: CPU processes data according to instructions.
3. Output: Devices that display or produce results.
4. Storage: Temporary (RAM) or permanent (disk drives) data storage.

Peripheral devices enhance input, output, and storage capabilities, completing the system.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 59
1st year CS - Chapter # 01
Input Devices:
Input devices convert human-readable data into machine-readable binary form. They fall into two categories:

1. Keyboard Devices: Use keyboards for input.


2. Non-Keyboard Devices: Use alternative methods to input data directly.

Keyboard Input Devices

1. Keyboard: Primary input device, featuring:


o Character Keys: Letters, numbers, and symbols (QWERTY layout).
o Function Keys: Shortcut keys (e.g., F1 for help).
o Special-Purpose Keys: Keys like Enter, Ctrl, Alt, Shift, and Caps Lock.
o Numeric Keypad: For numeric entries and calculations.
o Cursor Keys: Navigate the screen (arrows).
2. Terminals: Devices combining keyboard and display to input/retrieve data. Types:
o Dumb Terminals: For basic data entry/retrieval.

er
o Smart Terminals: With limited memory for minor processing.
o Intelligent Terminals: Function like microcomputers with added processing capabilities.

nt
Non-Keyboard Input Devices

Ce
1. Scanning Devices: Convert images or characters into electronic data:
 Bar-Code Readers: Hand-held or stationary scanners for reading bar codes.
ish
 Optical Mark Readers (OMR): Detects marks (e.g., in exams).
 Optical Character Readers (OCR): Reads printed text and converts it.
 Magnetic Ink Character Recognition (MICR): Reads magnetic ink (e.g., on cheques).
gl

 Image Scanners: Flatbed, sheet-fed, or hand-held for digitizing images or text.


 Fax Machines: Send/receive document images via phone lines.
En

2. Voice Input Devices: Convert spoken words to binary code (e.g., voice commands, inventory control, or
aiding disabled users).
E

3. Pointing Devices: Enable intuitive user interaction:


M

 Mouse: Moves cursor and issues commands.


 Trackball: Stationary mouse-like device.
 Joystick: Used for gaming and controlling screen objects.
 Touch Screen: Accepts input via direct touch.
 Light Pen: Sensitive pen for drawing/commands on screens.
 Digitising Tablet: Converts hand-drawn designs into digital data.
 Pen-Based Computers: Allow handwriting input directly on the screen.

Processing Hardware
Includes electronic circuitry for computations and operations:

1. Central Processing Unit (CPU): Brain of the computer.


2. Memory: Stores data and instructions temporarily.

Both components reside on the motherboard.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 59


1st year CS - Chapter # 01
Central Processing Unit
The CPU is the "brain" of the computer, responsible for executing program instructions. In microcomputers, the entire
CPU is contained on a small chip called a microprocessor. This chip defines the type and overall characteristics of the
computer, such as 8088 (IBM XT) or 80486 (IBM AT).

Key Components of the CPU

1. Control Unit (CU):


 Manages all resources and coordinates the computer's activities.
 Contains the instruction set, which provides commands the CPU can execute.
 Acts as a "traffic controller," directing the flow of data within the CPU and the computer.

2. Arithmetic/Logic Unit (ALU):


 Arithmetic operations: Handles basic math functions such as addition, subtraction, multiplication, and
division.
 Logical operations: Compares data (e.g., =, >, <).

er
 Utilizes registers, which temporarily store data while operations are being performed.

nt
Main Memory

Ce
The main memory serves as a workspace for the CPU, holding programs and data currently in use. It is also called
primary storage, internal storage, or simply memory. Although closely linked to the CPU, it operates as a separate
ish
component.

Characteristics of Main Memory


gl

1. Temporary Storage:
En

 Stores data and instructions only while the program is running.


 Once the computer is turned off, the data is lost.
2. Reasons for Temporary Use:
 Memory clears when the computer powers off.
E

 Memory is shared among users on the same system.


 Limited memory capacity may not suffice for all processed data.
M

How Main Memory Works

 Input to Memory: The Control Unit (CU) sends data and instructions from input devices to memory.
 Processing: When needed, the CU moves this data from memory to the Arithmetic/Logic Unit (ALU) for
calculations or logical operations.
 Output Preparation: Processed data returns to memory until it is sent to an output device.

Key Advantage

Main memory provides fast access to data and instructions, ensuring efficient processing regardless of their physical
location in memory.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 59


1st year CS - Chapter # 01
How Data and Programs are Represented in the Computer
Computers process data in binary form, using only 0s and 1s, because they operate electronically or magnetically:

 0: Represents "off" (no current, low voltage, or absence of a magnetic spot).


 1: Represents "on" (current, high voltage, or presence of a magnetic spot).

For example, the letter E can be represented as 01000101 in binary.

Basic Units of Data

1. Bit (Binary Digit):


 The smallest unit of data in a computer, either 0 or 1.
 Represents the state of a switch (on/off).
2. Byte:
 A group of 8 bits, usually representing a single character (letter, digit, or symbol).

er
Data Storage Units

nt
1. Kilobyte (KB):
 1 KB = 1024 bytes (commonly rounded to 1000 bytes).
 Example: 640 KB = 655,360 bytes.
2. Megabyte (MB): Ce
 1 MB = 1024 KB = 1,048,576 bytes (commonly rounded to 1 million bytes).
ish
3. Gigabyte (GB):
 1 GB = 1024 MB = 1,073,741,824 bytes (commonly rounded to 1 billion bytes).
4. Terabyte (TB):
gl

 1 TB = 1024 GB.
En

Computer Word and Bus

1. Word Size:
E

o Refers to the number of bits a processor can handle at once.


o Example:
M

 A 32-bit processor processes 32 bits at a time.


 A 64-bit processor processes 64 bits, offering greater efficiency.
2. Bus:
o A set of wires that transfers data between components.
o Bus Size: Matches the processor’s word size (e.g., a 32-bit processor has a 32-bit bus).

Advantages of Larger Word and Bus Sizes

1. Faster data transfer.


2. Larger memory addressing capability.
3. Supports more complex instructions.

Example:
 Intel Pentium: Uses a 32-bit word size.
 Intel Pentium III and 4: Use a 64-bit word size, making them faster and more powerful.

 By representing data in binary and organizing it into bits, bytes, and larger word sizes, computers achieve speed and
efficiency.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 59


1st year CS - Chapter # 01
Binary Coding Schemes
To transfer data in or out of a computer, characters like numbers, letters, and symbols are converted into binary code.
Two widely used coding schemes for this purpose are ASCII and EBCDIC.

1. ASCII (American Standard Code for Information Interchange)

 Usage: Popular in microcomputers and some larger systems.


 History:
o Originally developed for electric teletypewriters.
o Adopted for personal computers and became an industry standard.
 Code Characteristics:
o Standard ASCII: 7-bit binary code, capable of representing 128 characters.
o Extended ASCII: 8-bit binary code, introduced by IBM in 1981, representing 256 characters.
o Widely used in personal computers.

2. EBCDIC (Extended Binary Coded Decimal Interchange Code)

er
 Usage: Standard for IBM and IBM-compatible mainframe computers.
 Code Characteristics:

nt
o 8-bit code, capable of encoding 256 characters.
o Used for mainframes rather than personal computers.

Representation of Numbers Ce
ish
 In binary, numbers use varying bit lengths (e.g., 1111 for 15 and 10111001 for 185).
 Both ASCII and EBCDIC solve this inconsistency by encoding each digit separately.
o Example:
gl

 15 in EBCDIC:
 '1' → 11110001 (1 byte)
En

 '5' → 11110101 (1 byte)

Example: ASCII Code for "SCHOOL"


E

Using an ASCII keyboard encoder, each character in "SCHOOL" is represented in 8 -bit binary as follows:
M

Character Binary (8-bit ASCII)


S 10110011
C 10100011
H 10101000
O 10101111
O 10101111
L 10101100
Output (Binary Representation for "SCHOOL"):

10110011 10100011 10101000 10101111 10101111 10101100

This encoding enables computers to understand and process the input message "SCHOOL."

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 59


1st year CS - Chapter # 01
The Parity Bit
During data transmission, errors can occur due to irregularities in the electrical signals. The parity bit is a simple
mechanism to detect such errors efficiently without retransmitting data.

What is a Parity Bit?

 Definition:
A single bit added to the end of a byte to help detect errors in data transmission.
o Even Parity: Ensures an even number of 1s in the byte (including the parity bit).
o Odd Parity: Ensures an odd number of 1s in the byte (including the parity bit).

How Even Parity Works

1. Count the number of 1s in the byte:


o If the count is odd, the parity bit is set to 1.
o If the count is even, the parity bit is set to 0.

er
nt
Example with ASCII Code:

Ce
Letter "S" (1011 0011):
o Count of 1s = 5 (odd).
o Parity bit = 1 (to make the total even).
o Transmitted byte: 1011 0011 1.
ish
 Letter "C" (1010 0011):
o Count of 1s = 4 (even).
o Parity bit = 0 (total remains even).
gl

o Transmitted byte: 1010 0011 0.


En

Error Detection

 If a single bit is transmitted incorrectly, the parity check will identify the error.

E

Example (Even Parity):


o Transmitted byte for "S": 1011 0011 1 (6 bits are 1).
M

o If received as 1011 0010 1 (5 bits are 1), parity is odd, indicating an error.

Limitations of Parity Checking

1. Single-bit Error Detection Only:


o Detects errors when only one bit is incorrect.
o Fails to detect errors when two bits are incorrect, as the parity remains unchanged.
2. No Error Correction:
o Parity checks can identify errors but cannot fix them.

Longitudinal Parity (Advanced Error Detection)

 Definition:
Adds a check byte at the end of the data.
o Each bit of the check byte ensures the correct parity for each column of bits in the transmitted record.
 Use Case:
o Used in systems where double-bit errors or multiple errors are a concern.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 59


1st year CS - Chapter # 01
Encoding for Error Correction

 More sophisticated methods exist for detecting and correcting errors.


o Example: Codes used in space communication.
 These methods require complex processing but are crucial for critical applications like satellite data
transmission.

Parity bits remain a fundamental and efficient tool for error detection in simpler systems, while advanced error -
correcting codes handle complex, high-stakes transmissions.

The System Unit of Micro-computer


The system unit, housed within a system cabinet, contains critical components that enable the microcomputer to
function. These components can often be removed or upgraded to enhance performance. Below is a detailed
breakdown of the primary components.

1. Power Supply

er
 Function: Converts 220V AC to 5V or 12V DC for internal components.

nt
 Additional Role: Provides power to built-in monitors (e.g., in Macintosh).
 Cooling: Includes a fan to prevent overheating.

2. Motherboard Ce
ish
 Definition: A large circuit board containing the CPU, memory, and essential electronics.
 Components:
o CPU (Microprocessor): Manages all processing tasks.
gl

o Memory Chips: RAM and ROM.


o Expansion Slots: Allow additional components like graphics or network cards.
En

3. Microprocessor (CPU)
E

 Role: The brain of the computer, performing calculations and managing data flow.
 Key Features:
M

o Registers: Temporary storage within the CPU for immediate processing.


 Measured by word size (e.g., 16-bit, 32-bit, 64-bit).
o Bus: Pathways for data transfer between CPU components.
 Bus Width: Determines data transfer speed (e.g., 8-bit, 32-bit, 64-bit).
o Clock Speed: Governs the processing speed, measured in megahertz (MHz) or gigahertz (GHz).
o Coprocessors: Assist the CPU in handling specific tasks like mathematical calculations.

4. Main Memory (RAM)

 Definition: Volatile memory used for temporary storage while the computer is running.
 Function: Speeds up data access for the CPU.

5. Read-Only Memory (ROM)

 Definition: Non-volatile memory containing permanent data and instructions (e.g., boot processes).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 59


1st year CS - Chapter # 01
6. Expansion Cards and Slots
 Expansion Cards: Add functionality like improved graphics (GPU) or sound.
 Slots: Allow integration of these cards into the motherboard.

7. Ports

 Function: Connect external devices like keyboards, mice, and storage.

Comparison of Microprocessors (Intel)


Processor Year Word Size Bus Width Clock Speed
8086 1978 16 bits 16 bits 5-10 MHz
80386 DX 1985 32 bits 32 bits 16-33 MHz
Pentium 1993 32 bits 64 bits 66-233 MHz
Pentium III 1999 64 bits 64 bits 450 MHz-1.13 GHz
Pentium 4 2000 64 bits 64 bits 1.30-3.06 GHz

er
Summary

nt
The system unit integrates the CPU, memory, and expansion capabilities to power and enhance microcomputer
performance. Modern advancements like wider bus widths, faster clock speeds, and dedicated coprocessors ensure
improved speed and efficiency.

Main Memory or Random Access Memory (RAM)


Ce
ish
 RAM is the primary, volatile memory of a computer, temporarily storing data and instructions for programs
actively used by the CPU.
gl

 It is called random access because any data can be accessed in the same amount of time, regardless of its
location on the chip.
En

Key Characteristics:
E

1. Volatile Memory:
o Data is lost when the computer is turned off.
M

2. Temporary Storage:
o Data from secondary storage (like a hard disk) is loaded into RAM for processing.

Benefits of Higher RAM Capacity:

1. Accommodates larger programs.


2. Supports multitasking by holding multiple programs simultaneously.
3. Improves speed and efficiency.
4. Enables use of sophisticated software.
5. Enhances graphics and animation capabilities.
6. Handles larger datasets.

Physical Structure:

 Chips: RAM consists of silicon chips attached to the motherboard.


 Modules: RAM is mounted on:
o SIMMs (Single Inline Memory Modules) – chips on one side.
o DIMMs (Dual Inline Memory Modules) – chips on both sides.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 59


1st year CS - Chapter # 01
Types of RAM Chips:

1. DRAM (Dynamic RAM):


o Most common; slower but cheaper.
2. SRAM (Static RAM):
o Faster and more reliable; used for specialized purposes.

Other Forms of Memory:

1. Cache Memory:

 Purpose: Speeds up CPU operations by storing frequently used data and instructions.
 Characteristics:
o Faster but more expensive than RAM.
o Ideal for large, complex programs.

2. Virtual Memory:

er
 Definition: Extends RAM using hard disk space, allowing programs larger than physical RAM to run.

nt
 Example: A computer with 2 MB RAM can run a 4 MB or even 1 GB program.

3. Video Memory (VRAM):

 Purpose: Stores display images for the monitor.


Ce
ish
 Benefits:
o Enhances image speed and color range.
o Essential for graphics-intensive programs.
gl

4. Flash Memory:
En

 Definition: Non-volatile memory retaining data without power.


 Applications:
o Used in portable devices (e.g., notebooks).
E

o Replaces hard drives in some cases.


M

o Supplements or simulates RAM.

Read Only Memory (ROM)


ROM is a type of non-volatile memory that stores data permanently, retaining its contents even when the power is
turned off. Users cannot modify or write to the contents of ROM.

Characteristics of ROM:

1. Non-volatile: Contents remain intact even when the computer is powered off.
2. Read-only: Data can be accessed but not altered by the user.
3. Firmware: ROM instructions are "firm" and pre-installed, essential for basic computer operations.

Common Uses of ROM:

 BIOS (Basic Input/Output System):


o Controls fundamental operations like booting up the computer and managing communication between
hardware and software.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 12 of 59


1st year CS - Chapter # 01
 Input/Output Instructions:
o Facilitates data transfer between the CPU, keyboard, screen, and printer.

Types of ROM:
1. Programmable Read-Only Memory (PROM):

 Customizable ROM:
o Users can write their own data once.
 Non-editable:
o After programming, the data becomes permanent, similar to standard ROM.

2. Erasable Programmable Read-Only Memory (EPROM):

 Reprogrammable:
o Stored data can be erased and rewritten.
 Use Case:

er
o Commonly used by researchers and developers for testing purposes.
 Erasure Method:

nt
o Typically erased using ultraviolet light.

Expansion Cards and Slots


Ce
Expansion cards are optional circuit boards that add functionality to a computer. They are inserted into expansion slots
on the motherboard, connecting them to the system's power supply and buses.
ish
Examples of Expansion Cards:
gl

1. Memory Cards:
o Add extra RAM to enhance system performance.
En

2. Modem Cards:
o Enable communication over telephone lines, essential for internet connectivity.
3. Video Display Cards:
o Improve monitor resolution and color capabilities, beneficial for graphics.
E

4. Sound Cards:
M

o Enable sound output when paired with speakers and compatible software.

Ports
Ports are physical connecting points located on the outside of a computer system unit. They enable the attachment of
external devices like monitors, keyboards, printers, and modems to the computer, allowing data exchange between the
system and the device.

Types of Ports

1. Serial Ports:
o Data Transmission: Sends data one bit at a time in a sequential manner.
o Use Case: Ideal for connecting devices over long distances, such as modems or external sensors.
o Speed: Slower compared to parallel ports.
2. Parallel Ports:
o Data Transmission: Sends multiple bits (often 8) simultaneously.
o Use Case: Best for nearby devices like printers.
o Speed: Faster than serial ports for short distances.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 13 of 59


1st year CS - Chapter # 01
3. USB Ports (Universal Serial Bus):
o Versatility: Supports up to 127 peripheral devices through a single port.
o Plug-and-Play: Devices are automatically detected and configured.
o Hot-Swapping: Devices can be connected or disconnected while the computer is running.
o Use Case: Commonly used for devices like digital cameras, scanners, external drives, speakers, and
joysticks.

Output Devices
Output devices convert computer-processed data into a form understandable by humans. This output can be either
softcopy or hardcopy.

Types of Output

1. Softcopy:
o Definition: Output that cannot be physically touched.
o Examples: Display on monitors, sound from speakers, or voice output.

er
o Use Case: Suitable for temporary or immediate information display, e.g., airport schedules.
2. Hardcopy:

nt
o Definition: Output in a physical, touchable form.
o Examples: Printed documents, plotted graphs, or microfilm.

Ce
o Use Case: Best for archival purposes or long-term use, e.g., reports or blueprints.

Softcopy Output Hardware


ish
Softcopy output devices are of three principal types:
1. Monitors
gl

2. Voice output devices


En

3. Sound output devices

Monitors
E

Monitors are essential output devices used to display text and graphics, particularly when a permanent record is
unnecessary. They are commonly categorized into Cathode-Ray Tube (CRT) monitors and Flat Panel monitors.
M

Types of Monitors

1. Cathode-Ray Tube (CRT) Monitors

 Resemble a television screen.


 Use an electron gun to illuminate pixels coated with phosphor on the screen.
 Resolution: Determines image clarity, measured by the number of pixels (e.g., 640×480, 800×600). Higher
resolution = sharper image.
 Monochrome vs. Color:
o Monochrome: Displays single colors (e.g., paper-white, amber, or green screens).
o Color: Uses three electron guns (RGB) to combine intensities and display a variety of colors.
 Standards:
o SVGA: 800×600 pixels, supports 16 million colors.
o XGA: 1024×768 pixels, supports 65,536 colors.
o SXGA: 1280×1024 pixels, suitable for 19- and 21-inch monitors.
o UXGA: 1600×1200 pixels, ideal for graphic design and engineering.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 14 of 59


1st year CS - Chapter # 01
2. Flat Panel Monitors

 Compact and suitable for portable devices like laptops.


 Advantages over CRT:
o Smaller size, low power consumption, and reduced flickering.
 Types:
o Liquid Crystal Display (LCD):
 Uses liquid chemicals to block light and form pixels.
 Advantages: Low cost, low power usage, and compact size.
 Disadvantages: Low contrast, glare issues, and limited resolution.
o Electroluminescent (EL) Display:
 Uses a thin film that glows under electric current.
 Advantages: High resolution, excellent graphics.
 Disadvantages: High cost.
o Gas-Plasma Display:
 Uses gas to emit light when charged, similar to neon lights.
 Advantages: Bright images, high resolution, minimal glare.

er
 Disadvantages: Expensive, single-color display, high power consumption.

nt
Key Considerations When Choosing a Monitor

1.
2.
3.
Ce
Resolution: Higher resolution ensures better image quality.
Type: CRT for cost-effectiveness; Flat Panel for portability and advanced features.
Purpose: Monochrome for basic tasks; Color for multimedia and design work.
ish
4. Size: Larger monitors (e.g., 21 inches) offer better productivity for design tasks.

Monitors have evolved significantly, with flat-panel technology being increasingly favored for its versatility and
gl

energy efficiency.
En

Voices and Sounds


Recent advancements in softcopy output have significantly enhanced the use of sound, primarily through voice-
output devices and sound-output devices.
E

Voice-Output Devices
M

Voice-output devices, also known as voice synthesizers, convert computer data into understandable vocalized sounds.
These are not real human voices but synthesized versions.

Applications of Voice-Output Devices

 Audible alerts: "Please fasten your seatbelt," or "You are exceeding 60 kilometers per hour."
 Assistance for visually impaired users: Reading machines for the blind that convert printed text into speech.

Use Cases

 Navigation systems.
 Reading aids for visually impaired users.
 Automated announcements in public spaces.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 15 of 59


1st year CS - Chapter # 01
Sound-Output Devices
Sound-output devices generate audio such as music, sound effects, and other noises. They are essential for enhancing
multimedia experiences, combining text, graphics, video, animations, and sound.

Applications

 Entertainment: Games and movies with immersive sound effects.


 Multimedia Presentations: Combining visuals with audio for impactful storytelling.
 Educational Tools: Enhancing e-learning with narrated content.
 Accessibility: Supporting visually impaired users with audio cues.

Hardcopy Output Hardware

Hardcopy output devices are of three principal types:


1. Printers

er
2. Plotters
3. Computer output microfilm/microfiche (COM)

nt
Printers

Ce
Printers are crucial output devices, producing hard copy outputs, which are tangible and permanent compared to
screen-displayed soft copies. Printers are categorized based on their mechanism of operation and purpose.
ish
Categories of Printers
gl

1. Impact Printers: Use physical contact to print.


2. Non-Impact Printers: Operate without physical contact.
En

Additionally, printers can be:

 Character Printers: Print one character at a time (e.g., typewriters).


E

 Line Printers: Print an entire line at once, ideal for high-volume tasks.
M

Impact Printers

1. Dot-Matrix Printers:
o Use pins striking an ink ribbon to create patterns of dots.
o Advantages: Inexpensive, can print graphics.
o Disadvantages: Noisy, low-quality output.
2. Daisy Wheel Printers:
o Utilize a wheel with embossed characters.
o Advantages: High-quality, clear characters.
o Disadvantages: Slow, cannot print graphics.
3. Drum Printers:
o Cylindrical drum rotates to align characters for hammers to strike.
o Advantages: High speed (200-2000 lines per minute).
o Disadvantages: Noisy, limited character set.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 16 of 59


1st year CS - Chapter # 01
4. Chain Printers:
o Characters are printed by hammers striking a rotating chain.
o Advantages: Fast, handles multiple copies with carbon paper.
o Disadvantages: Expensive, difficult to change chains.

Non-Impact Printers

1. Thermal Printers:
o Heat-sensitive paper reacts to create images.
o Advantages: High-quality output, quiet.
o Disadvantages: Expensive paper, slow.
2. Inkjet Printers:
o Spray charged ink droplets onto paper.
o Advantages: Affordable, prints in color, excellent for graphics.
o Disadvantages: Slow, ink can clog.
3. Laser Printers:
o Laser beams etch images onto a drum, attracting toner transferred to paper.

er
o Advantages: High speed, superior quality, quiet.
o Disadvantages: High initial cost, single-color restrictions in basic models.

nt
Comparison Table

Type
Dot-Matrix
Advantages
Inexpensive, can print graphics
Ce Disadvantages
Noisy, low-quality output
Speed
80-260 cps
ish
Daisy Wheel Letter quality, crisp characters Slow, no graphics or color 60-100 cps
Thermal Quiet, high-quality color output Expensive, special paper needed 0.5-4 ppm
Inkjet Color, good for graphics Slow, clogging issues 1-4 ppm
gl

Laser High-quality, fast, quiet Expensive initial cost 4-25 ppm


En

Plotters
E

A plotter is a specialized output device used to create large-scale, high-precision drawings, such as architectural plans,
blueprints, or engineering designs. Unlike printers, plotters use a robotic arm to draw with pens on paper.
M

Types of Plotters

1. Pen Plotters
o Use colored pens to draw images.
o Drum Plotters: Paper is rolled on a drum while the pen moves.
o Flatbed Plotters: Paper remains stationary as the pen moves.
2. Electrostatic Plotters
o Use electrostatic charges on special paper, developed later.
o Advantages: Faster and produce higher-quality images.
3. Thermal Plotters
o Employ heated pens on heat-sensitive paper.
o Advantages: High-quality output but limited to two colors.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 17 of 59


1st year CS - Chapter # 01
Computer Output Microfilm/Microfiche (COM) Systems

COM systems reduce large volumes of output into miniature formats for storage, like microfilm (rolls) and
microfiche (sheets).

Advantages:

1. Speed: Handles over 30,000 lines per minute.


2. Space Efficiency: Reduces storage needs by 20 to 100 times.
3. Cost: Lower cost per page compared to printed outputs.

Disadvantages:

 Special microfilm/microfiche readers are required to view the reduced-size output.

Applications

er
 Libraries: Store newspapers or magazines to save space.
 Medical Facilities: Miniaturized X-rays for compact storage.

nt
Note: Optical disks are increasingly replacing COM systems for high-volume data storage.

Ce
Storage Hardware
ish
Secondary storage, also called auxiliary storage, provides permanent, non-volatile data storage. Unlike main memory
(RAM), secondary storage retains its contents even when the power is turned off.
gl

Key Features
En

1. Non-Volatile: Data is retained after the power is off.


2. Access Time:
o Random Access: Constant time for locating and retrieving data (e.g., RAM).
E

o Cyclic Access: Data is retrieved as it circulates in a loop (e.g., disk).


M

o Sequential Access: Data is read in order, with longer access times (e.g., magnetic tape).

Benefits of Secondary Storage

1. Economy: Cheaper than physical filing systems, with vast storage capacities.
2. Reliability: Data is physically safe and difficult to tamper with.
3. Convenience: Allows quick and efficient data retrieval for authorized users.

Types of Storage Devices

Magnetic Storage

1. Floppy Disks: Portable but outdated.


2. Hard Disks: Large storage capacity, widely used.
3. Magnetic Tape: Suitable for sequential data storage and backup.

Optical Storage

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 18 of 59


1st year CS - Chapter # 01
1. CD-ROM: Read-only; used for software and media.
2. CD-R: Recordable; allows data writing once.
3. CD-RW: Rewritable; allows multiple writes.
4. DVD-ROM: Higher capacity than CDs; used for video and data storage

Magnetic Storage
The three most common storage devices-floppy-disk drives, hard-disk drives, and tape drives all use similar
techniques for reading and writing data, because all use the same medium (the material on which the data are stored).
The surfaces of floppy disks, hard disks, and magnette tape are all coated with a magnetically sensitive material
(usually iron oxide), which reacts to a magnetic field.

Floppy Disk:

A floppy disk (or diskette) is a removable, portable storage medium primarily used in earlier computers for storing
and transferring data. Its name originates from the flexible magnetic disk inside its rigid plastic casing

er
Types of Floppy Disks

nt
Floppy disks are categorized by size (diameter) and density (data storage capacity).

Sizes

1. 5¼-inch: Older model, now obsolete. Ce


2. 3½-inch: More durable and widely used; available in three densities:
ish
o Double Density (720 KB)
o High Density (1.44 MB)
o Extra-High Density (2.88 MB)
gl

Features of a 3½-Inch Floppy Disk


En

1. Hub: Centers the disk for proper rotation.


2. Data Access Area: Protected by a metal shutter, which slides open when inserted into a drive.
E

3. Write-Protect Notch: Prevents accidental erasure when uncovered.


4. High-Density Indicator: Additional hole indicating 1.44 MB capacity.
M

5. Stress Relief Notches: Prevent physical damage to the disk.

Disk Storage Mechanics

Floppy disks store data on tracks, sectors, and sides:

 Tracks: Concentric circles where data is recorded.


 Sectors: Wedge-shaped divisions of tracks, marked during formatting.
 Sides: Single-sided disks store data on one side; double-sided disks store data on both sides.
 Density: Indicates the amount of data per inch (bits per inch or bpi).

Capacity Calculation for a High-Density 3½-Inch Disk

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 19 of 59


1st year CS - Chapter # 01
 Sectors per track: 18
 Tracks per side: 80
 Sides: 2
 Bytes per sector: 512
Total Capacity=18×80×2×512=1,474,560 bytes (1.44 MB)\text{Total Capacity} = 18 \times 80 \times 2 \times
512 = 1,474,560 \, \text{bytes (1.44 MB)}Total Capacity=18×80×2×512=1,474,560bytes (1.44 MB)

Care for Floppy Disks

1. Always keep in protective covers.


2. Avoid bending or dropping.
3. Handle carefully when inserting into a drive.
4. Do not touch the magnetic surface.
5. Protect from heat, sunlight, and magnetic fields.

Hard Disks:
A hard disk, also known as a fixed disk, is the primary storage device in modern computers. It is classified as a

er
mass-storage device due to its ability to store vast amounts of data, often in the range of gigabytes (GB) or terabytes
(TB).

nt
Key Components
Ce
1. Platters: Rigid magnetic disks where data is recorded. Multiple platters are stacked on a spindle, allowing high
storage capacity.
ish
2. Read/Write Heads: Positioned on movable arms or fixed mechanisms, these heads read and write data on the
platters.
3. Spindle/Shaft: Rotates the platters at high speeds, typically 7,200 RPM or more.
gl

4. Hard Drive Unit: Combines the platters, spindle, motor, and read/write heads in a sealed casing.
En

Types of Hard Disks

1. Moving-Head Disks:
E

o A single access arm moves all the read/write heads together to the required track.
o Slower than fixed-head disks.
M

2. Fixed-Head Disks:
o Each track has a dedicated read/write head.
o Offers faster data access.

Data Organization

1. Tracks: Concentric circles on the platter.


2. Sectors: Wedge-shaped sections of a track, typically storing 512 bytes each.
3. Cylinders: A set of tracks on the same position across all platters.

Capacity Calculation

The storage capacity of a hard disk is determined by multiplying the following:

Capacity = (Cylinders) × (Heads) × (Sectors/Track) × (Bytes/Sector)

Example: For a disk with 12,024 cylinders, 22 heads, 369 sectors/track, and 512 bytes/sector:

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 20 of 59


1st year CS - Chapter # 01
Total Capacity = 12,024 × 22 × 369 × 512 = 49,976,745,984 bytes ≈ 50 GB

Fragmentation and Defragmentation

 Fragmentation: As data files are updated and stored in non-contiguous clusters, the read/write head must
move more, slowing access speeds.
 Defragmentation: Reorganizes data into contiguous clusters, improving performance.

Example: Capacity Computation

Given:

 7 platters: (7 × 2) - 2 = 12 surfaces for data storage (top and bottom surfaces unused).
 Tracks per surface: 80
 Sectors per track: 9
 Bytes per sector: 256

er
Step 1: Calculate the storage capacity of one surface:

nt
Sectors/Surface = 80 × 9 = 720 sectors
Bytes/Surface = 720 × 256 = 184,320 bytes

Step 2: Calculate total disk capacity: Ce


ish
Total Capacity = 12 × 184,320 = 2,211,840 bytes

Convert to KB:
gl

2,211,840
Capacity in KB = = 2,160 KB
En

1024

Thus, the disk can store 2,160 KB.


E

Magnetic Tape:
M

Magnetic tape is a widely used backup medium, often resembling cassette tapes.

1. Structure:
o Data is stored as magnetic spots, representing binary bits.
o Tapes have 9 tracks, with 8 for data bits and 1 for parity.
o Common data encoding standards:
 EBCDIC (used in IBM systems).
 ASCII (used in most others).
2. Storage Density:
o Measured in characters per inch (CPI) or bytes per inch (BPI).
o Advanced tapes can store up to 66 GB.
3. Access Mode:
o Sequential access: Data is written and read in sequence.
o This makes tapes slower for retrieving specific records compared to hard disks.
4. Forms:
o Reel-to-reel tapes.
o Data cartridges and cassettes.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 21 of 59


1st year CS - Chapter # 01
Advantages of Magnetic Tape:

1. Cost-Effective: Less expensive compared to hard disks.


2. Ideal for Backup: Suitable for sequential processing of large data volumes.
3. Durability: Reliable for long-term storage.

Disadvantages of Magnetic Tape:

1. Slow Access Time: Data retrieval can be time-consuming due to sequential access.
2. Update Complexity: Updating a record requires creating a new tape.
3. Limited Interactivity: Not suited for interactive, real-time processing.

Hard Disk Storage:

Hard disks remain a primary storage medium for direct access and online processing.

Advantages of Hard Disks:

er
1. Fast Access: Direct access allows quick retrieval of specific records.

nt
2. Flexibility: Suitable for interactive and online applications.
3. Ease of Update: Can directly modify or add data.

Disadvantages of Hard Disks: Ce


ish
1. Cost: More expensive than magnetic tapes.
2. Risk of Data Loss: Susceptible to mechanical failures like head crashes.
3. Data Fragmentation: May slow performance over time if not defragmented.
gl

Conclusion:
En

 Magnetic Tape is ideal for cost-effective backups and long-term archival of large datasets but is not suited
for frequent updates or interactive processing.

E

Hard Disks are essential for everyday use, fast data access, and real-time applications, but their reliance makes
backups critical to prevent data loss.
M

Choosing between these storage options depends on the intended application, with a combination of both often being
the best solution for comprehensive data protection

Optical Storage Devices:

Optical storage is a key alternative to magnetic storage, leveraging laser technology to read and write data. These
devices offer high-density storage for text, graphics, audio, and video, at a fraction of the cost of magnetic storage.

1. Data Representation:
o Laser burns tiny pits into a disk’s plastic surface to store data.
o Pits: Represent "0" (no reflection).
o Lands: Represent "1" (light reflects).
2. Advantages:
o Cost-effective (1/10 of magnetic tape, 1/100 of magnetic disks).
o Durable against magnetic interference, fingerprints, and dust.
o Only light touches the disk, reducing wear.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 22 of 59


1st year CS - Chapter # 01

3. Disadvantages:
o Slower data retrieval compared to magnetic disks.

Types of Optical Disks:

1. CD-ROM (Compact Disk Read-Only Memory):

 Storage Capacity: Up to 700 MB.


 Use: Stores large volumes of static data like encyclopedias, dictionaries, multimedia, and software.
 Read-Only: Data cannot be altered or erased.

2. CD-R (Compact Disk-Recordable):

 Storage Capacity: 650 MB to 5 GB.


 Characteristics:

er
o Data can be written once and read multiple times.
o Ideal for permanent data records.

nt
o Common uses: Banking, geophysical applications, and archiving.

3. CD-RW (Compact Disk-Rewritable):

 Features:
Ce
ish
o Data can be written, erased, and rewritten.
o Combines magnetic and optical technologies (magneto-optical disk).
o Requires special drives and software.

gl

Use Cases: Desktop publishing, multimedia, and large databases.


En

4. DVD-ROM (Digital Versatile Disk Read-Only Memory):

 Storage Capacity:
o 4.7 GB to 9.4 GB per side (dual-sided: up to 18.8 GB).
E

 Characteristics:
M

o Designed for high-density storage.


o Stores movies, high-quality audio, and computer data.
 Backward Compatibility: Supports playback of CDs and CD-ROMs.

Comparison of Optical Disk Types:

Type Writable Rewritable Capacity Common Use


CD-ROM No No 700 MB Static data, multimedia, software.
CD-R Yes No 650 MB - 5 GB Archiving, permanent records.
CD-RW Yes Yes 650 MB - 5 GB Multimedia editing, databases.
DVD-ROM No No 4.7 GB - 18.8 GB Movies, high-density multimedia.

Summary:

Optical storage devices are an essential component of modern computing, providing cost-effective, durable, and high-
capacity storage for a wide range of applications. While slower than magnetic disks for data access, their affordability
and versatility make them an integral part of data management and multimedia.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 23 of 59


1st year CS - Chapter # 01
Software
Software is the set of instructions that enables a computer to perform tasks. It includes programs, procedures, and
routines essential for computer operation. The term differentiates software (intangible instructions) from hardware
(physical components).

Classification of Software:

Software is broadly categorized into:

1. System Software:
o Manages the computer's internal operations and hardware resources.
o Examples:
 Operating Systems (OS): Controls hardware and enables user interaction (e.g., Windows,
Linux, macOS).
 Language Translators: Converts high-level programming languages into machine-readable

er
instructions (e.g., compilers, assemblers, interpreters).
2. Application Software:

nt
o Designed for user-specific tasks.
o Subcategories:

Ce
 User-Written Software: Custom programs developed to meet specific user needs.
 Ready-Made Software (Packages): Pre-designed software available for general use (e.g.,
Microsoft Word, Excel).
o Examples: Word processors, spreadsheets, database management systems, and payroll systems.
ish
Comparison Between System Software and Application Software:
gl

Aspect System Software Application Software


En

Purpose Manages hardware and system operations. Executes specific tasks for the user.
Examples OS, drivers, utilities. Word processors, spreadsheets, games.
E

Dependency Essential for computer operation. Runs on top of system software.


M

Functionality Controls and integrates hardware. Processes data for real-world applications.

The Operating System


The operating system is a vital system software that manages hardware, software, and system resources to ensure
smooth and efficient operation of a computer. It acts as an intermediary between users and hardware, providing a user-
friendly interface and automating many tasks.

Functions of an Operating System:

1. Processor Management: Allocates CPU resources for various tasks.


2. Memory Management: Assigns and optimizes memory usage for programs and data.
3. Input/Output Management: Coordinates input and output devices like printers and keyboards.
4. File Management: Manages file storage, retrieval, and modification across devices.
5. Job Priority: Determines and enforces the execution order of tasks.
6. Job Transition: Automates transitions between tasks.
7. Command Interpretation: Processes and executes user instructions.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 24 of 59
1st year CS - Chapter # 01
8. Software Coordination: Assigns system tools like compilers and utilities to tasks.
9. Data Security: Protects data and programs from interference and ensures system integrity.
10. Communication Facilitation: Enables interaction between the computer system and users.

Types of Operating Systems:

1. Single-Tasking OS:
o Executes one program at a time.
o Example: MS-DOS, Apple DOS.
2. Multitasking OS:
o Runs multiple programs simultaneously.
o Example: Windows XP, OS/2.
3. Multi-User OS:
o Supports multiple users accessing the system concurrently.
o Example: UNIX, Windows 2000.

Popular Operating Systems:

er
1. MS-DOS/PC-DOS:

nt
o Dominated microcomputers in the 1980s and 1990s.
o Known for internal and external commands like COPY, DIR, FORMAT.
2. UNIX:
Ce
o A multitasking, multi-user OS with high flexibility and portability.
o Advantages: Runs on various hardware and integrates with different devices.
ish
o Disadvantages: Difficult to use, slower performance in Intel-based systems, and incompatible versions.
3. Linux:
o A version of UNIX developed in 1991, free and open-source.
gl

o Constantly improved by global volunteers.


4. Windows:
En

o Includes versions from Windows 95 to XP, supporting multitasking and user-friendly interfaces.

Operating System Environments:


E

 Single-Tasking Environment: Executes one job at a time.


M

 Multitasking Environment: Runs multiple jobs simultaneously.


 Multi-User Environment: Allocates resources efficiently among multiple users.

Language Translators
Language translators convert high-level programming language (readable by humans) into machine language (binary:
1s and 0s) for computer execution. These translators use two primary methods: compilers and interpreters.

Compiler

A compiler translates the entire high-level program (source program) into machine language (object program) before
execution.

Features of a Compiler:

1. Translation Process:
o Input: High-level language program (source program).
o Output: Machine language program (object program).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 25 of 59


1st year CS - Chapter # 01

2. Error Detection:
o Detects syntax errors during compilation (e.g., illegal characters, punctuation errors).
o Does not detect logic errors (e.g., using ADD instead of SUBTRACT).
3. Execution:
o The object program is saved and reused for future executions.
4. Speed:
o Faster execution after compilation since translation is done only once.

Advantages:

 Efficient for repetitive tasks.


 Provides detailed error diagnostics.

Disadvantages:

er
 Requires separate compilation for program modifications.
 Each high-level language needs a specific compiler (e.g., COBOL compiler for COBOL programs).

nt
Interpreter

Ce
An interpreter translates and executes each high-level instruction step-by-step during runtime.
ish
Features of an Interpreter:

1. Translation Process:
gl

o Input: High-level language program.


o Execution: Alternates between translating and executing instructions.
En

2. Execution:
o Does not save the translated program.
o Each program execution requires re-interpretation.
3. Error Handling:
E

o Provides quick feedback for errors as it executes each statement.


M

Advantages:
 Immediate response to program changes without recompilation.
 Requires less memory compared to a compiler.

Disadvantages:

 Slower than a compiler for repetitive tasks due to repeated translation.


 Cannot save a machine language program for future use.

Comparison of Compiler and Interpreter


Feature Compiler Interpreter
Translation Method Entire program at once Statement-by-statement
Execution Speed Faster after compilation Slower due to repeated translation
Error Detection Syntax errors during compilation Immediate error detection
Reusability Saves object program for future use Does not save the translated program
Memory Requirement Requires more memory Requires less memory
Common Example C, C++ BASIC

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 26 of 59


1st year CS - Chapter # 01
Programming Languages
Programming languages are used to write instructions for computers to perform specific tasks. They consist of
symbols, numbers, and abbreviations and have evolved over generations, each improving ease of use, efficiency, and
functionality.

Generations of Programming Languages

1. First Generation: Machine Language

 Definition: Directly understood by computers; written in binary (1s and 0s).


 Features:
o Highly efficient for computers but tedious for programmers.
o Machine-dependent and difficult to debug or modify.
o Example: 100100001100 (12-bit machine instruction).
 Drawbacks:

er
o Time-consuming and error-prone.
o Lack of portability between systems.

nt
2. Second Generation: Assembly Language


 Features:
Ce
Definition: Low-level language using abbreviations (e.g., L for Load, A for Add).

o Easier than machine language due to symbolic representation.


ish
o Requires an assembler to convert assembly code into machine language.
o Machine-dependent and still low-level.
 Advantages:
gl

o Easier debugging and error correction compared to machine language.


 Drawbacks:
En

o Still time-consuming for complex programs.

3. Third Generation: High-Level Languages (3GLs)


E

 Definition: Problem-oriented and machine-independent languages resembling natural language.


M

 Features:
o Easier to learn and use.
o Examples include:
 BASIC (Beginners All-purpose Symbolic Instruction Code).
 FORTRAN (Formula Translation).
 COBOL (Common Business-Oriented Language).
o Requires compilers or interpreters to translate into machine language.
 Advantages:
o Reduces programmer effort by simplifying coding.
o Programs can run on different machines with minimal changes.
 Drawbacks:
o Specific languages may be suited only for particular problem domains.

4. Fourth Generation: Very High-Level Languages (4GLs)

 Definition: Non-procedural languages designed for database operations and user-friendly programming.
 Features:
o Simplifies interaction with databases.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 27 of 59


1st year CS - Chapter # 01
o Examples: SQL, LISP, PROLOG, Oracle, FoxPro.
 Advantages:
o Increases productivity.
o Allows users to retrieve and analyze data without extensive programming knowledge.
 Concerns:
o Risk of unauthorized data access and invalid data entry.
o Requires robust backup and security measures.

5. Fifth Generation: Natural Languages (5GLs)

 Definition: Languages resembling human speech, part of Artificial Intelligence (AI).


 Features:
o Eliminates the need for strict syntax or grammar.
o Examples: HAL, Q&A, Clout.
o Enables computers to simulate human-like qualities such as learning and reasoning.
 Advantages:
o Simplifies programming for non-experts.

er
o Facilitates AI-driven tasks.
 Applications:

nt
o AI research, voice recognition, and natural language processing.

Comparison of Language Generations


Generation
1st (Machine)
Key Features
Binary code, machine-specific
CeAdvantages
Fastest execution
Drawbacks
Complex, error-prone, non-
ish
portable
2nd (Assembly) Symbolic code, uses assembler Easier than machine Machine-dependent, low-level
language
gl

3rd (High- Resembles natural language Machine-independent Domain-specific limitations


Level)
En

4th (4GLs) Non-procedural, database- Simplifies user interaction Security and integrity concerns
oriented
5th (5GLs) Natural language, AI-focused Easy for non-experts Limited general-purpose use
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 28 of 59


1st year CS - Chapter # 01

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. Desktop and personal computers are also known as
(a) microcomputers (b) supercomputers (c) mainframes (d) peripheral equipment
2. What does a dumb terminal consists of?
(a) Microprocessor and monitor (b) Keyboard and printer
(c) Keyboard and monitor (d) Keyboard and microprocessor
3. A bar-code reader is an example of a(n)
(a) processing device (b) storage device (c) input device (d) output device

er
4. The central processing unit is an example of
(a) software (b) a program (c) hardware (d) an output unit

nt
5. Which part of CPU performs all arithmetic and logic calculations on data it receives?
(a) Control unit (b) Main Memory Unit
6. Which of the following can be output by a computer?
Ce
(c) ALU (d) Read Only Memory
ish
(a) graphics and text (b) voice (c) computer useable information (d) All of the above
7. Printers and screens are common forms of
gl

(a) input units (b) output units (c) storage units (d) processing units
En

8. An example of peripheral equipment is the


(a) CPU (b) spreadsheet (c) printer (d) microcomputer
E

9. A monitor looks like a television set but it does not


M

(a) give a steady picture (b) receive television signals (c) give a clear picture (d) display graphics
10. Main problem with LCD is that they are difficult to read
(a) directly (b) in bright light (c) in dull light (d) both b and c
11. It is a non-impact printer that can produce very high quality letter printing
(a) daisy wheel printer (b) chain printer (c) Laser printer (d) dot matrix printer
12. Name the printer which prints ali the A's in a line before ali the B's
(a) ink jet printer (b) chain printer (c) Laser printer (d) thermal printer
13. The advantage of the laser printer is that
(a) it is very slow (b) the output is of inferior quality
(c) it cannot produce a wide range of type fonts (d) None of the above

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 29 of 59


1st year CS - Chapter # 01
14. Large computer systems typically use
(a) dot matrix printers (b) inkjet printers (c) chain printers (d) All of the above
15. To produce high quality graphics in color one would like to use
(a) plotter (b) inkjet printers (c) laser printer (d) All of the above
16. A microfilm roll is
(a) 35 mm photographic film (b) not perforated
(c) used to hold voluminous data (d) All of the above
17. The advantages of magnetic tape include all of the following except
(a) low cost (b) direct access storage medium. (c) highly reliable (d) compact and portable
18. Laser beam technology is used for
(a) terminals (b) optical disks (c) keyboards (d) magnetic tape

er
19. ASCII is the abbreviation of

nt
(a) Application Software Code for information Interchange
(b) American Standard Code for Information Interchange
(c) American System Code of Information Interchange
Ce
ish
(d) American Symbolic Code of Information Interchange
20. ROM is the abbreviation of
gl

(a) read-only memory (b) random only memory (c) read on memory (d) all of the above
En

21. The memory that remains unaffected when the power is switched off is
(a) ROM (b) RAM (c) cache memory (d) video memory
E

22. A group of 4 bits is called a


M

(a) byte (b) word (c) nibble (d) all of the above
23. Step-by-step instructions that run the computer are
(a) hardware (b) documents (c) CPUs (d) software
24. A software that enables users and applications to interact with the computer hardware is called
(a) operating system (b) application software (c) client software (d) database management system
25. A source program is a
(a) program written in machine language (b) program written in a high level language
(c) program required to run a computer (d) None of these.
26. Once a program has been translated into the machine language, it is called
(a) a system program (b) logical program (c) an object program (d) an application program

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 30 of 59


1st year CS - Chapter # 01
27. Machine language is a language
(a) understood directly by a computer (b) needs to be translated before computer can understand it
(c) in which programs were written first (d) which is machine independent
28. Assembly language
(a) use mnemonics (b) needs no translation into machine language
(c) use binary numbers only (d) None of these
29. High level languages are similar to
(a) machine language (b) assembly language
(c) English along with mathematical symbols (d) None of these
30. The high level language FORTRAN is generally used for
(a) business applications (b) general purpose applications (c) scientific applications (d) process control

er
31. Which of the following languages is most efficient

nt
(a) Assembly language (b) High level languages (c) Machine language (d) All are equally efficient
32. Which one of the following is not a visual IDE?
(a) Delphi (b) Visual C++
Ce
(c) Visual Java (d) COBOL
ish
33. A compiler is a
(a) part of a computer (b) program to convert a high level language into machine language
gl

(c) source program (d) object program


En

34. In computer terminology an assembler means


(a) a person who assembles the computer parts (b) a hardware unit of a computer
E

(c) a program (d) a language


M

-: Answer Keys :-
1. a 6. d 11. c 16. d 21. a 26. c 31. c
2. c 7. b 12. b 17. b 22. c 27. a 32. d
3. c 8. c 13. d 18. b 23. d 28. a 33. b
4. c 9. b 14. c 19. b 24. a 29. c 34. c
5. c 10. b 15. a 20. a 25. b 30. c

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 31 of 59


1st year CS - Chapter # 01

Section (B / C)
1.1) What is a system? Why do we refer to a computer as a system?
System:
A system is a group of parts that work together for a purpose.

Computer as a System:
A computer is called a system because its parts like hardware, software, and users
work together to complete tasks.

1.2) Name three categories of peripheral devices.

1. Input Devices (e.g., keyboard, mouse)

2. Output Devices (e.g., monitor, printer)

er
3. Storage Devices (e.g., USB, external hard drive)

nt
1.3) What is the purpose of input and output devices?

Input Devices:
Ce
ish
Allow users to enter data and commands into the computer (e.g., keyboard, mouse).
gl

Output Devices:
Display or present the processed data from the computer to the user (e.g., monitor, printer).
En

1.4) What are the two main categories of input hardware?


 Manual Input Devices (e.g., keyboard, mouse)
E

 Automatic Input Devices (e.g., scanner, barcode reader)


M

1.5) What determines what the function keys on a keyboard do?

The function keys (F1 to F12) on a keyboard perform different tasks depending on the software or
application you are using.
For example:

 In Microsoft Word, F1 opens the


Help menu.
 In a web browser, F5 refreshes the
page.

The actions of these keys are controlled by the program you're working in, not by the keyboard itself.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 32 of 59


1st year CS - Chapter # 01
1.6) What is the difference between dumb terminals and smart terminals?
Dumb terminals:
A dumb terminal is a basic input/output device
that lacks processing power. It relies entirely on a central
computer or server to perform tasks and display results. It
cannot process or store data on its own.

Smart terminals:
A smart terminal is more advanced, with its own
processor and memory. It can perform some basic
processing and execute tasks independently. It is capable
of interacting with the central computer but can also
handle certain operations locally.

er
nt
Dumb Terminal
Ce Smart Terminal
ish
Cannot process data Can process some data locally.

Only used to input and display data. Have their own processor and memory.
gl
En

Rely entirely on a central computer. Can perform limited tasks


independently.
E

1.7) List and describe two hand held input devices.


M

Barcode Scanner:
A handheld device used to scan barcodes on products. It reads the pattern and sends the information to
the computer for processing, often used in retail or inventory systems.
Handheld Scanner:
A small, portable scanner that allows users to scan documents or images by manually moving it across
the surface. It is used for digitizing physical documents on the go.
1.8) What is the difference between an optical-mark recognition and an optical-character recognition?

Optical Mark Recognition (OMR):

 Used to detect marks (e.g., checkboxes or circles) on a form.


 Commonly used for exams, surveys, and voting forms.
 It recognizes patterns of marks rather than individual characters.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 33 of 59


1st year CS - Chapter # 01

Optical Character Recognition (OCR):

 Converts printed or handwritten text into machine-readable


text.
 Used to scan and digitize documents for editing, searching, or
storage.
 Recognizes individual characters (letters, numbers) rather than
marks.

1.9) What is MICR? What industry is the primary user of MICR?

MICR (Magnetic Ink Character Recognition):


It is a technology used to read and process characters printed with magnetic ink. MICR is primarily used
for recognizing and processing checks.

er
The banking industry is the primary user of MICR, as it is used to process and verify cheques/checks

nt
efficiently.

1.10) What is a scanning device?


Ce
A scanning device is a hardware device used to convert physical documents, images, or objects into
ish
digital formats. It works by capturing details from the document's surface and converting it into a digital
image that can be edited, stored, or transmitted.
gl

Examples: Flatbed scanners and barcode scanners.


En

1.11) What are the three most common types of scanners? What type of data does each scan?
1. Flatbed Scanner: Scans documents, photos, and books by placing them on a glass surface.
E

2. Handheld Scanner: Scans text or images by manually moving it over the surface, used for quick or
portable scanning.
M

3. Barcode Scanner: Scans barcodes to retrieve product or item information, often used in retail and
inventory management.
1.12) What are the main uses of voice-input devices?
 Convert spoken words into text for dictation or documentation.
 Control devices or software through voice commands.
 Assist in hands-free operations, like smart assistants (e.g., Siri, Alexa).
1.13) Explain how a voice recognition system works?
Voice Recognition System Working:
 Voice Input: The user speaks into a microphone.
 Conversion to Digital Data: The system converts the analog sound waves into digital signals.
 Speech Analysis: It analyzes the signals and breaks them into phonemes (small sound units).
 Match Words: The system checks your words against a list of stored words or commands.
 Output: The recognized words are displayed as text or used to execute commands.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 34 of 59


1st year CS - Chapter # 01
1.14) What is the main difference between a mouse and a trackball?
Mouse:

 Moves the pointer by sliding the device on a surface.


 The ball or sensor is underneath the mouse.

Trackball:

 Moves the pointer by rolling a ball on the top with fingers or thumb.
 The device itself stays stationary.

1.15) How is a light pen used? Is it an input or output device?

A light pen is used by pointing it at the screen and pressing it against the

er
display to select or draw on the screen. It detects light from the screen
and sends the information to the computer.

nt
It is an input device because it sends data from the user to the
computer.
Ce
ish
1.16) What is a digitizer and how is it used?
Digitizer is a device that converts physical objects, drawings, or images into digital data. It is typically
gl

used to capture graphics, sketches, or other visual information.


En

 A graphic tablet or digitizer pad is often used with a stylus to draw or write, and the device
converts the movements into digital form.
 It can also be used to scan physical images or documents by placing them on the surface for
E

conversion into digital formats.


M

1.17) List and briefly describe the two components of CPU. What is each part is responsible for?
1. Arithmetic Logic Unit (ALU)
2. Control Unit (CU)
Arithmetic Logic Unit (ALU):

Responsible for performing all arithmetic (addition, subtraction, etc.) and logical operations
(comparisons like greater than or less than).

Control Unit (CU):

Directs the operation of the processor. It fetches instructions from memory, decodes them, and then
tells the ALU and other parts of the system how to execute those instructions.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 35 of 59


1st year CS - Chapter # 01
1.18) What is the function of ALU in a microcomputer system?
 Arithmetic Operations: It handles basic math calculations like addition, subtraction, multiplication,
and division.
 Logical Operations: It performs comparisons (like greater than, less than) and logical operations
(AND, OR, NOT) to make decisions based on data.
1.19) What is the main difference between a 66 MHz computer and a 133 MHz computer?

The main difference is speed.


A 133 MHz computer can process instructions and data faster than a 66 MHz computer because it has a
higher clock speed, meaning it performs more cycles (operations) per second.

1.20) Why is the process of formatting (initializing) necessary?

Formatting (or initializing) a storage device is necessary to:

er
1. Prepare the Disk: It sets up the file system (e.g., FAT32, NTFS) so the computer can store and

nt
organize data.
2. Erase Existing Data: Removes all previous data and prepares the disk for new files.

Ce
3. Check for Errors: Identifies and fixes any bad sectors on the disk to ensure proper functioning.

1.21) What is the function of primary storage, and how does secondary storage differ from it?
ish
Primary Storage:


gl

Also called main memory (e.g., RAM).


 Temporarily stores data and instructions that the CPU needs while performing tasks.
En

 It is fast and volatile (data is lost when power is off).

Secondary Storage:
E

 Used for long-term data storage (e.g., hard drives, SSDs).


M

 Retains data even when the computer is turned off.


 Slower than primary storage but has a much larger capacity

1.22) Describe why having more main memory, or RAM, in your computer (as opposed to less) is
useful?
 Faster Performance: The computer can store more data for quick access, reducing the need to
use slower secondary storage.
 Run Multiple Programs: More RAM allows smooth multitasking and running of resource-
intensive applications.
 Improved Gaming and Graphics: Games and graphic design programs run better with more
memory available.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 36 of 59


1st year CS - Chapter # 01
1.23) What is the difference between volatile and non-volatile storage? Give an example of each of
these types of storage?
Feature Volatile Storage Non-Volatile Storage
Data Retention Loses data when power is off Retains data even when power is off
Speed Faster Slower
Usage Temporary storage for active tasks Permanent storage for files and data
Example RAM (Random Access Memory) Hard Drive, SSD, or USB Flash Drive

1.24) Differentiate between a bit, a byte, and a word.

Bit Byte Word

The smallest unit of data in a A group of 8 bits, representing a single A fixed-sized group of bytes used by a
computer, representing either 0 or 1. character (e.g., a letter or digit). computer's processor for data handling.

er
1 or 0 10101100 (8 bits) = 1 Byte Can be 16, 32, or 64 bits long.

nt
1.25) How many bytes can be stored in the primary storage unit of 512 kilobyte computer?

A 512-kilobyte computer can store: Ce


ish
1 kilobyte (KB) = 1,024 bytes
So, 512 KB = 512 × 1,024 = 524,288 bytes
gl

Answer: 524,288 bytes.


En

1.26) What kinds of computers use ASCII coding? What kind of use EBCDIC?
ASCII: Most personal computers and modern systems.
E

Examples: Windows, Linux, macOS


M

EBCDIC: IBM mainframe and midrange computers.


Example: Large-scale enterprise systems.
1.27) What is parity bit? How does the parity bit works in error checking? Describe this for even-
parity machines and for odd-parity machines.
Parity Bit:
A parity bit is an extra bit added to a binary data stream to help detect errors in data transmission. It
ensures that the total number of 1s in the data (including the parity bit) is either even or odd,
depending on the type of parity used.
How it works in error checking:

1. Even Parity:
In even parity, the parity bit is set to make the total number of 1s in the data (including the parity bit)
even. For example:

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 37 of 59


1st year CS - Chapter # 01
 Data: 1010 (2 ones, even), Parity bit: 0 → Total: 2 ones (even).
 Data: 1110 (3 ones, odd), Parity bit: 1 → Total: 4 ones (even).

If the received data has an odd number of 1s, an error is detected.

2. Odd Parity:
In odd parity, the parity bit is set to make the total number of 1s in the data (including the parity bit)
odd. For example:
 Data: 1010 (2 ones, even), Parity bit: 1 → Total: 3 ones (odd).
 Data: 1101 (3 ones, odd), Parity bit: 0 → Total: 3 ones (odd).

If the received data has an even number of 1s, an error is detected.

1.28) Differentiate between RAM, ROM, PROM and EPROM.


RAM ROM PROM EPROM

er
Random Access Memory. Read-Only Memory. Programmable Read-Only Erasable Programmable
Temporary, fast storage. Permanent storage for Memory. Can be Read-Only Memory. Can be

nt
essential data. programmed once. erased by ultraviolet light.
Volatile (data is lost when Non-volatile (data is Non-volatile. Non-volatile.
power is off.
Cannot be erased or
rewritten by the user.
retained when power is off).
Cannot be erased or
rewritten.
Ce
Data is written once using a
special programmer.
Erased using UV light, then
rewritten.
ish
Data is rewritten during Pre-programmed data, not Can only be written once. Can be written and erased
normal operation. changeable. multiple times.
gl

1.29) What are registers? Name some of the commonly used registers.
En

Registers:

Registers are small, high-speed storage locations within the CPU used to hold data, instructions, or
E

addresses temporarily during processing.


M

Commonly used registers:

1. Accumulator (AC): Stores intermediate results of arithmetic and logical operations.


2. Program Counter (PC): Holds the address of the next instruction to be executed.
3. Memory Address Register (MAR): Holds the address of the memory location to be accessed.
4. Memory Buffer Register (MBR): Holds data that is being transferred to or from memory.
5. Status Register (SR): Holds flags or status bits indicating the results of operations, like zero or
carry flags.

1.30) What is cache memory? How is it different from a primary memory?

Cache Memory:
Cache memory is a small, high-speed storage located near the CPU that stores frequently used data and
instructions, enabling faster access than retrieving them from the slower main memory (RAM).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 38 of 59


1st year CS - Chapter # 01
Aspect Cache Memory Primary Memory (RAM)
Speed Much faster than RAM. Slower than cache memory.
Size Smaller in size (typically a few MB). Larger in size (GBs).
Purpose Holds frequently accessed data to speed up processing. Stores data and instructions actively used by the CPU.
Location Located near or inside the CPU. Located further from the CPU in the system.

1.31) What is the difference between soft copy and hard copy?
Soft Copy Hard Copy
A digital version of a document or image stored on a device. A physical, printed version of a document or image.
Stored on electronic devices (e.g., computer, phone). Stored on paper or other physical media.
Easily portable and transferable (via email, USB, etc.). Less portable; requires physical transport.
Can be lost if the device fails or data is deleted. Durable unless damaged (e.g., torn, faded).

er
Examples: Documents on screen (PDF, Word files, etc.). Examples: Printed documents, books, photos, etc.

nt
1.32) What are the two types of display screen?
CRT (Cathode Ray Tube) Screen:


Ce
An older type of display that uses electron beams to scan and illuminate phosphor dots on the screen.
ish
 Bulky and heavy.

LCD (Liquid Crystal Display) Screen:


gl

 A more modern and thinner display using liquid crystals and a backlight to produce images.
En

 Lighter, more energy-efficient, and commonly used in computers, TVs, and smartphones.

1.33) Define the following terms related to screen display: CRT, pixel, resolution, monochrome, and
E

RGB.
M

CRT (Cathode Ray Tube) An older type of display technology that uses electron beams to scan and
illuminate phosphor dots on the screen, creating images.

Pixel The smallest unit of a digital image or display, representing a single color or brightness level.

Resolution The number of pixels displayed on the screen, typically described as width x height (e.g.,
1920x1080).

Monochrome A display mode that uses only one color, usually black and white, for all pixels on the screen.

RGB (Red, Green, Blue) A color model used for creating colors on electronic displays by combining
varying intensities of red, green, and blue light

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 39 of 59


1st year CS - Chapter # 01
1.34) What are the principle differences between how an image is formed on a monochrome monitor
and on an RGB monitor?
Aspect Monochrome Monitor RGB Monitor
Displays only one color, typically black and Displays a wide range of colors by mixing red, green,
Color
white. and blue light.
Pixel Each pixel is either on or off, representing black Each pixel is made up of three components: red, green,
Composition or white. and blue.
Image Forms images by varying brightness levels Forms images by adjusting the intensity of the RGB
Formation (black, white, and shades of gray). components to produce various colors.
Display Limited to simple displays, typically for text- Can display complex, colorful images, videos, and
Capability based applications. graphics.

1.35) What do SVGA, and XGA refer to, and how are they different?

er
SVGA:
o

nt
Super Video Graphics Array.
o An enhanced version of VGA.
o
o

XGA:
800 x 600 pixels resolution.
Lower resolution compared to XGA.
Ce
ish
o Enhanced Graphics Array.
o A higher resolution display standard.
gl

o 1024 x 7608 pixels resolution.


o Higher resolution than SVGA, providing more detail.
En

1.36) List and describe three types of flat-screen technologies.


1. LCD (Liquid Crystal Display)
E

LCD uses liquid crystals sandwiched between two layers of glass or plastic. A backlight illuminates the
M

crystals to produce images on the screen. LCDs are thin, energy-efficient, and offer clear images, making them
a popular choice for TVs, monitors, and laptops.

2. LED (Light Emitting Diode)

LED is a type of LCD that uses light-emitting diodes (LEDs) as the backlight source instead of traditional
fluorescent lighting. This technology provides better brightness, improved contrast, and is more energy-
efficient. It also allows for thinner screens compared to regular LCDs.

3. OLED (Organic Light Emitting Diode)

OLED uses organic compounds that emit light when electricity is applied, eliminating the need for a backlight.
This results in deeper blacks, higher contrast, and more vibrant colors. OLED screens are also flexible, making
them ideal for curved and foldable displays

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 40 of 59


1st year CS - Chapter # 01
1.37) List some relative advantages and disadvantages of CRT and flat panel monitors.

CRT Monitors

Advantages:

1. Image Quality: Provides excellent color depth and contrast.


2. Response Time: Faster refresh rates, making them better for fast-moving images in gaming.
3. Viewing Angle: Wide viewing angles without color distortion.
4. Cost: Generally cheaper than flat-panel monitors when comparing older models.

Disadvantages:

1. Size and Weight: Bulky and heavy, making them less portable.
2. Power Consumption: Consumes more electricity compared to flat-panel monitors.
3. Space: Requires more desk space due to its large size.
4. Flickering: Can cause eye strain due to refresh rate issues.

er
Flat Panel Monitors (LCD, LED, OLED)

nt
Advantages:

1.
2.
Ce
Slim and Lightweight: Thin, lightweight, and space-efficient, making them easier to move and fit into various spaces.
Energy Efficiency: Consumes less power compared to CRT monitors.
ish
3. Better Resolution: Provides high resolution and clear, sharp images, especially in modern LCD and OLED screens.
4. Reduced Flickering: Less strain on eyes with smoother, flicker-free images.
gl

Disadvantages:
En

1. Cost: Higher initial cost, especially for LED and OLED models.
2. Viewing Angles: Some models (especially older LCDs) may experience color shift at extreme viewing angles.
3. Lifespan: May have limited lifespan, especially OLED screens that can degrade over time.
4. Refresh Rates: While modern flat panels have improved, older flat-panel monitors may still have slower refresh
E

rates compared to CRTs.


M

1.38) Describe four hardware devices that produce hardcopy output.

1. Printer

A printer is a common output device that produces a physical copy of a document or image. There are
different types of printers, including inkjet, laser, and dot matrix printers.

Use: Used for printing text, images, or graphics on paper.

2. Plotter

A plotter is a device that produces high-quality drawings, graphs, and other types of detailed artwork,
typically used for engineering, architecture, and graphic design.

Use: Used for large-scale printing of maps, blueprints, and other vector-based graphics.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 41 of 59


1st year CS - Chapter # 01

3. Photocopier

A photocopier scans an original document and then produces one or more copies of that document on
paper.

Use: Common in offices and businesses for duplicating documents.

4. Fax Machine

A fax machine transmits scanned documents over a phone line to another fax machine, which then prints
the document on paper.

Use: Used for sending and receiving documents via telephone lines.

er
1.39) What is a printer? What are the two main types of printer?

nt
Printer:

Ce
A printer is an output device that produces a hardcopy (physical copy) of a document, image, or graphic stored
on a computer or other digital devices. Printers can create text and graphics on various types of paper, including
plain paper, photo paper, and specialized materials.
ish
1. Impact Printers:

Impact printers create an image on paper by physically striking an ink ribbon against the paper, similar to
gl

a typewriter.
En

o Examples: Dot matrix printers, line printers, and daisy-wheel printers.


o Advantages: Cheaper and suitable for printing multipart forms.
o Disadvantages: Noisy, lower quality compared to non-impact printers.
E
M

2. Non-Impact Printers:

Non-impact printers create images without physically striking the paper. They use other methods, such as
ink, laser, or heat.
o Examples: Inkjet printers, laser printers, and thermal printers.
o Advantages: Quieter, higher quality prints, and faster printing speeds.
o Disadvantages: More expensive than impact printers.

1.40) What is a letter-quality printer? A dot-matrix printer?

Letter-Quality Printer:

A letter-quality printer is a type of impact printer that produces high-quality, text-based output similar to that
produced by a typewriter. It is capable of printing clean, readable text with letter-like precision, typically used
for professional or official documents.

 Examples: Daisy-wheel printers, some high-end dot-matrix printers.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 42 of 59


1st year CS - Chapter # 01
Dot-Matrix Printer:

A dot-matrix printer is an impact printer that creates images and text by striking an ink ribbon with a series of
pins to form dots on paper. The combination of dots creates characters and graphics. It is known for its ability
to print on multi-part forms and carbon-copy paper.

 Advantages: Can print on multi-part forms (e.g., carbon copies), cost-effective for basic printing needs.
 Disadvantages: Lower print quality and slower printing speed compared to non-impact printers, and it is noisy.

1.41) What is an impact printer? A non-impact printer?

Impact Printer:

An impact printer is a type of printer that creates an image or text on paper by physically striking an ink ribbon
against the paper. The forceful impact results in characters or images being transferred onto the paper.

 Examples: Dot matrix printers, line printers, and daisy-wheel printers.

er
 Advantages: Can print on multi-part forms (carbon copies), typically more affordable.
 Disadvantages: Noisy operation, lower print quality compared to non-impact printers, and slower print speeds.

nt
Non-Impact Printer:
Ce
A non-impact printer produces prints without physically striking the paper. Instead, they use methods such as
heat, ink, or light to transfer the image onto paper, resulting in quieter and higher-quality prints.
ish
 Examples: Inkjet printers, laser printers, and thermal printers.
 Advantages: Quieter, higher print quality, and faster printing speeds compared to impact printers.
gl

 Disadvantages: Generally more expensive and often less capable of printing on multi-part forms.
En

1.42) Differentiate between impact and non-impact printers. Give one example of each.
Aspect Impact Printer Non-Impact Printer
Printing Uses physical force to strike an ink ribbon against Uses heat, ink, or light to transfer images onto
E

Mechanism the paper to form characters. paper without physical impact.


M

Noise Level Noisy due to the mechanical movement and impact. Quiet operation, as there is no physical striking.

Print Quality Lower quality, especially for graphics. Higher print quality, especially for text and images.
Slower print speed compared to non-impact Faster printing speeds, especially for high-volume
Speed
printers. printing.
Examples Dot matrix printer. Inkjet printer, Laser printer.

1.43) For impact printers and non-impact printers, list at least two advantages and three
disadvantages?

Impact Printers

Advantages:

1. Can print on multi-part forms (e.g., carbon copies) — useful for creating duplicates simultaneously.
2. Cost-effective — generally cheaper than non-impact printers.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 43 of 59


1st year CS - Chapter # 01
Disadvantages:

1. Noisy operation — the mechanical impact of printing can be loud and disruptive.
2. Lower print quality — especially when printing images or detailed graphics.
3. Slower printing speeds — compared to modern non-impact printers, especially for high-volume printing.

Non-Impact Printers

Advantages:

1. Higher print quality — produces clearer, sharper text and graphics.


2. Quieter operation — no physical impact, making them more suitable for quiet environments.

Disadvantages:

1. More expensive — both in initial cost and maintenance, especially for high-end models like laser printers.
2. Cannot print on multi-part forms — not suitable for carbon-copy printing.

er
3. Ink or toner dependency — may require expensive ink or toner cartridges and can run out quickly with heavy usage.

nt
1.44) What is the difference between a drum printer and a chain printer?

Drum Printer:
Ce
A drum printer uses a cylindrical drum that is covered with characters or symbols. As the drum rotates, the
ish
appropriate character is aligned with the print head, which strikes an ink ribbon to transfer the character onto the
paper. This type of printer is known for high-speed printing
gl

Chain Printer:
En

A chain printer uses a rotating chain of characters, where each link in the chain has a set of characters. The
printer head selects the character from the chain, strikes it against an ink ribbon, and prints the character on the
paper.
E

Key Difference:
M

The drum printer uses a cylindrical drum with fixed characters, while the chain printer uses a rotating chain
with individual character links, providing more flexibility in character selection

1.45) What advantages does a laser printer have over other types of printers?

Advantages of a Laser Printer:

1. High Print Quality: Laser printers provide sharp, crisp text and detailed graphics, often superior to inkjet
and dot matrix printers. The print quality is consistent and clear.
2. Faster Printing: Laser printers are faster than many other printers, especially in high-volume environments,
making them ideal for offices and businesses.
3. Low Cost per Page: Laser printers are more efficient in terms of cost per page, particularly when printing
large volumes of text, due to lower toner usage compared to inkjet ink.
4. Quiet Operation: Laser printers are much quieter than impact printers (e.g., dot matrix printers) and more
pleasant to use in quiet environments.
5. Durability: Laser printers generally have a longer lifespan and require fewer maintenance interventions,
making them more reliable over time.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 44 of 59


1st year CS - Chapter # 01
6. No Ink Smudging: Unlike inkjet printers, laser prints do not smudge, as toner is fused to the paper through
heat, making it ideal for printing documents that need to be handled immediately.
7. Better for Text: Laser printers excel at printing text documents and are commonly used for professional,
high-quality text printing.

These advantages make laser printers particularly suitable for businesses, offices, and high-volume printing
tasks

1.46) What is a page description language?

Page Description Language (PDL)

A Page Description Language (PDL) is a computer language used to describe the layout and content of a
printed page. It tells the printer how to render the page's text, graphics, and images, ensuring the output
matches what is intended by the user. PDLs are used in modern printers to translate the content of a document
into a format that the printer can understand and reproduce on paper.

er
Common Types of PDLs:

nt
1. PostScript: A widely-used PDL that describes page layouts in a device-independent way. It is used by many laser
printers and desktop publishing software.

and images. Ce
2. PCL (Printer Control Language): Developed by HP, PCL is commonly used in HP printers for efficient printing of text

3. PDF (Portable Document Format): While not traditionally considered a PDL, PDF can function as a description
ish
language by storing exact layouts of documents for printing.

Key Functions:
gl

 Text and Font Descriptions: Defines how text and fonts should be rendered.
En

 Graphics and Images: Describes how to draw lines, shapes, and images on the page.
 Page Layout: Specifies the size, margins, orientation, and other layout features of the page.

1.47) What is a plotter? What is its principal rule?


E
M

Plotter:

A plotter is a specialized output device used to create high-quality,


precise graphics, drawings, and designs on paper. Unlike printers,
which use a series of dots to form images, plotters use pens,
markers, or other tools to draw continuous lines to produce
detailed and accurate representations, such as architectural plans,
engineering drawings, and technical illustrations.

Principal Role:

The principal role of a plotter is to produce large-scale, high-


precision drawings and graphical outputs. It is commonly used in
fields like architecture, engineering, cartography, and graphic design, where accurate and scalable line
drawings are required.

Plotters are essential tools in industries that require detailed and scalable line drawings for design and technical
purposes.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 45 of 59


1st year CS - Chapter # 01
1.48) What do many people find it necessary to use a plotter to output information?

Many people find it necessary to use a plotter to output information for the following reasons:

1. High Precision and Accuracy:

Plotters are designed to create highly accurate and detailed drawings, which is essential for fields such as
engineering, architecture, and design. They ensure that measurements, lines, and dimensions are exact,
which is critical for technical drawings and blueprints.

2. Large Format Output:

Plotters can print on large sheets of paper, often up to several feet wide, which is necessary for printing
large-scale plans, maps, architectural blueprints, and engineering diagrams that are too big for regular
printers.

3. Continuous Lines and High Quality:

er
nt
Plotters use pens or other tools to draw continuous lines, making them ideal for producing intricate designs,
curves, and detailed graphics. This results in smooth, crisp lines that are more suitable for technical and

Ce
artistic designs than traditional printers, which rely on dots.

4. Scalability:
ish
Plotters are often used for scalable graphics, such as CAD (Computer-Aided Design) models, where
precise scaling is necessary. This ability to print at various scales makes them a valuable tool in many
design fields.
gl

5. Durability of Output:
En

Since plotters use pens or specialized ink, the output tends to be more durable and long-lasting compared to
prints from regular printers, making them ideal for creating final drafts of documents that need to be
E

preserved or displayed.
M

6. Versatility:

Plotters can output a variety of media, such as paper, film, or plastic sheets, and use different tools (pens,
markers, etc.), providing versatility in producing different types of drawings and prints.

Because of these advantages, plotters are often indispensable in industries that require precise, large-scale, and
durable output.

1.49) Distinguish between primary and secondary storage.


Feature Primary Storage Secondary Storage
Volatility Volatile (data is lost when power is off) Non-volatile (data is retained when power is off)
Speed Fast (provides quick access for CPU) Slower (slower data retrieval compared to RAM)
Capacity Smaller in size (limited capacity) Larger in size (can store large amounts of data)
Purpose Stores data being actively processed by the CPU Stores data for long-term use and backup
Examples RAM, Cache Memory Hard Drives, SSDs, CDs, DVDs

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 46 of 59


1st year CS - Chapter # 01

1.50) What is secondary storage? How does it differ from a primary storage?

Secondary Storage

Secondary storage refers to devices that store data permanently or for the long term, even when the computer is
powered off. It is used to store data, files, and software that are not actively in use by the CPU but need to be
retained for future access.

Examples:

 Hard Disk Drives (HDD)


 Solid-State Drives (SSD)
 Optical Disks (CDs, DVDs)
 Magnetic Tapes

er
For difference, refer to Q 1.49

nt
1.51) Distinguish between a sequential access, a cyclic access, and a random access device. Give one
example of each.

Aspect Sequential Access


Data is accessed in a specific, linear
CeCyclic Access
Data is accessed in a circular
Random Access
Data can be accessed directly,
ish
Definition
order. pattern. without following a sequence.
Slower, as the entire sequence must Faster than sequential but Fast, as the desired data is
Speed
be read to find data. requires structured access. accessed directly.
gl

Example Use Reading/writing files in a magnetic Music players with a CD or Accessing memory locations in
En

Case tape. carousel system. RAM.


Device
Magnetic Tape Drive Optical Disks (CD/DVD) RAM, SSDs
Example
E
M

1.52) List the three most common types of magnetic storage device.
Hard Disk Drive (HDD):

A magnetic disk used for storing large amounts of data. It uses spinning platters and a magnetic head to
read/write data.
Example Use: Storing operating systems, applications, and user files.

Magnetic Tape:

A sequential storage device made of a long, thin strip of magnetic material. Commonly used for backups and
archiving.
Example Use: Data backup and archival storage in data centers.

Floppy Disk:

A small, portable magnetic storage medium used historically for transferring small files. Now largely
obsolete.
Example Use: Small-scale file storage and transfer (historically).
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 47 of 59
1st year CS - Chapter # 01
1.53) What are the advantages of 3 ⅟2 -inch diskettes?

Advantages of 3 ½-inch Diskettes:

1. Portability:
 Small and lightweight, making them easy to carry and transfer data.
2. Durability:
 Encased in a hard plastic shell, providing better protection compared to earlier 5 ¼-inch floppy disks.
3. Ease of Use:
 Simple to insert and remove from disk drives, with a built-in metal shutter protecting the magnetic
surface.
4. Compatibility:
 Widely compatible with computers during their era, making them a standard for software distribution
and file transfer.
5. Affordability:
 Relatively low-cost medium for data storage and sharing small files.
6. Write-Protection:

er
 A sliding tab allowed users to protect the diskette from accidental data overwriting.

nt
1.54) What factors determine the storage capacity of disk?

Factors Determining the Storage Capacity of a Disk

1. Number of Tracks per Surface:


Ce
ish
The total number of concentric circles (tracks) on the disk surface. More tracks increase the storage
capacity.
gl

2. Number of Sectors per Track:


Each track is divided into sectors, which are the smallest storage units. More sectors per track result in
En

higher capacity.

3. Number of Platters (Disk Surfaces):


E

The more platters (or disk surfaces) in a storage device, the greater the storage capacity.
M

4. Recording Density:
The amount of data that can be stored per inch of track. Higher density means more data can fit on the disk.

5. Sector Size:
The size of each sector determines how much data can be stored in one sector. Smaller sector sizes allow
more efficient use of space.

6. Disk Diameter:
Larger disks have more surface area for tracks and sectors, which increases storage capacity.

7. File System and Formatting:


The way the disk is formatted and its file system (e.g., FAT32, NTFS) can affect the usable storage
capacity. Some file systems reserve a portion of the disk for system data.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 48 of 59


1st year CS - Chapter # 01
1.55) What is access time?
Access Time

Access time is the total time it takes for a computer's storage device (e.g., hard drive, SSD, RAM) to locate and
retrieve data. It is a critical factor in determining the performance of storage devices.

1.56) A hard disk consist of 8 platters. Each platter has 300 tracks and there are 50 sectors per track.
If 256 bytes can be stores per sector then calculate the total number of bytes that can be stores in
this hard disk.

Given Data:

1. Number of Platters: 8
2. Tracks per Platter: 300
3. Sectors per Track: 50

er
4. Bytes per Sector: 256

nt
Step 1: Calculate the Total Number of Sectors on One Platter

Ce
Sectors per Platter = Tracks per Platter × Sectors per Track

Sectors per Platter = 300 × 50 = 15,000


ish
Step 2: Calculate the Total Number of Sectors for All Platters

Total Sectors = Sectors per Platter × Number of Platters


gl

Total Sectors = 15,000 × 8 = 120,000


En

Step 3: Calculate the Total Number of Bytes


E

Total Bytes = Total Sectors × Bytes per Sector


M

Total Bytes = 120,000 × 256 = 30,720,000

The total storage capacity of the hard disk is 30,720,000 bytes.

1.57) List out the relative advantages and disadvantages of movable-head and fixed-head disk systems.

Movable-Head Disk System

Advantages:

1. Cost-Effective: Less expensive as fewer read/write heads are required for multiple tracks.
2. Larger Storage Capacity: Supports more tracks on each platter, allowing higher overall storage.
3. Flexibility: Easier to manufacture and maintain due to simpler design.

Disadvantages:

1. Slower Access Time: The head must physically move to the correct track, increasing seek time.
2. Mechanical Wear: The frequent movement of the head can lead to mechanical failures over time.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 49 of 59


1st year CS - Chapter # 01
3. Less Reliable: Higher risk of head misalignment or failure due to mechanical components.

Fixed-Head Disk System

Advantages:

1. Faster Access Time: Each track has a dedicated read/write head, eliminating the need for head movement.
2. High Reliability: No mechanical movement for head positioning reduces wear and tear.
3. Instantaneous Access: Data can be accessed quickly without delays caused by head movement.

Disadvantages:

1. Costly: Requires a read/write head for every track, making it expensive to manufacture.
2. Limited Storage Capacity: Typically supports fewer tracks per platter due to head placement constraints.
3. Complex Design: More intricate construction leads to increased production challenges.

er
1.58) Which can locate a record faster-moving read/write heads or fixed heads? Why?

nt
Fixed Heads Locate Records Faster

Reason:
Ce
In a fixed-head disk system, each track has its own dedicated read/write head, so there is no need for the heads
to move to locate data. This results in almost instantaneous access to any record on the disk.
ish
In contrast, a moving-head disk system requires the read/write head to physically move to the correct track
before accessing the data, which increases the seek time and delays record retrieval.
gl

1.59) List at least two advantages and disadvantages associated with both tape and disk storage
En

systems.

Tape Storage System


E

Advantages:
M

1. Cost-Effective: Cheaper per gigabyte, making it ideal for large-scale data backup and archiving.
2. High Storage Capacity: Capable of storing massive amounts of data, suitable for long-term use.

Disadvantages:

1. Sequential Access: Data retrieval is slow because data must be accessed in a linear order.
2. Fragility: Magnetic tape is more prone to wear and tear over time, reducing reliability.

Disk Storage System

Advantages:

1. Random Access: Data can be retrieved directly and quickly, making it faster than tape storage.
2. High Reliability: Less prone to physical degradation compared to tape storage.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 50 of 59


1st year CS - Chapter # 01
Disadvantages:

1. Costlier: More expensive per gigabyte than tape storage.


2. Limited Longevity for Archival: Not ideal for long-term storage as disks can fail over time.

1.60) Explain how information is recorded on a magnetic tape.

1. Magnetic Tape Composition:


Magnetic tape consists of a long, thin plastic strip coated with a magnetic material (usually iron oxide or
chromium dioxide). This coating is key to recording and storing data.

2. Recording Process:
o The tape drive's read/write head generates a magnetic field as it moves across the tape.
o When data is written, the magnetic head alters the magnetic polarity of the tape's surface in patterns
corresponding to binary data (0s and 1s).
o The tape head magnetizes small segments of the tape in specific directions: one direction for a binary
"1" and the opposite for a binary "0."

er
3. Sequential Storage:

nt
Data is stored sequentially along the length of the tape. The tape moves past the recording head as data is
written, creating a continuous, linear track of magnetic patterns.

4. Reading Process: Ce
o When reading data, the tape passes over the read head.
ish
o The read head detects the magnetic changes in the tape and converts these into electrical signals, which
are then interpreted as binary data by the computer.
gl

5. Track Structure:
o The tape typically has several parallel tracks (often multiple on each side of the tape), which help
En

organize and store data in a linear, structured manner. Each track is used to store a stream of bits.

Key Points:
E

 Magnetic tapes are sequential access devices, meaning data is read or written in a specific order, starting from
M

one point and moving through the tape.


 Data is stored in small, magnetized areas on the tape, with each area representing a bit of information.
 The tape must be physically wound and rewound to access different sections of the data.

1.61) What is the purpose of backing up the master file?


Purpose of Backing Up the Master File:

To protect data from loss, ensure recovery in case of system failure, maintain data integrity, comply with legal
requirements, and ensure business continuity by providing a reliable copy of critical information.

1.62) How are data recorded on and read from an optical disk? What are the major advantages of an
optical disk storage?

How Data is Recorded on and Read from an Optical Disk:

1. Recording Data:
o Data is recorded on an optical disk using a laser.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 51 of 59


1st year CS - Chapter # 01
o The laser burns tiny pits (depressions) into the surface of the disk to represent data (binary 1s and 0s).
o The areas between the pits are called lands, which represent binary 0s.

2. Reading Data:
o A laser (in the disk drive) is used to shine light onto the surface of the disk.
o When the laser hits a pit, the light is scattered, indicating a binary "1".
o When the laser hits a land, the light is reflected back, indicating a binary "0".
o The reflected light is detected by a sensor, which converts the reflected or scattered light into digital
data that the computer can understand.

Major Advantages of Optical Disk Storage:

1. Large Storage Capacity:


Optical disks can store large amounts of data, often ranging from several hundred MB to multiple TB,
depending on the type of disk (CD, DVD, Blu-ray).

2. Durability and Longevity:

er
Optical disks are highly resistant to physical damage (e.g., scratches) and can last for many years if stored
properly.

nt
3. Portability:

Ce
Optical disks are portable and easy to transport, making them ideal for distributing data or software.

4. Low Cost:
ish
Optical disks are relatively inexpensive to produce and purchase, especially for mass distribution of data.

5. Data Integrity:
gl

Once data is written to an optical disk, it is difficult to alter, providing secure, read-only data storage
(especially in formats like CD-ROM or DVD-ROM).
En

6. Low Power Consumption:


Optical disk drives consume relatively less power compared to other storage devices like hard drives.
E

1.63) What does “read-only” mean?


M

"Read-only" means that the data stored on a device or medium can only be read and not modified or written
over. Once data is recorded on a read-only device, it cannot be changed, deleted, or added to.

Examples:

 CD-ROMs: Data is permanently written and cannot be altered.


 DVD-ROMs: Similarly, data is fixed and only available for reading.

1.64) List three forms of disk drivers for microcomputers.


Hard Disk Drive (HDD):
A traditional magnetic storage device used for long-term data storage. It provides large storage capacity and
relatively fast access to data.

Solid-State Drive (SSD):


A newer type of storage device that uses flash memory to store data, offering faster read/write speeds, lower
power consumption, and greater durability compared to HDDs.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 52 of 59


1st year CS - Chapter # 01
Floppy Disk Drive:
An older form of disk drive that uses removable magnetic disks (e.g., 3.5-inch disks) for storing small amounts
of data. Although largely obsolete today, it was widely used in the past.

1.65) As they apply to disk storage, what is mount by the terms fragmentation and defragmentation?

Fragmentation:

Fragmentation occurs when files on a disk are broken into non-contiguous pieces scattered across different
locations. This happens as files are saved, modified, or deleted over time, leading to inefficient use of disk space
and slower access speeds.

Defragmentation:

Defragmentation is the process of reorganizing fragmented files on a disk to make them contiguous. It
consolidates scattered file pieces into a single continuous block, improving data access speed and system
performance.

er
1.66) What is an Operating System? Why is it important for a computer system?

nt
Operating System (OS):
Ce
An operating system is a system software that acts as an interface between the computer hardware and the user.
It manages hardware resources, runs applications, and provides essential services for computer programs.
ish
Importance of Operating System:
gl

1. Resource Management: Manages CPU, memory, storage, and other hardware resources.
2. Program Execution: Ensures programs and applications run smoothly.
En

3. User Interface: Provides a user-friendly interface (e.g., GUI or command-line).


4. File Management: Organizes and controls file storage and access.
5. Security: Protects data and resources from unauthorized access.
E

6. Multitasking: Allows multiple programs to run simultaneously.


M

Without an operating system, the computer hardware would be difficult or impossible to use efficiently.

1.67) List out the various functions normally performed by an operating system.

Functions of an Operating System:

1. Process Management:
 Handles creation, execution, and termination of processes.
 Ensures efficient CPU scheduling and multitasking.

2. Memory Management:
 Allocates and deallocates memory to programs.
 Manages virtual memory and prevents memory conflicts.

3. File System Management:


 Organizes, stores, retrieves, and manages files on storage devices.
 Provides access permissions and a hierarchical directory structure.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 53 of 59


1st year CS - Chapter # 01
4. Device Management:
 Controls and communicates with input/output devices.
 Manages device drivers and ensures proper data transfer.

5. User Interface:
 Provides a Graphical User Interface (GUI) or Command-Line Interface (CLI) for user interaction.

6. Security and Access Control:


 Protects data from unauthorized access through passwords, encryption, and permissions.

7. Error Detection and Handling:


 Monitors and resolves hardware/software errors.
 Ensures the system continues functioning correctly.

8. Multitasking and Multithreading:


 Supports running multiple programs or threads simultaneously.

er
9. Networking:
 Manages network connections and data exchange between computers.

nt
10. System Performance Monitoring:

Ce
Tracks system performance and optimizes resource usage.

1.68) “The Operating System tends to isolate the hardware from the users”. Discuss the statement.
ish
How the OS Isolates Hardware from Users:
gl

1. Abstraction:
En

The OS provides a user-friendly interface (GUI or CLI) so users can perform tasks without needing to
understand the hardware's low-level operations.

For example, users save a file without knowing how the OS communicates with the disk.
E
M

2. Hardware Independence:

Applications interact with the OS, not the hardware directly. The OS translates these requests into
hardware-specific instructions.

This makes software portable across different hardware platforms with the same OS.

3. Resource Management:

The OS manages hardware resources (CPU, memory, I/O devices) and ensures that multiple users or
programs can efficiently share them without conflict.

4. Security and Protection:

By isolating hardware from direct access, the OS protects it from accidental or malicious misuse.

For instance, users cannot overwrite critical memory regions directly.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 54 of 59


1st year CS - Chapter # 01
1.69) What are the principal functions performed by an operating system?
For Answer, refer to Q 1.67
1.70) Write brief notes on MS-DOS and UNIX.

MS-DOS:

Microsoft Disk Operating System (MS-DOS) is a command-line operating system developed by Microsoft.

 Introduced: Early 1980s.


 Interface: Command-line interface (CLI), requiring users to type commands.
 Features:
o Lightweight and efficient for early personal computers.
o Limited multitasking and no GUI.
 Usage: Used widely in the 1980s and 1990s for IBM-compatible PCs.
 Legacy: Replaced by more advanced operating systems like Windows.

er
UNIX:

nt
UNIX is a multi-user, multitasking operating system developed in the 1970s by AT&T Bell Labs.

 Introduced: 1969–1970.
Ce
 Interface: Originally command-line based, but modern versions support GUI.
 Features:
ish
o Powerful multitasking and multi-user capabilities.
o Portability, allowing it to run on various hardware platforms.
o Security and stability, widely used for servers and workstations.
gl

 Usage: Used in academic, commercial, and industrial environments. Forms the basis for modern OS like
Linux and macOS.
En

1.71) Distinguish between System Software and Application Software.


E

Aspect System Software Application Software


Definition Software that manages hardware and provides a platform Software designed to perform specific user-
M

for application software. oriented tasks.

Purpose Facilitates the functioning of the computer system. Solves specific problems or performs specific
tasks for users.

Examples Operating Systems (Windows, Linux), Utility Programs. Word Processors (MS Word), Browsers,
Games.

Dependency Operates independently and runs the system. Requires system software to function.
User Minimal direct interaction (background operation). Significant direct interaction (user-focused).
Interaction

Scope Broad and general (system-wide control). Narrow and specific (task-oriented).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 55 of 59


1st year CS - Chapter # 01
1.72) What is a compiler? Why is it required? A computer supports five high languages, how many
compilers will this computer have?

Compiler:

A compiler is a program that translates source code written in a high-level programming language into
machine language or object code. This makes the code executable by the computer.

Why is it Required?

1. Translation: Converts human-readable code (high-level language) into machine-readable code (binary).
2. Error Detection: Identifies syntax and semantic errors during the compilation process.
3. Optimization: Enhances the performance of the code by optimizing it during translation.

If a computer supports five high-level languages, it will require five separate compilers, one for each
language. Each compiler is specifically designed to understand and translate one language into machine code.

er
1.73) What is an interpreter? How does it differ from a compiler?

nt
Interpreter:

Ce
An interpreter is a program that translates and executes source code line by line into machine code, without
generating an intermediate executable file.
ish
Interpreter Compiler
Translates code line by line during execution. Translates the entire code into machine language at
gl

once.

Slower, as translation happens during Faster, since the entire program is pre-compiled.
En

execution.
Stops at the first error, making debugging Detects all errors in the source code after compilation.
easier.
E

No separate executable file is generated. Produces an executable file after compilation.


M

Examples: Python, JavaScript. Examples: C, C++.

1.74) What is the difference between source program and an object program?

Source Program Object Program

The program written in a high-level or assembly language by the The translated version of the source program in machine
programmer. language.

Serves as input for the compiler or assembler. Serves as input for execution by the computer.

Written in human-readable programming language. Written in binary/machine language (low-level).

Easily understood and modified by humans. Not human-readable, understood only by machines.

Cannot be directly executed by the computer. Directly executed by the computer.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 56 of 59


1st year CS - Chapter # 01
1.75) Define the term low level language. Why are they used?

Low-Level Language:

A low-level language is a type of programming language that is closely related to machine code and hardware.
It provides little abstraction from the computer's hardware, allowing direct control over memory and hardware
resources.

Types of Low-Level Languages:

1. Machine Language: The lowest-level language, consisting of binary code (0s and 1s) that the computer can
directly execute.
2. Assembly Language: A step above machine language, using symbolic instructions that correspond to
machine code, but still closely tied to hardware

Why Are They Used?

er
 Efficiency: For fast and optimized performance.
 Hardware Control: Direct interaction with hardware resources.

nt
 Small Size: Programs are compact and run faster.
 Embedded Systems: Ideal for systems requiring direct hardware interaction.

Ce
1.76) Distinguish between high level and low level languages. What limitations of low level languages
were intended to be overcome by high level languages?
ish
High-Level Language Low-Level Language
Provides high abstraction from hardware. Closely tied to hardware, with minimal
gl

abstraction.
Easier for humans to read, write, and maintain. Difficult to read, write, and maintain for humans.
En

Programs are portable across different systems. Machine-specific, not portable across systems.
E

Slower execution due to additional abstraction. Faster execution as they are directly understood by
M

the CPU.
Errors are detected by compilers or interpreters. Errors are harder to detect and debug.

Examples: Python, Java, C++, JavaScript. Examples: Machine language, Assembly


language.

Limitations of Low-Level Languages Overcome by High-Level Languages:

1. Portability: Low-level languages are hardware-specific. High-level languages can run on different
hardware with minimal changes.
2. Ease of Programming: Low-level languages are complex and difficult to write and maintain. High-level
languages are easier and more user-friendly.
3. Error Handling: Debugging and error detection in low-level languages is difficult. High-level languages
offer better tools for error detection and debugging.
4. Abstraction: Low-level languages require managing every detail of hardware, while high-level languages
abstract these complexities, allowing focus on logic and problem-solving.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 57 of 59


1st year CS - Chapter # 01
1.77) Why are high level languages easier to use?
High-level languages are easier to use because they have human-readable syntax, abstract away hardware
details, offer built-in libraries, and provide better error handling. They are portable across different systems,
reducing development time and making programming more efficient.

1.78) Give some examples of high level languages.

Some examples of high-level languages include:

1. Python 2. Java

3. C++ 4. JavaScript

5. Ruby 6. PHP

er
7. Swift 8. C#

nt
9. Visual Basic 10. Kotlin

Ce
1.79) What is an assembly language? What are its advantages over machine language?
ish
Assembly Language:

Assembly language is a low-level programming language that uses symbolic names (mnemonics) to represent
gl

machine-level instructions. It is specific to a computer architecture but more readable than machine language.
En

Advantages of Assembly Language Over Machine Language:

1. Human-Readable:
E

Assembly language uses mnemonics like MOV, ADD, SUB, which are easier for humans to understand
M

compared to binary machine code (0s and 1s).

2. Ease of Debugging:
It is easier to detect and correct errors in assembly language because the instructions are more
understandable and structured.

3. Program Modification:
Modifying programs is simpler because assembly code is symbolic, and the programmer can change it
without dealing directly with binary machine code.

4. Error Handling:
Assembly language helps in identifying errors more efficiently compared to machine language, where the
errors are difficult to spot.

5. Optimization:
While both are close to hardware, assembly language allows more efficient optimization than raw machine
code, making it easier to write performance-critical software.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 58 of 59


1st year CS - Chapter # 01
1.80) What is an assembler?

Assembler:

An assembler is a software tool that translates assembly language code (which uses mnemonics and symbolic
instructions) into machine code or binary code that the computer's processor can execute.

Function of an Assembler:

 Translation: Converts human-readable assembly code into machine-readable binary code.


 Error Checking: Helps detect errors in the assembly code by providing error messages or warnings during
the translation process.
 Optimization: Some assemblers also optimize code for better performance.

1.81) Explain the term 4GLs.

er
4GLs (Fourth-Generation Languages):

nt
4GLs are high-level programming languages designed to be closer to natural language and easier to use. They

Ce
simplify programming by focusing on what the program should do rather than how to do it, and are often used
for database and business applications.
ish
Examples:

 SQL (for databases)


gl

 MATLAB (for numerical computing)


En

Advantages:

 Faster development
E

 Easier to learn and use


 More productivity-focused
M

Disadvantages:

 Less control over system performance


 Less flexibility for complex tasks

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 59 of 59


1st year CS - Chapter # 02

Class: 1st year

Chapter # 2

Information Networks

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 29


1st year CS - Chapter # 02
Contents
Network Information .........................................................................................................................................................................4
Advantages of Networking .......................................................................................................................................................4
Various Types of Networks ................................................................................................................................................................4
Local Area Network (LAN) ..................................................................................................................................................................4
Characteristics of LAN .............................................................................................................................................................4
Topology of LAN .................................................................................................................................................................................5
Star Network ......................................................................................................................................................................................5
Advantages of Star Network ....................................................................................................................................................5
Disadvantages of Star Network ...............................................................................................................................................5
Ring Network ......................................................................................................................................................................................5
Advantages of Ring Network ...................................................................................................................................................6

er
Disadvantages of Ring Network ..............................................................................................................................................6
Bus Network .......................................................................................................................................................................................6

nt
Advantages of Bus Network .....................................................................................................................................................6

Ce
Disadvantages of Bus Network ................................................................................................................................................6
Hybrid Network ..................................................................................................................................................................................7
Advantages of Hybrid Network ...............................................................................................................................................7
ish
Disadvantages of Hybrid Network ..........................................................................................................................................7
Example Usage ..........................................................................................................................................................................7
gl

LAN Models ........................................................................................................................................................................................7


En

Client / Server Model .........................................................................................................................................................................7


Peer-to-Peer Model............................................................................................................................................................................8
Components of a LAN.........................................................................................................................................................................8
E

Wide Area Network (WAN) ...............................................................................................................................................................9


M

Global Area Network (GAN) or Internet ............................................................................................................................................9


The Global Village.............................................................................................................................................................................10
From the ARPANET to the WORL WIDE WEB ..................................................................................................................................10
Who Governs the Internet? .............................................................................................................................................................11
Decentralized Nature of the Internet .......................................................................................................................................11
Making the Internet Connection .....................................................................................................................................................11
1. Connect via an Information Service Gateway .......................................................................................................................11
2. Connect via an Internet Service Provider (ISP) .....................................................................................................................11
3. Connect Directly via Network Connection ............................................................................................................................12
Summary ...................................................................................................................................................................................12
Major Features of Internet ..............................................................................................................................................................12
1. Electronic Mail (E-mail) .........................................................................................................................................................12
Advantages of E-mail ................................................................................................................................................................13
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 29
1st year CS - Chapter # 02
Disadvantages of E-mail ............................................................................................................................................................13
Usenet...............................................................................................................................................................................................13
Telnet ................................................................................................................................................................................................14
File Transfer Protocol (FTP) ..............................................................................................................................................................14
Chat ...................................................................................................................................................................................................14
World Wide Web (www) .................................................................................................................................................................14
Getting Information on the Internet ...............................................................................................................................................14
Desktop Tools for Accessing the Internet........................................................................................................................................15
Web Terminology .............................................................................................................................................................................15
Abuses of Internet ............................................................................................................................................................................15
E-mail Abuses and Protections: ................................................................................................................................................15
News Group Abuses and Protections: ......................................................................................................................................16

er
Web Browsing Abuses and Protections: ...................................................................................................................................16
Chat Programs Abuses and Protections:...................................................................................................................................16

nt
Buddy Lists Abuses and Protections: ........................................................................................................................................17

Ce
Conclusion:................................................................................................................................................................................17
Section (A) .......................................................................................................................................................................................18
-: Answer Keys :- .....................................................................................................................................................................19
ish
Section (B / C) ..................................................................................................................................................................................20
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 29


1st year CS - Chapter # 02
Network Information
An information network connects data communication hardware, computers, software, and media into a cohesive
group, enabling users to share information and resources efficiently. The key benefits of networking include

Advantages of Networking

1. File Sharing
o Facilitates sharing of files and centralized data access.
o Departments can update and access the latest data, enhancing organizational efficiency.
2. Resource Sharing
o Expensive equipment like laser printers and large hard drives can be shared among multiple users,
reducing costs.
3. Compatibility
o Allows communication between different types of computers (e.g., MS-DOS, UNIX, Apple DOS).
o Requires networking operating systems such as Windows 2000 or NetWare 4.1.
4. Improved Communication

er
o Speeds up message delivery compared to traditional inter-office mail.
o Reduces the risk of message loss and ensures accuracy.

nt
5. Cost-Effective Data Transmission
o Enables rapid data transfer over long distances using satellites or microwaves.

Ce
o More economical than traditional methods like telegrams or telephones.

Networking has become indispensable for modern organizations, improving collaboration, communication, and cost-
ish
efficiency. It ensures seamless access to shared resources and enhances productivity across geographically dispersed
locations.
gl

Various Types of Networks


En

There are many types of computer networks, but the three most common types of networks are:

1. LAN (Local Area Network),


E

2. WAN (Wide Area Network), and


M

3. GAN (Global Area Network) commonly called Internet.

Local Area Network (LAN)


A Local Area Network (LAN) is a privately owned communications network designed to connect users within a
confined geographical area, such as an office, building, or campus. It is typically implemented using wired mediums
like cables, optical fibers, or wireless technologies, and is managed by specialized networking software.

Characteristics of LAN

1. Geographical Scope
o Operates within a limited area, such as a single building or floor.
o Smaller LANs are increasingly being interconnected as applications demand more power.
2. Resource Sharing
o Facilitates sharing of hardware (e.g., printers, storage devices) and software among users.
o Makes incompatible devices work together seamlessly.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 29


1st year CS - Chapter # 02
3. Reliability
o Ensures consistent availability of services with minimal downtime or restrictions for connected
workstations.
4. External Connectivity
o Provides links to external communication systems and allows interconnection with other LANs in
different locations.
o Uses specialized hardware and software instead of traditional modems.

Topology of LAN
The physical layout of a network is called a topology. The four basic topologies for LAN are star, ring, bus, and
hybrid. In a network topology, a component is called a node, which is usually a computer on a network. (The term
node is also used to refer to any device connected to a network, including the server, computers, and peripheral
devices such as printer.)

Star Network

er
In a star network topology, all devices are connected to a central unit, typically a server. Communication between

nt
devices occurs through this central unit, which manages and directs data traffic.

Advantages of Star Network

1. Ease of Expansion Ce
o New devices can be easily added without disrupting the network.
ish
2. No Data Collisions
o The central server manages communication, preventing message collisions.
3. Fault Isolation
gl

o A failure in the connection of a single device does not affect the rest of the network.
4. Consistent Performance
En

o Transmission delays remain unaffected by adding more devices, as communication involves only two
direct links.
E

Disadvantages of Star Network


M

1. Single Point of Failure


o If the central server fails, the entire network becomes inoperable.
2. High Cost
o Requires separate cables for each device to connect to the central server, increasing setup costs.

‘The star network offers reliability and efficient communication but is heavily dependent on the central server and
can be costly to implement. It is ideal for setups where performance and fault isolation are critical.’

Ring Network
In a ring network topology, devices (terminals and peripherals) are connected in a closed loop, resembling a ring.
Communication flows in one direction (clockwise or anticlockwise), passing through each device sequentially until it
reaches its destination.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 29


1st year CS - Chapter # 02
Advantages of Ring Network

1. Collision-Free Communication
o Messages travel in a single direction, avoiding data collisions.
2. Reliability Without a Central Server
o The network does not rely on a single host computer, making it less susceptible to central failures.

Disadvantages of Ring Network

1. Single Point of Failure


o If the ring is broken at any point, the entire network stops functioning.
2. Troubleshooting Challenges
o Locating and fixing issues in the network can be difficult.
3. Limited Scalability
o Adding new devices to the ring is complex and often disrupts the network.
4. Communication Delays
o Delays increase as the number of devices in the network grows, as messages must pass through each

er
device in sequence.

nt
‘ The ring network offers collision-free data transfer and avoids dependence on a central server. However, its
vulnerability to breaks and the challenges of scalability and troubleshooting make it less practical for larger or more
dynamic setups.’

Bus Network
Ce
ish

In a bus network topology, all devices connect to a single central communication line, called the bus. Each device
communicates by sending data along the bus, where the message is accessible to all devices. A unique identifier
gl

ensures the data reaches the intended recipient. This topology does not rely on a central server.
En

Advantages of Bus Network

1. Simplicity
E

o Easy to set up and understand.


M

2. Flexible Configurations
o Supports both client/server and peer-to-peer setups.
3. Scalability
o New terminals can be added easily without major modifications.
4. Fault Tolerance at Node Level
o A malfunction in one terminal does not affect others on the network.

Disadvantages of Bus Network

1. Data Collision Risks


o Additional circuitry and software are required to manage and prevent data collisions.
2. Troubleshooting Challenges
o Errors are difficult to pinpoint and resolve.
3. Single Point of Failure
o If the bus cable is damaged or disconnected, the entire network may stop functioning.

‘ The bus network is simple, cost-effective, and suitable for small networks. However, its susceptibility to cable
failures and difficulty in troubleshooting make it less ideal for larger or more complex systems.’

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 29


1st year CS - Chapter # 02
Hybrid Network
A hybrid network combines two or more different network topologies (e.g., star, ring, bus) to create a system that
takes advantage of the benefits of each topology while minimizing their drawbacks. This approach is often used to
address specific needs based on factors such as reliability, expandability, cost, communication availability, and
routing delays.

Advantages of Hybrid Network

1. Customizability
o Combines the best features of different topologies to meet specific requirements.
2. Scalability
o Easily expandable by integrating additional topologies without overhauling the entire network.
3. Reliability
o Failure in one part of the network often does not affect the entire system due to its segmented nature.
4. Flexibility

er
o Can be designed to suit diverse environments, such as connecting different departments or buildings.

nt
Disadvantages of Hybrid Network

1. Complex Design
Ce
o Designing and configuring hybrid networks can be challenging and time-consuming.
2. Higher Cost
o Implementation and maintenance can be more expensive compared to single-topology networks.
ish
3. Troubleshooting Difficulties
o Identifying and resolving issues might require expertise due to the complexity of mixed topologies.
gl

Example Usage
En

A university campus might use:

 A bus topology to connect various departments.


E

 Star or ring networks within individual departments for better performance and organization.
M

‘ Hybrid networks offer a balanced solution for complex networking needs by blending topologies. While they come
with higher costs and complexity, their flexibility, reliability, and scalability make them ideal for large or multifaceted
systems.’

LAN Models
Regardless of the topology, LANs usually follow one of the two models: client/server or peer-to-peer.

Client / Server Model


A client/server model uses one or more computers as servers, and the other computers on the network are clients. The
server is a high-capacity, high-speed computer with a large hard disk capacity. It contains the network operating
system, the software required to run the network. The server also contains network versions of programs and large
data files. Clients-all the computers that can access the server-send requests to the server. Here are some common
services that clients request:
1. Storing and retrieving files on the server's hard disk.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 29


1st year CS - Chapter # 02
2. Running programs that are stored on the server's hard disk.
3. Printing to a network printer.
The client/server model works with any size or topology of LAN and does not tend to slow down with heavy use.

Peer-to-Peer Model
The word peer denotes one who is equal in standing with another. A peer-to-peer LAN is one in which all computers
on the network communicate directly with one another without relying on a server. Peer-to-peer networks are less
expensive than client/server networks and work effectively for up to 25 computers. Beyond that they slow down under
heavy use. They are thus appropriate for networking in small groups.
A network can also be a hybrid combining elements of both client/server and peer-to- peer models.

Components of a LAN
A Local Area Network comprises several essential components that work together to facilitate communication and

er
resource sharing. These components are:

nt
1. Connection or Cabling System


Wired Connections:
Ce
o Twisted-pair wiring, coaxial cable, or fiber-optic cable.
Wireless Connections:
ish
o Infrared, radio waves, Bluetooth, or WiFi.
 Purpose: Ensures seamless data transmission between devices.
gl

2. Microcomputers with Network Interface Cards (NICs)


En

 Microcomputers: Two or more computers are needed.


 NICs: Allow computers to send and receive data over the network.
o Can be installed in expansion slots or as external devices.
E

o Essential for communication in both wired and wireless setups.


M

3. Network Operating System (NOS)

 Role: Manages network activities, including user authentication and access control.
 Types:
o Client/Server: NOS installed on a central file server.
o Peer-to-Peer: NOS on individual devices.
 Examples:
o Novell NetWare, Microsoft Windows NT/2000, Unix, Linux.
o Peer-to-peer: Windows 95/98/Me/XP, Windows for Workgroups.

4. Other Shared Devices

 Purpose: Allow users to share resources efficiently.


 Examples:
o Printers, fax machines, scanners, storage devices, etc.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 29


1st year CS - Chapter # 02
5. Routers, Bridges, and Gateways

 Facilitate connections within and beyond the LAN, such as to the Internet.
o Router: Directs messages between multiple networks; used in Internet backbones.
o Bridge: Connects networks of the same type.
o Gateway: Enables communication between dissimilar networks (e.g., LAN to WAN).

‘A LAN integrates hardware (cabling, NICs, shared devices) and software (NOS, connectivity tools) to connect
devices and enable communication within a localized area, ensuring efficient resource sharing and external
connectivity when required.’

Wide Area Network (WAN)


A Wide Area Network connects devices across vast geographical areas, enabling efficient communication and data
sharing.

er
Key Characteristics of WAN

nt
1. Geographical Coverage:
o Extends beyond the scope of a local area network (LAN).
o
2. Transmission Medium:
o Utilizes public systems such as:
 Telephone lines.
Ce
Covers regions like provinces, countries, or even continents.
ish
 Microwave links.
 Satellite communication.
3. Connectivity and Access:
gl

o Allows multiple users to access various host computers simultaneously.


o Maintains session separation to ensure privacy among users.
En

o Access might be restricted due to associated service costs.


4. Communication Speed:
o Operates at speeds significantly higher than traditional voice-grade telephone lines.
E

5. Inter-LAN Communication:
o Facilitates communication between different LANs, creating a unified network system.
M

Advantages of WAN

 Global Reach: Connects offices, branches, and data centers across large distances.
 Resource Sharing: Enables sharing of resources like servers and databases globally.
 Improved Business Operations: Supports real-time communication and centralized data management.

‘WANs are critical for enterprises needing long-distance communication and collaboration, leveraging high-speed
connections through public infrastructure to link networks seamlessly.’

Global Area Network (GAN) or Internet


Global area network or Internet (a worldwide collection of interconnected networks) is a collection of networks a
network of networks that communicate with each other by using the same standards (protocols) of communication.
The computers that make up these networks are of different types. Currently, over one million computer systems- with
tens of millions of users in almost every country in the world-make up the Internet. Users access the Internet by
contacting a computer that connects to the Net.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 29


1st year CS - Chapter # 02
The Global Village
The concept of the global village represents how computers and networks connect individuals and organizations
worldwide, fostering communication, collaboration, and efficiency.

Key Aspects of the Global Village

1. Enhanced Communication:
o Computers link people and organizations globally.
o Facilitate electronic meetings, information retrieval, and transactional activities like hotel or airline
reservations.
2. Global Integration:
o Networks enable simultaneous transactions and operations, such as:
 Processing insurance claims in one country while data is entered in another.
 Coordinating multinational supply chains for product manufacturing.
3. Economic Impact:
o Creates a global economy, where businesses interact across borders to find partners, customers, and

er
suppliers.
o Promotes real-time financial operations like stock trading globally.

nt
4. Consumer Empowerment:
o Customer feedback on products or services can quickly influence public opinion through online
forums and bulletin boards.
Ce
o High accountability for businesses to meet customer expectations.
5. Information Sharing:
ish
o Internet platforms host special-topic forums, including reviews for products, services, restaurants, etc.
o Consumers benefit from informed choices based on global community discussions.
gl

From the ARPANET to the WORL WIDE WEB


En

The Internet’s evolution began as a U.S. Department of Defense (DOD) initiative in 1969, aimed at creating a resilient
communication network capable of functioning during outages or attacks.
E

Key Milestones
M

1. ARPANET's Creation (1969):


o Sponsored by the Advanced Research Projects Agency (ARPA) to unite geographically dispersed researchers
through technology.
o Initial demonstration linked UCLA and Stanford University in California.
2. Expansion:
o By 1971, ARPANET connected over 20 sites, including Harvard and MIT.
o By 1981, it reached 200 sites, eventually expanding worldwide.
3. Development of TCP/IP (1983):
o To standardize communication among different computers, TCP/IP became the universal protocol.
o TCP/IP allowed seamless communication across diverse networks and became the backbone of the Internet.
4. Decline of ARPANET:
o By 1990, ARPANET was decommissioned, leaving behind a framework for the global Internet.
5. Information Superhighway Concept:
o The National Information Infrastructure (NII) aimed to deliver high-speed connectivity for homes, schools, and
businesses.
o NII envisioned instantaneous access to text, video, graphics, and sound.

Impact

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 29


1st year CS - Chapter # 02
 Global Connectivity: The Internet connects diverse systems worldwide, enabling instant communication and resource
sharing.
 Technological Advancement: Protocols like TCP/IP laid the foundation for modern networking.
 Economic and Social Transformation: Internet-driven globalization has reshaped communication, commerce, and
education.

Who Governs the Internet?


The Internet is not governed by a single entity but is coordinated through a decentralized model. When the
ARPANET was initially developed, one of its key goals was to ensure that communication could continue even if
parts of the network went down. This design choice, which avoids a central controlling point, remains in place today.

Decentralized Nature of the Internet

Unlike commercial services like AOL, CompuServe, or AT&T WorldNet, which are governed by specific
companies, the Internet is managed by a variety of volunteer organizations from multiple countries. These volunteers
participate in:

er
 Advisory boards

nt
 Task groups
 Steering committees

Ce
These groups do not have governing power, but they help coordinate and set standards for global operations. For
instance, organizations like the Internet Engineering Task Force (IETF) and Internet Corporation for Assigned
ish
Names and Numbers (ICANN) play vital roles in managing the technical and operational standards of the Internet.

Making the Internet Connection


gl
En

There are several ways to connect your PC to the Internet, each with its own advantages depending on your needs.
Below are the three primary methods:

1. Connect via an Information Service Gateway


E


M

This method involves subscribing to a commercial information service, such as America Online (AOL), CompuServe, or
Microsoft Network (MSN). These services provide electronic gateways to the Internet and are ideal for home users or
small businesses.
 Characteristics:
o The service acts as a self-contained network.
o You access the Internet through the service's proprietary gateway, which connects you to the broader network.
o These services typically offer email, chat, and web browsing features as part of their package.

2. Connect via an Internet Service Provider (ISP)

 In this method, you connect through a dial-up or broadband connection provided by an Internet Service Provider (ISP).
This gives you full access to the Internet.
o Dial-up connection: Uses a modem and a telephone line to connect to a remote computer, usually a server.
This type of connection is temporary and relatively slow.
o ISPs: Providers such as Pak Net, Cyber Net, or universities offer Internet access to individuals and
organizations.
o Requirements:
 You need an account with the ISP.
 TCP/IP software is required for establishing a connection.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 29


1st year CS - Chapter # 02
 Characteristics:
o Full access to the Internet.
o Can range from dial-up to broadband (faster speeds).

3. Connect Directly via Network Connection

 This method offers a direct connection to the Internet, usually through a Local Area Network (LAN).
o LAN: Your computer is directly wired to the network, which shares a high-speed connection to the Internet.
o A LAN may use ISDN (Integrated Services Digital Network) for faster speeds (64 kbps or 128 kbps), or even
faster digital lines depending on the network setup.
 Characteristics:
o Fast and immediate access (no dial-up wait times).
o Available 24/7 and more reliable than dial-up.
o Typically used by businesses, universities, or large organizations where high-speed access is needed.
o Your PC must be configured with TCP/IP software to communicate over the LAN and connect to the Internet.

Summary

er
 Information Service Gateway: Best for basic home users who need access to email and browsing.

nt
 Internet Service Provider: Provides full Internet access through dial-up or broadband; requires an ISP
account.

Ce
Direct Network Connection: Fastest and most reliable method, ideal for users in environments with LAN
setups (businesses, universities).

Major Features of Internet


ish

The Internet offers a variety of features that have transformed communication, information access, and entertainment.
gl

These features include electronic mail (e-mail), Usenet, Telnet, File Transfer Protocol (FTP), and Chat. Various
programs, such as Archie, Gopher, WAIS, and the World Wide Web (WWW), have been developed to enhance
En

these features.

1. Electronic Mail (E-mail)


E

E-mail has become the world's largest electronic communication system, allowing users to send messages, files, and
M

documents instantly. Here's a breakdown:

E-mail Address Format

An e-mail address has two parts:

 Username: The individual sending or receiving the message.


 Domain Name: The system where the user has an account.

Example:
aqibilyas@[Link]

 Username: aqibilyas
 Domain: [Link] (commercial domain)

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 12 of 29


1st year CS - Chapter # 02
Categories of Domain Names

E-mail addresses often have a domain name that indicates the type of organization. Common domain suffixes include:

 .com: Commercial organizations


 .edu: Educational institutions
 .gov: Government agencies
 .mil: Military sites
 .net: Networking resources
 .org: Private organizations
 .rec: Recreational groups

Some countries also have unique domain codes. For example:

 .pk: Pakistan
 .uk: United Kingdom
 .us: United States of America

er
Advantages of E-mail

nt
1. Fast: Messages are delivered almost instantly.
2.
3.
4.
5.
Easy: Manage and respond to messages with simple tools.
Available: Accessible anytime, anywhere.
Fun: Connect with friends across the globe. Ce
Cheap: Often free or low-cost compared to traditional postal services.
ish
6. Flexible: Send messages to multiple recipients at once.

Disadvantages of E-mail
gl

1. Not universally available: E-mail access may not be available to everyone.


En

2. Information overload: Managing large volumes of e-mails can be overwhelming.


3. Viruses: E-mails can contain malicious attachments.
4. Irreversible errors: Once sent, e-mails cannot be recalled if sent to the wrong address.
E

5. Privacy issues: E-mail can be hacked, compromising confidentiality.


6. Spam: Unsolicited e-mails can be a nuisance.
M

Usenet
Usenet is a collection of over 30,000 discussion groups on various topics, where users can post articles or replies. It’s
organized into major domains, such as:

 Comp: Computer topics


 Sci: Science and technology (excluding computers)
 Soc: Social issues and politics
 News: Usenet-related topics
 Rec: Hobbies and recreational activities
 Misc: Miscellaneous topics

Alternative domains include Alt (alternative topics), Biz (business), and Clari (news). Each group is identified by a
domain and topic, like [Link] or [Link].

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 13 of 29


1st year CS - Chapter # 02
Telnet
Telnet allows access to remote computers on the Internet, enabling users to explore databases and public services
worldwide. It may require login credentials or be open. Hytelnet is a tool for easy access, and the World Wide Web
integrates Telnet access and FTP for document retrieval.

File Transfer Protocol (FTP)


FTP allows downloading files and programs from public archives on remote computers. Using an FTP client, you can
access these directories. If you can't locate a file, Archie helps by providing addresses of archives containing the file.

Chat
Chat enables interactive conversations over the Internet. Key types include:

 Internet Relay Chat (IRC): A real-time text chat, allowing multiple participants. It occurs in virtual "chat
rooms" that can be private or open.

er
 3-D Virtual Chat: A graphical extension of IRC where users interact as 3-D avatars in a virtual room.
 Instant Messaging (IM): A quick form of chat, often initiated via a buddy list, where messages appear

nt
instantly.
 Internet Telephony (Voice Chat): Allows voice conversations over the Internet, bypassing traditional phone
systems, with varying levels of sophistication.

World Wide Web (www)


Ce
ish
World Wide Web (www) is a global hypermedia system where users click on underlined words (hyperlinks) to
access resources on different Internet computers. It allows easy navigation through hyperlinks, enabling global access
gl

to information across countries. Web addresses (URLs) identify resources, often starting with "[Link] followed by a
domain name and specific directories or files. Examples of URLs include:
En

 [Link]
 [Link]
E

These links connect users to websites, files, or FTP/Gopher sites. URLs are case-sensitive for specific requests, but the
M

domain name is not.

Getting Information on the Internet


Getting Information on the Internet can be done in three ways:

1. Searching: Use search engines like Google or AltaVista to find information by entering relevant keywords or
phrases.
2. Browsing: Use web guides like Yahoo or Excite, which categorize resources into subjects, allowing you to
browse through multiple levels of categories.
3. Asking Someone: Post inquiries on the Internet or refer to FAQ pages, as someone may have already
answered your question.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 14 of 29


1st year CS - Chapter # 02
Desktop Tools for Accessing the Internet
A Web browser enables you to navigate the Internet, display Web pages, and interact with online resources. Popular
browsers include Netscape Navigator and Microsoft Internet Explorer. Key properties to consider when choosing a
browser:

 Functionality: Browsers offer features like email, chat, FTP, Telnet, and Web publishing.
 Navigational Tools: Features like history lists, bookmarks, and toolbars for easy navigation.
 Speed: Techniques like progressive graphics display to speed up page loading.
 Customizability: Settings to adjust how pages display and change the default Web portal.
 Framing: Allows multiple Web pages to be displayed in separate windows (frames).
 Java and ActiveX Support: Run Java applets and integrate with other applications (e.g., edit Word docs in a
browser).
 Webcasting: Watch broadcasts, similar to television, directly in the browser.
 Workgroup Computing: Collaboration tools for shared projects.
 Multimedia Support: Play sound and video files.
 Real-Time Processing: Features like voice chat or video conferencing for live interaction.

er
 Virtual Reality: Explore 3D environments using VRML or plug-ins.
 Web Publishing: Create and test your own Web pages.

nt
 Security: Protect sensitive data with encryption and digital signatures.

Web Terminology

Ce
Anchor: A link that directs you to a different section of the same page.
ish
 Browser: A program that requests and displays Web pages, like Internet Explorer or Netscape Navigator.
 Client: A program or computer that requests information from Web servers.
 Domain Name: A unique name for a computer on the Web, such as [Link].
gl

 Extranet: A private network that connects internal staff, customers, suppliers, and offices.
 Firewall: A system that blocks unauthorized traffic between a network and the Internet.
En

 Frame: A Web feature that displays content in separate sections of the browser.
 Home Page: The main or first page of a website.
 HTML: Hypertext Markup Language, the coding language for creating Web pages.
E

 Image Map: A graphic with clickable areas that link to different resources.

M

Intranet: A private, internal network using Internet technology.


 Link: A hypertext link that connects parts of a document or different documents.
 Proxy Server: A server that filters and routes communications to an internal network.
 Table: A structure that arranges content in rows and columns.
 Website: A collection of related Web pages, often with a home page.
 Webmaster: The person who manages and updates a website's content.

Abuses of Internet
The Internet, like a digital Wild West, presents challenges in terms of security and safety. Common abuses and
protections are outlined for various Internet services:

E-mail Abuses and Protections:

 Abuses:
1. Sending threatening or harassing messages.
2. Overloading mailboxes with excessive messages.
3. Spam (unwanted advertising or inappropriate content).
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 15 of 29
1st year CS - Chapter # 02
4. Scams and fraud.
5. Sending unsolicited pornography.
 Mistakes:
1. Poor composition or spelling errors.
2. Sharing embarrassing information.
3. Sending junk mail, chain letters, or jokes.
 Protection:
o Use encryption for privacy.
o Report misaddressed emails or harassment to appropriate authorities.
o Be cautious of scams (e.g., too-good-to-be-true offers).

News Group Abuses and Protections:

 Abuses:
1. Flaming (personal attacks).
2. Off-topic posts.

er
 Mistakes:
1. Engaging in flame wars.

nt
2. Posting irrelevant content.
 Protection:

Ce
o Notify authorities in case of threats or harassment.
o Be aware of scams and fraud.
ish

Web Browsing Abuses and Protections:


gl

 Abuses:
En

1. Spreading incorrect or harmful information.


2. Promoting illegal activities like gambling or hate speech.
3. Accessing inappropriate content (e.g., porn sites).

E

Mistakes:
o Believing false information.
M

 Protection:
o Use filtering software to block inappropriate content.
o Keep browsers updated with the latest security patches.

Chat Programs Abuses and Protections:

 Abuses:
1. Harassment or taking over chat rooms.
2. Soliciting pornography or inappropriate interactions, especially targeting children.
 Mistakes:
1. Sharing personal information with strangers.
 Protection:
o Use a firewall.
o Be cautious about who you interact with online.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 16 of 29


1st year CS - Chapter # 02
Buddy Lists Abuses and Protections:

 Abuses:
1. Sending mass unsolicited messages.
2. Transmitting viruses or malware.
 Protection:
o Use privacy settings and restrict information sharing.
o Block problematic users.

Conclusion:

While the Internet offers a vast array of benefits, it also comes with risks, from e-mail abuses to unsafe browsing and
communication practices. To protect yourself, stay informed about potential threats, use security measures like
encryption and firewalls, and practice caution when interacting online.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 17 of 29


1st year CS - Chapter # 02

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. A network that spans a large city is known as a(n)
(a) ISDN (b) LAN (c) WAN (d) NIC
2. A network of geographically distant computers and terminals is called a(n)
(a) BUS (b) WAN (c) GAN (d) LAN
3. The physical layout of a LAN is called the
(a) topology (b) contention (c) link (d) switch
4. Select the simplest topology from the following

er
(a) bus topology (b) star topology (c) token ring (d) hybrid topology
5. A network that places all nodes on a single cable:

nt
(a) star (b) ring (c) switched (d) bus

(b) star
Ce
6. Which of the following network configurations always uses a central server?
(a) bus (c) ring (d) hybrid
ish
7. The network type in which all computers have equal status is called
(a) a communication (b) peer-to-peer link (c) WAN (d) a gateway
gl

8. A device that provides the network with a single point of contact for all other devices is called
En

(a) hub (b) router (c) bridge (d) repeater


9. A hardware and software combination used for connecting similar networks is a
E

(a) router (b) gateway (c) bridge (d) fax


M

10. Which of the following is a standard LAN component?


(a) network operating system (b) cabling system (c) network interface cards (d) All of these
11. The birth of the World Wide Web took place at
(a) Rand Corporation (b) ARPA (c) CERN (d) Microsoft
12. The author of the Web was
(a) Rand Corporation (b) Tim Boners Lee (c) ARPANET (d) Marc Andree Sen
13. The first browser was called
(a) Internet Explorer (b) ARPANET (c) FTP (d) Mosaic
14. Internet protocol is governed by
(a) EFT (b) GAN (c) TCP/IP (d) EDI

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 18 of 29


1st year CS - Chapter # 02

15. Which of the following enables different computers on different networks to communicate with each other?
(a) Modems (b) Internet service provider (c) TCP/IP software (d) All of these
16. Which of the following would you use to search for and retrieve files stored on different computers?
(a) FTP (b) Gopher (c) HTML (d) All of these
17. Which is not a Boolean operator?
(a) OR (b) AND (c) IN (d) NOT
18. Which Markup language is used to produce web pages?
(a) WML (b) HTML (c) XML (d) SGML
19. Every HTML document is stored on URL, also known as
(a) ftp server (b) http server (c) proxy server (d) www server

er
20. Which of the following addresses might you use to connect to a private organization?

nt
(a) 71222.1111@[Link] (b) susanh@[Link]
(c) help@[Link]
Ce
(d) All of these
ish

-: Answer Keys :-
gl

1. c 6. b 11. c 16. a
En

2. b 7. b 12. b 17. c
3. a 8. a 13. d 18. b
E

4. a 9. c 14. c 19. b
M

5. d 10. d 15. d 20. d

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 19 of 29


1st year CS - Chapter # 02

Section (B / C)
2.1. List and describe briefly the benefits that networks provide.

Benefits of Networks:

1. Resource Sharing:
Networks allow multiple devices to share resources like printers, scanners, and internet connections,
reducing costs.
2. Data Sharing:
Users can easily share files, documents, and information across the network, improving collaboration and
efficiency.
3. Communication:
Networks enable instant communication through emails, chats, and video calls, connecting people
worldwide.
4. Centralized Management:

er
Administrators can manage resources, software, and data centrally, ensuring consistency and security.
5. Data Backup and Recovery:

nt
Networks make it easier to perform regular backups and recover data in case of failures.
6. Scalability:

7. Cost Efficiency:
Ce
Networks can grow by adding more devices and users, making them flexible for expanding businesses.

Shared resources and centralized management reduce operational and equipment costs.
8. Remote Access:
ish
Users can access network resources and data from anywhere, enabling remote work and collaboration.

2.2. What is a LAN? What are its main objectives?


gl

LAN (Local Area Network):


En

A LAN is a network that connects computers and


devices within a limited area, such as a home,
E

office, or building. It uses wired or wireless


M

connections to share resources and enable


communication.

Main Objectives of a LAN:

[Link] Sharing:
Share hardware (e.g., printers) and software
among connected devices to reduce costs.
[Link] Sharing:
Facilitate fast and secure sharing of files and information between users.
[Link]:
Enable efficient communication through emails, chats, or collaborative tools within a local area.
[Link] Management:
Manage resources, software, and security policies centrally for ease of administration.
[Link] Efficiency:
Reduce equipment and operational costs by sharing resources.
[Link] Connectivity:
Connect multiple devices in a small geographic area for seamless interaction.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 20 of 29


1st year CS - Chapter # 02
2.3. List and describe briefly the four common LAN topologies.

Common LAN Topologies:

[Link] Topology:

All devices are connected to a single central cable


(bus).

o Advantage: Easy to set up and cost-effective for


small networks.
o Disadvantage: A fault in the central cable can
disrupt the entire network.

er
[Link] Topology:

nt
All devices are connected to a central hub or switch.

o
Ce
Advantage: Easy to add/remove devices, and a failure in
one device doesn’t affect others.
o Disadvantage: If the hub/switch fails, the entire network
ish
goes down.
gl
En

[Link] Topology:

Devices are connected in a circular chain where each


device connects to two others.
E
M

o Advantage: Data travels in a predictable direction,


reducing collisions.
o Disadvantage: A break in the ring disrupts the
network.

[Link] Topology:

Every device is connected to every other device.

o Advantage: High reliability; failure of one connection


doesn’t disrupt communication.
o Disadvantage: Complex and expensive to set up due to
multiple connections.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 21 of 29


1st year CS - Chapter # 02
2.4. What is a hybrid network?

Hybrid Network:

A hybrid network combines two or more different types of


network topologies, such as star, bus, ring, or mesh, to form a
single network. This allows the network to leverage the
advantages of each topology while minimizing their
disadvantages.

Example:

A corporate network may use a star topology in individual departments and connect them via a bus topology
for inter-department communication.

2.5. What are the components of a LAN?

er
Components of a LAN (Local Area Network):

nt
1. Computers/Workstations:

Ce
Devices like PCs or laptops connected to the network for communication and resource sharing.
2. Network Interface Card (NIC):
A hardware component that enables devices to connect to the LAN.
3. Switch/Hub:
ish
Central devices that connect multiple devices in the network, allowing data to be transmitted.
4. Cables and Connectors:
Physical medium (e.g., Ethernet cables) used to connect devices in a wired LAN.
gl

5. Router:
Connects the LAN to external networks like the internet.
En

6. Wireless Access Points (WAP):


Enable wireless devices to connect to the network.
7. Server:
E

Centralized computer providing services like file storage, application hosting, or user management.
8. Software:
M

Includes operating systems, networking protocols, and applications that manage communication and
resource sharing.
9. Storage Devices:
Shared drives or cloud systems for storing and accessing files on the network.

2.6. What is a WAN? What are its main objectives?

WAN (Wide Area Network):

A WAN is a network that connects multiple smaller networks


(such as LANs) across large geographical areas, such as cities,
countries, or even globally. It uses public or private
communication links like satellite, fiber optics, or leased
telephone lines.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 22 of 29


1st year CS - Chapter # 02
Main Objectives of a WAN:

[Link] Over Long Distances:


Connect users, offices, or organizations located far apart.
[Link] Sharing:
Allow sharing of data, applications, and hardware across multiple locations.
[Link]:
Enable seamless communication through email, voice, and video conferencing.
[Link] Data Access:
Provide access to centralized databases and servers from remote locations.
[Link]:
Support a large number of devices and expand as needed.
[Link] Collaboration:
Facilitate efficient collaboration among geographically dispersed teams.
[Link] Efficiency:
Reduce costs by centralizing resources and minimizing the need for physical relocation.

er
2.7. Differentiate between a LAN and a WAN. Given one example of each.

nt
LAN (Local Area Network) WAN (Wide Area Network)

1. Limited to a small area (e.g., office, home).

2. Generally faster due to proximity of devices.


Ce
1. Covers large geographical areas (e.g., cities,
countries).
2. Slower compared to LAN due to distance and multiple
ish
nodes.
3. Can use public or leased infrastructure shared by
3. Usually owned and managed by a single entity.
multiple entities.
gl

4. More expensive due to infrastructure and


4. Less expensive to set up and maintain.
maintenance.
En

5. Potentially less reliable due to multiple external


5. High reliability due to limited distance.
factors.
Example: A network in a school computer lab. Example: The internet is the largest example of a WAN.
E
M

2.8. Describe the Internet.

Internet:

The Internet is a global network of interconnected computers and networks that communicate using standard
protocols like TCP/IP. It allows users to access, share, and exchange information and resources worldwide.

Key Features:

1. Global Connectivity: Links millions of private, public, academic, business, and government networks.
2. Standard Protocols: Uses common communication rules to ensure seamless data exchange.
3. Services: Provides various services like email, websites, social media, cloud storage, and streaming.
4. Decentralized Structure: No single entity controls the Internet, making it open and versatile.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 23 of 29


1st year CS - Chapter # 02
2.9. Why was the Internet designed with no central office or computer?

The Internet was designed without a central office or computer to ensure decentralization, making it reliable and
secure. This allows communication to continue even if parts of the network fail. The design also supports
scalability and resilience.

2.10. What is a communication protocol? What are the normal functions performed by these
protocols?

Communication Protocol:

A communication protocol is a set of rules and standards that govern how data is transmitted and received over
a network, ensuring seamless communication between devices.

Functions of Communication Protocols:

1. Data Formatting: Define the structure and format of transmitted data.

er
2. Error Detection and Correction: Identify and fix transmission errors.
3. Flow Control: Manage data transmission speed to prevent overload.

nt
4. Addressing and Routing: Ensure data reaches the correct destination.
5. Session Management: Establish, maintain, and terminate communication sessions.
6.
Ce
Security: Protect data integrity and privacy during transmission.

2.11. Describe the difference between dialup access and direct Internet access.
ish
Feature Dial-Up Access Direct Internet Access
gl

Connection Uses a telephone line to connect temporarily Always-on connection via broadband, fiber, or
Type to the Internet. dedicated lines.
En

Speed Slow (up to 56 kbps). Much faster (Mbps to Gbps).


Reliability Less reliable, prone to disconnections. Highly reliable with stable connections.
E

Ideal for modern activities like streaming, gaming,


Usage Suitable for basic tasks like email.
and large file transfers.
M

Connecting through a modem over a phone


Example Fiber-optic or cable internet at home or office.
line.

2.12. Contrast the two ways of obtaining direct access to the Internet.

Two Ways of Obtaining Direct Access to the Internet:

1. Dedicated Connection:

A permanent, always-on connection, typically provided via broadband (fiber, cable, DSL).

o Features: High-speed, reliable, supports multiple users, ideal for businesses and households.
o Example: Fiber-optic internet connection.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 24 of 29


1st year CS - Chapter # 02
2. Leased Line Connection:

A private line rented exclusively for direct access to the internet, often used by large organizations.

o Features: Extremely reliable, secure, and provides consistent speeds, but more expensive.
o Example: T1 or T3 leased lines for enterprise networks.

2.13. List the five basic services available through the Internet.

Five Basic Services Available Through the Internet:

1. Email:
Allows users to send and receive messages electronically.
2. Web Browsing:
Enables access to websites and information via web browsers.
3. File Transfer:
Facilitates the transfer of files between computers through protocols like FTP.

er
4. Instant Messaging:
Real-time communication service for text, voice, or video chat.

nt
5. Online Services:
Includes services such as online banking, shopping, and cloud storage.

2.14. Describe the parts of an e-mail address. Ce


ish
An email address typically consists of three main parts:

1. Local Part:
gl

This is the username or identifier before the "@" symbol, which represents the individual or organization’s
mailbox (e.g., [Link]).
En

2. @ Symbol:
The "@" symbol separates the local part from the domain part of the email address.
3. Domain Part:
This follows the "@" symbol and specifies the mail server's domain, often including the organization's name
E

and the top-level domain (TLD) (e.g., [Link]).


M

2.15. Which of the following are the correct e-mail addresses?

(a) icap@[Link]

(b) [Link]@[Link]

(c) sohail@[Link]

(d) abc-73@[Link]

(e) [Link]@[Link]

(f) ABC-73@[Link]

The correct email addresses from the list are:

 (a) icap@[Link] ✔

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 25 of 29


1st year CS - Chapter # 02
 (b) [Link]@[Link] ✔
 (c) sohail@[Link] ✔
 (d) abc-73@[Link] ✔
 (f) ABC-73@[Link] ✔

(e) [Link]@[Link] is incorrect because the domain part "[Link]" should not contain an "@"
symbol. Only one "@" symbol is allowed in an email address.

2.16. Compare Usenet and Telnet.

Usenet Telnet
A distributed discussion system for news groups and A protocol for remote access to another computer’s
forums. system.
Allows users to post and read articles in newsgroups. Provides terminal access to remote computers.
Asynchronous (post messages and read at any time). Synchronous (real-time interaction with remote systems).

er
Interaction is through command-line interface to a remote
Interaction is through newsgroups and message boards.
system.

nt
Requires a direct, real-time connection to a remote
Works through a decentralized network of servers.
computer.

Online discussion forums, sharing articles or files. Ce


Remote login to servers, running programs on remote
systems.
ish
2.17. What technologies are being suggested to speed up the Internet?
gl

Technologies to Speed Up the Internet:


En

1.5G Networks:
The next-generation cellular network technology, offering faster speeds, lower latency, and more reliable
connections compared to 4G.
[Link] Optic Broadband:
E

Fiber optics provide ultra-fast internet speeds with much higher bandwidth and reliability than traditional
M

copper cables.
[Link]-Fi 6 (802.11ax):
The latest Wi-Fi standard, offering faster speeds, greater capacity, and better efficiency in crowded
environments.
[Link] Computing:
Processing data closer to the source (at the "edge") to reduce latency and speed up responses, improving
overall internet performance.
[Link] Internet (e.g., Starlink):
Low-earth orbit (LEO) satellites are being used to provide high-speed internet access to remote and
underserved areas.
[Link] Algorithms:
Data compression techniques reduce the amount of data that needs to be transmitted, improving speeds,
especially in mobile networks.
[Link] Delivery Networks (CDNs):
CDNs cache data closer to the user, speeding up access to websites and services by reducing the distance
data travels.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 26 of 29


1st year CS - Chapter # 02
[Link] Routing Protocols:
New routing techniques, such as SD-WAN (Software-Defined WAN), optimize internet traffic to reduce
delays and improve bandwidth management.

2.18. What is a Web browser?

Web browser:

A web browser is a software application that


allows users to access, view, and interact with
content on the World Wide Web. It interprets
and displays web pages, which are written in
HTML, CSS, and JavaScript.

Examples of Web Browsers:

 Google Chrome

er
 Mozilla Firefox
 Safari

nt
 Microsoft Edge
 Opera

Ce
2.19. How are Uniform Resource Locators (URLs) used on the Web?
ish
Uniform Resource Locators (URLs)

A Uniform Resource Locator (URL) is the address used to locate resources on the web. It provides the
gl

necessary information for browsers to retrieve and display web pages or other resources, such as images,
videos, or documents.
En

Components of a URL:
E

1. Scheme:
Specifies the protocol used to access the resource (e.g., [Link] [Link] [Link]
M

2. Host (Domain Name):


The web server's address, usually in the form of a domain name (e.g., [Link]).
3. Port (optional):
A specific gateway or door to the server, often omitted as the default port (80 for HTTP, 443 for HTTPS)
is used.
4. Path:
The location of the specific resource or file on the server (e.g., /about-us).
5. Query String (optional):
Provides additional parameters for dynamic pages, typically after a ? symbol (e.g., ?id=123).
6. Fragment (optional):
A reference to a specific section within the web page (e.g., #section2).

How URLs are used:

 Identifying Resources: URLs help browsers find and access specific web pages, images, videos, or other
files on the internet.
 Navigating the Web: By entering a URL into the browser's address bar or clicking a hyperlink, users can
visit websites or resources.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 27 of 29


1st year CS - Chapter # 02
2.20. In the URL, [Link] what is the http component?

In the URL [Link] the "http" component is the scheme or protocol.

It specifies the method or protocol used to access the resource on the web. In this case, http stands for
HyperText Transfer Protocol, which is used for transferring web pages over the internet. It indicates that the
browser should use the HTTP protocol to retrieve the resource from the server.

2.21. In the URL, [Link] what is the [Link] component?

In the URL [Link] the "[Link]" component is the domain name


or host.

It represents the specific web server that hosts the website or resource. In this case, [Link] is the
domain name that directs the browser to the server where the website is stored. The "www" is a subdomain that
traditionally indicates the World Wide Web service, although it is not mandatory in modern URLs.

er
2.22. Define search engine.

nt
A search engine is a web-based tool that allows users
to find information on the internet by entering
keywords or queries. It searches through vast
databases of indexed web pages and returns relevant Ce
results in the form of links to websites, images, videos,
ish
or other content.

Examples of Search Engines:


gl

 Google
En

 Bing
 Yahoo
 DuckDuckGo
E

2.23. What is the purpose of a Web page?


M

The purpose of a web page is to present content and information on the internet in an accessible and interactive
way. Web pages are the building blocks of websites, designed to be viewed and interacted with through web
browsers.

2.24. What hardware do you need to get on the Web?

To get on the web, you need a computer or mobile device, a modem (for connecting to the internet), a router
(for network distribution), a Network Interface Card (NIC), and a network connection (wired or wireless).

2.25. Briefly describe the functions of an Internet browser.

An internet browser performs the following functions:

1. Accessing Web Pages: Retrieves and displays websites when users enter URLs or search queries.
2. Navigation: Allows users to move between web pages using back, forward, and refresh buttons.
3. Rendering Content: Interprets and displays HTML, CSS, and JavaScript to render webpages correctly.
4. Security: Provides features like encryption (HTTPS), pop-up blocking, and privacy settings.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 28 of 29


1st year CS - Chapter # 02
5. Managing Bookmarks: Allows users to save and organize their favorite websites for easy access.

2.26. What are the uses and abuses of Internet?

Uses of the Internet:

1. Communication: Enables email, video calls, social media, and instant messaging.
2. Education: Provides access to online courses, research materials, and educational tools.
3. Entertainment: Offers streaming services for music, movies, games, and other media.
4. Shopping and E-commerce: Facilitates online buying, selling, and business transactions.
5. Information Access: A vast source for news, research, and general knowledge.

Abuses of the Internet:

1. Cybercrime: Includes hacking, identity theft, and online fraud.


2. Cyberbullying: Harassment or bullying via social media, messages, or forums.
3. Addiction: Excessive use of social media, gaming, or other internet activities.

er
4. Privacy Violations: Sharing personal data without consent or misuse of personal information.
5. Inappropriate Content: Access to harmful, offensive, or illegal content like explicit material.

nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 29 of 29


1st year CS - Chapter # 03

Class: 1st year

Chapter # 3

Data Communications

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 22


1st year CS - Chapter # 03
Contents
Data Communication .................................................................................................................................................................. 3
Characteristics of Data Transmission .......................................................................................................................................... 4
Data Communications Speed and Media .................................................................................................................................... 4
Communications Hardware ........................................................................................................................................................ 5
Communications Protocol........................................................................................................................................................... 6
The OSI Model ............................................................................................................................................................................ 6
Communications Software.......................................................................................................................................................... 7
Section (A).................................................................................................................................................................................. 8
-: Answer Keys :-................................................................................................................................................................ 9
Section (B / C) .......................................................................................................................................................................... 10

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 22


1st year CS - Chapter # 03
Data Communication
Data communication involves the transfer of data (voice, sound, images, text, or multimedia) across distances using
various transmission methods.

Basic Elements:

1. Transmitter (Source): Creates and sends the message.


2. Medium: Transfers the message (e.g., telephone lines, microwaves, satellites).
3. Receiver: Receives the transmitted message.

Example: In a phone call, the speaker is the transmitter, the telephone line is the medium, and the listener is the
receiver.

Forms of Data:

er
1. Text Data: Standard characters used in documents and reports.
2. Graphics Data: Images, drawings, and illustrations, requiring complex representations.

nt
3. Audio Data: Sounds like voice or music stored digitally.
4. Video Data: Motion pictures like movies or live streams.

Ce
Multimedia Systems: Handle multiple data types (text, graphics, audio, video), providing interactive and dynamic
content.
ish
Data Communication Standards

Evolution:
gl

 Began in the 19th century with the telegraph, telephone, and radio.
En

 20th-century innovations like television, computers, and electronic communication tools followed.

Need for Standards:


E

 Early communication methods were manufacturer-specific.


M

 Standards ensure interoperability and uniformity across devices and systems.

Key Organizations:

 National: NIST (USA), ANSI, IEEE, NISO.


 International: ISO, CEPT, CCITT, BSI.

Purpose of Standards:

 Establish consistent rules for device interaction.


 Address the challenge of selecting suitable methods from numerous options for interconnectivity.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 22


1st year CS - Chapter # 03
Characteristics of Data Transmission
1. Signal Type: Analogue vs. Digital

 Analogue Signals: Continuous waveforms with varying amplitude (signal strength) and frequency (repetitions per
second). Example: Telephone lines carrying voice.
 Digital Signals: Discrete on/off pulses matching the binary language of computers (0s and 1s). Example: Computer data
transmission.

2. Transmission Modes: Asynchronous vs. Synchronous

 Asynchronous Transmission:
o Sends one byte at a time with start and stop bits.
o Inexpensive but slow.
o Common for microcomputers.
 Synchronous Transmission:
o Sends blocks of data with header and trailer bits.

er
o High-speed, efficient for large computers.
o Requires complex timing devices, rarely used between microcomputers.

nt
3. Direction of Transmission




Ce
Simplex: Data flows in one direction only. Example: Sensors sending data to a computer.
Half-Duplex: Data flows in both directions but one at a time. Example: Walkie-talkies.
ish
Full-Duplex: Data flows simultaneously in both directions. Example: Telephone conversations.

Data Communications Speed and Media


gl

Bandwidth Types
En

1. Narrowband: Slow-speed data communication, e.g., telegraph lines.


2. Voiceband: Moderate-speed, used in most telephone lines for microcomputer transmissions.
E

3. Broadband/Wideband: High-speed, large data transmission via media like microwave, satellite, coaxial, and
fiber optic cables.
M

Communications Media

 Twisted-Pair Cable:
o Two insulated wires twisted together to reduce interference.
o Advantages: Inexpensive, widely available.
o Disadvantages: Slow speed, prone to electrical noise, limited transmission distance.
 Coaxial Cable:
o Copper wire with shielding to protect against interference.
o Advantages: Higher bandwidth than twisted-pair, supports up to 10 Mbps.
o Disadvantages: More expensive, suitable for local networks.
 Fiber Optic Cable:
o Uses light pulses in glass fibers for data transmission.
o Advantages: Fast, low error rates, durable, immune to interference.
o Disadvantages: Fixed installations, low-power light sources, limited modulation methods.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 22


1st year CS - Chapter # 03
Wireless Transmission

 Microwave:
o High-frequency radio waves in line-of-sight paths.
o Advantages: High speed, cost-effective for short distances.
o Disadvantages: Needs clear line-of-sight, frequent relay stations.
 Satellite:
o Microwave signals relayed by orbiting satellites.
o Advantages: Overcomes curvature and obstacles, supports global data transmission.
o Disadvantages: High costs, dependent on ground stations.

Summary

Data communication technologies vary in speed, capacity, and range, with each type of media optimized for specific
use cases like local networks, long-distance communication, or global coverage. Fiber optics and satellite systems are
leading in advanced applications due to their reliability and efficiency.

er
Communications Hardware

nt
1. Modem (Modulator-Demodulator)


Ce
Converts digital signals to analog (modulation) for transmission over telephone lines and vice versa
(demodulation).
 Common modulation methods:
ish
o Amplitude Modulation (AM): Changes signal amplitude.
o Frequency Modulation (FM): Changes signal frequency.
 Key Factors When Choosing a Modem:
gl

1. External vs. Internal Modems: External modems are standalone, while internal modems are integrated into
the computer.
En

2. Transmission Speed: Expressed in kilobits per second (kbps), e.g., 56 kbps.


3. Data Compression: Reduces data size for faster transmission (e.g., V.90 standard).
4. Error Correction: Protocols detect and correct transmission errors.
E

2. Ethernet
M

 Common technology for connecting computers in a local area network (LAN).


 Key Features:
o Initially used coaxial cable; now uses twisted-pair or fiber optic cables.
o Collision detection mechanism: Carrier Sense Multiple Access/Collision Detection (CSMA/CD).
o Variants:
 10Base-5/10Base-2: Coaxial cable, 10 Mbps.
 10Base-T: Star topology, twisted-pair, 10 Mbps.

3. Fast Ethernet (100Base-T)

 Advanced version of Ethernet, achieving speeds up to 100 Mbps.


 Utilizes the same topology and media but requires different network interface cards.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 22


1st year CS - Chapter # 03
4. Token Ring

 IBM’s LAN technology, where an electronic token circulates around nodes in a ring topology.
 Key Features:
o Token indicates whether it’s free or carrying data.
o Sender captures the free token, attaches data and address, and transmits it.
o Recipient copies the message and resets the token.
o Operates at speeds of 4, 16, or 100 Mbps.
o More expensive than Ethernet networks.

Communications Protocol
Protocols are standardized rules that define how data are transmitted across networks, ensuring compatibility and
efficient communication among devices from different manufacturers.

Functions of Protocols

er
1. Specify how devices connect to a network.
2. Define data packaging and transmission methods.

nt
3. Outline acknowledgment mechanisms for transmitted data.
4. Detail error detection and handling procedures.

Protocol Converter Ce
ish
 A device enabling communication between systems using different protocols, such as asynchronous
microcomputers and synchronous IBM mainframes.
gl

Key Communication Protocols


En

1. SNA (System Network Architecture):


o Proprietary to IBM machines.
o Limited compatibility with non-IBM devices.
E

2. OSI (Open Systems Interconnection):


o Established by the International Standard Organization (ISO).
M

o Provides a universal framework for networking functions, irrespective of the manufacturer.


3. ISDN (Integrated Services Digital Network):
o Supports simultaneous voice, data, and video communication over telephone lines.
o Requires ISDN-compatible telephones and microcomputer boards for implementation.

The OSI Model


The OSI model by the ISO defines a seven-layer architecture for enabling open communication between different
vendor systems. Each layer has specific protocols and functions, ensuring seamless data transmission.

Layers of the OSI Model

1. Physical Layer
o Manages the electrical, mechanical, and functional transmission of raw bits.
o Examples: Cables, switches.
2. Data Link Layer
o Detects and corrects transmission errors.
o Ensures smooth communication between fast transmitters and slow receivers.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 22


1st year CS - Chapter # 03
3. Network Layer
o Handles data routing and addressing across networks.
o Supports communication between networks with differing protocols.
4. Transport Layer
o Manages end-to-end data delivery and error recovery.
o Controls multiple data streams on a single channel.
5. Session Layer
o Manages dialogs between computers, including file transfers and session checkpoints.
6. Presentation Layer
o Ensures compatibility by converting between data formats (e.g., ASCII, EBCDIC).
o Handles data encryption and compression.
7. Application Layer
o Provides user-specific functionalities like file transfer, remote access, and virtual terminals.

Communications Software
Communications software consists of programs that enable a host computer to manage the flow of data in a

er
communications network. These programs perform essential tasks to ensure smooth, secure, and efficient data
exchange.

nt
Key Functions of Communications Software

1. Data Sequencing Ce
o Splits long transmissions into smaller packets and frames.
ish
o Facilitates error control by limiting retransmission to specific packets in case of errors.
2. Data Routing
o Uses routing algorithms to find optimal paths between sources and destinations.
gl

o Adapts dynamically to network changes and traffic levels.


3. Flow Control
En

o Prevents fast senders from overwhelming slower receivers.


o Regulates data flow to avoid congestion and ensure resource sharing.
4. Error Control
o Detects and corrects errors in data transmission.
E

o Retransmits corrupted or lost data as needed.


M

5. Coordinating Multiple Use of Lines


o Manages shared communications channels using techniques like:
 Polling: Sequentially checks each terminal for data to send.
 Contention: Ensures terminals wait if another is transmitting.
6. Connection Establishment
o Sets up and verifies network connections between communicating stations.
7. Data Security
o Prevents unauthorized access to data.
o Ensures privacy, protecting against interception or tampering.
8. Log Information
o Records data communications activities and jobs.
o Used for tracking, billing, and resource management.

Communications software ensures reliable and secure data transmission, making it vital for modern network
operations.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 22


1st year CS - Chapter # 03

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. Rules acknowledged by members of organisations and industry are called
(a) laws (b) agreements (c) standards (d) communications
2. A mode of communications that allows information to travel in two directions but not simultaneously is called
(a) full-duplex (b) half-duplex (c) half-simplex (d) simplex
3. Transmission permitting data to move only one way at a time is called
(a) half-duplex (b) full-duplex (c) simplex (d) start/stop
4. A 9600 bits per second channel is the same as a

er
(a) 9.6 kps line (b) 9.6 kbps line (c) dual 4800×2 kbps line (d) 96 kbps line
5. Distortion in a signal is called

nt
(a) Phase (b) Noise (c) IP switch (d) Amplitude
6. Devices that send and receive satellite signals are called
(a) Modems (b) Tokens
Ce
(c) Servers (d) Earth stations
ish
7. The process of converting from analogue to digital is called
(a) Modulation (b) Line switching (c) Telecommuting (d) Demodulation
gl

8. The type of modulation that changes the height of the signal is called
En

(a) Frequency modulation (b) Phase modulation


(c) Amplitude modulation (d) Prephase modulation
E

9. Signals produced by a computer to be sent over phone lines must be converted to


M

(a) Modems (b) Analogue signals (c) Digital signals (d) Microwaves
10. AM stands for
(a) Amplitude modulation (b) Altitude modulation
(c) Angle modulation (d) None of these
11. FM stands for
(a) Frequent modulation (b) Functional module
(e) Frequency modification (d) Frequency modulation
12. A modem is used for communicating
(a) through telephone line (b) to telephone (c) to different computers (d) to a printer

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 22


1st year CS - Chapter # 03
13. One method used to modulate signals from analogue to digital or digital to analogue is called
(a) baud modulation (b) synchronous modulation
(c) asynchronous modulation (d) frequency modulation
14. The Token Ring network controls access to the network using
(a) facsimile (b) a bus technology (c) ISDN (d) token passing
15. Microwave transmission, coaxial cables, and fiber optics are examples of
(a) modems (b) routers (c) communication media (d) ring networks links
16. In a fiber optic cable the core is surrounded by a second layer of glass called
(a) yoke (b) cladding (c) outer-pipe (d) cap
17. A term used to describe the data-handling capacity of a given media is
(a) buffer (b) routing (c) bandwidth (d) cache

er
18. The most important de facto organisation involved in establishing communication standards and protocols is

nt
(a) CCITT (b) IEEE (c) ISO (d) ANSI
19. Which is the first satellite launched by Pakistan
(a) BADAR-I (b) Pakistan-I
Ce
(c) SUPARCO SAT (d) None of these
ish
gl
En

-: Answer Keys :-
1. c 6. d 11. d 16. b
E

2. b 7. d 12. a 17. c
M

3. a 8. c 13. d 18. a

4. b 9. b 14. d 19. a

5. b 10. a 15. c

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 22


1st year CS - Chapter # 03

Section (B / C)
3.1. Identify the basic elements of a communication system and the purpose of each.

Basic Elements of a Communication System

 Sender (Transmitter):
Generates and sends the message or data to be communicated.

 Message (Data):
The actual information, such as text, audio, or video, being transmitted.

 Medium (Transmission Channel):


The pathway (e.g., wired or wireless) through which the message travels from sender to receiver.

 Receiver:

er
The device or entity that receives and interprets the message.

nt
 Protocol:
A set of rules governing how the communication occurs, ensuring proper data transfer.

Ce
3.2. Differentiate between analogue and digital transmission of data. Give their relative advantages and
disadvantages.
ish

Aspect Analogue Transmission Digital Transmission


gl

Nature of Signal Continuous waveforms. Discrete binary signals (0s and 1s).
En

Susceptible to noise and distortion, reducing Less prone to noise, ensuring higher
Accuracy
accuracy. accuracy.
Bandwidth
Requires less bandwidth. Requires higher bandwidth.
E

Requirement
M

Equipment Cost Cheaper and simpler equipment. More expensive and complex equipment.
Supports advanced processing and error
Data Processing Limited capability for advanced processing.
correction.

Advantages and Disadvantages

Analogue Transmission:

 Advantages: Simpler technology, less expensive, suitable for audio/video signals.


 Disadvantages: Degrades over distance, harder to process, more prone to noise.

Digital Transmission:

 Advantages: High-quality, supports compression and encryption, reliable over long distances.
 Disadvantages: Requires more sophisticated equipment and higher bandwidth.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 22


1st year CS - Chapter # 03
3.3. Describe the asynchronous and synchronous modes of data transmission.

Asynchronous Data Transmission

Data is sent one character at a time with start and stop bits to indicate the beginning and end of transmission.

 Characteristics:
o Suitable for slow or irregular data transmission.
o No clock signal required.
o Example: Keyboard input.
 Advantages: Simple and cost-effective.
 Disadvantages: Slower due to extra bits (start/stop).

Synchronous Data Transmission

Data is sent in continuous streams with synchronization maintained by a shared clock signal.

er
 Characteristics:
o Suitable for high-speed data transfer.

nt
o Requires precise synchronization between sender and receiver.
o Example: Network communication.
 Advantages: Faster and more efficient for large data.
 Disadvantages: Complex and expensive to implement. Ce
ish
3.4. Differentiate between simplex, half-duplex, and full-duplex modes of data transmission.
gl

Simplex Half-Duplex Full-Duplex


En

Data flows in one direction Data flows in both directions, Data flows in both directions
only. but one direction at a time. simultaneously.
E

No return communication; Requires switching direction; Most efficient but needs advanced hardware
simplest and cheapest. slower than full-duplex. for simultaneous communication.
M

Examples: TV broadcast,
Example: Walkie-talkies. Example: Telephone communication.
keyboard to PC.

3.5. Which mode of data transmission is suitable for communication between a terminal and a
computer?

The half-duplex mode of data transmission is typically suitable for communication between a terminal and a
computer. This is because data can flow in both directions, but not at the same time, which is sufficient for tasks
like sending commands from the terminal and receiving responses from the computer. However, for modern
communication, full-duplex is more commonly used as it allows for simultaneous two-way communication

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 22


1st year CS - Chapter # 03
3.6. "A full-duplex line is faster since it avoids the delay that occurs in a half- duplex circuit". Explain
this statement.

The statement means that a full-duplex line allows data to flow in both directions simultaneously, without any
waiting time or delay. This eliminates the need for a device to stop transmitting while it waits for the other
device to respond, which is a limitation in half-duplex communication.

Explanation:

 Half-Duplex: Data can only flow in one direction at a time. If one device is sending data, the other device has
to wait before it can send its own data, causing a delay.

 Full-Duplex: Both devices can send and receive data at the same time. This parallel flow speeds up
communication because there is no waiting or switching between sending and receiving modes.

Therefore, full-duplex is faster as it avoids the interruptions and delays that occur when switching between send
and receive modes, typical of half-duplex systems.

er
3.7. What are half-duplex channels commonly used for?

nt
Half-duplex channels are commonly used for communication systems where data transmission occurs in both

1.
Ce
directions, but not simultaneously. Some common uses include:

Walkie-talkies: Users take turns speaking and listening.


ish
2. CB radios: Similar to walkie-talkies, only one person can speak at a time.
3. Two-way radios in vehicles: Communication between drivers and dispatch centers.
4. Older telephone systems: Early systems used half-duplex communication before switching to full-duplex.
gl

In these systems, communication is efficient when simultaneous two-way interaction is not necessary.
En

3.8. What are full-duplex channels commonly used for?


E

Full-duplex channels are commonly used in communication systems where simultaneous two-way data
transmission is required. Some common uses include:
M

1. Telephones: Both parties can talk and listen at the same time during a call.

2. Video conferencing: Allows both audio and video to be transmitted in real-time from both ends.

3. Internet connections (e.g., broadband): Data is sent and received simultaneously for faster browsing and
file transfers.

4. Cellular communication: Enables simultaneous voice and data transfer during mobile calls.

5. Network communication (e.g., Ethernet): Data can flow in both directions simultaneously for faster data
exchange.

Full-duplex communication is essential for systems requiring real-time, interactive, and uninterrupted exchanges
of information.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 12 of 22


1st year CS - Chapter # 03
3.9. Explain the term bandwidth.

Bandwidth

Bandwidth refers to the maximum amount of data that can be transmitted


over a communication channel or network in a given period of time, usually
measured in bits per second (bps) or higher units like kilobits per second
(kbps), megabits per second (Mbps), or gigabits per second (Gbps).

Key Points:

 Higher bandwidth allows for more data to be transmitted


simultaneously, resulting in faster speeds for activities like browsing,
streaming, and file transfers.
 Limited bandwidth can cause slower speeds and reduced performance,
especially with multiple users or large data transfers.
 It is a critical factor in network performance, especially for tasks

er
requiring high-speed internet, such as video conferencing or large-scale
downloads.

nt
In simple terms, bandwidth determines how much data can pass through a network in a given time frame.

Ce
3.10. Differentiate between narrowband, voiceband, and broadband.
ish
Frequency
Term Definition Use Case
Range
gl

Refers to low-speed transmission Used for low-speed communication like


Narrowband Below 3 kHz
En

channels. older telephone lines.

Refers to the frequency range used 300 Hz to 3 Primarily used for voice communication
Voiceband
for human speech. kHz over phone lines.
E
M

High-speed data transmission over a Used for internet connections, streaming,


Broadband Above 1 MHz
wide range of frequencies. and other high-speed data services.

3.11. What is a twisted-pair cable? In what situations are they suitable for use in data
communications?

Twisted-pair cable

Twisted-pair cable is a type of electrical cable consisting of


pairs of insulated copper wires that are twisted together to
reduce electromagnetic interference (EMI). There are two main
types: unshielded twisted pair (UTP) and shielded twisted
pair (STP).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 13 of 22


1st year CS - Chapter # 03
Suitability for Data Communications:

 Short to medium-range communication: Twisted-pair cables are commonly used for telephone lines,
local area networks (LANs), and some internet connections.
 Cost-effective: They are less expensive compared to other types of cables like fiber optic.
 Medium speed: Twisted-pair cables are suitable for moderate-speed data transmission (e.g., Ethernet
networks).

However, they are less ideal for long-distance and high-speed applications, where fiber optic cables would be
more appropriate.

3.12. What is a coaxial cable? Give some of its practical uses.

Coaxial Cable:

A coaxial cable is a type of electrical cable that


consists of a central conductor (usually made of

er
copper), an insulating layer, a metallic shield, and
an outer insulating layer. The central conductor

nt
carries the signal, while the metallic shield
reduces interference from external sources.

Practical Uses of Coaxial Cable: Ce


ish
1. Cable Television (TV): Commonly used to
transmit cable TV signals to homes and
businesses.
gl

2. Internet Connections: Used for broadband internet services, especially in areas where fiber optic is not yet
available.
En

3. Radio Frequency (RF) Signals: Used in applications like satellite communication, radio transmitters, and
antennas.
4. CCTV Systems: Often used for transmitting video signals in closed-circuit television systems.
E

Coaxial cables are preferred in applications where signal integrity is critical and interference needs to be
M

minimized.

3.13. How do coaxial cables differ from ordinary telephone cables?

Coaxial cables and ordinary telephone cables (typically twisted-pair cables) differ in several key aspects:

1. Structure:

 Coaxial Cable: Has a central conductor (usually copper), surrounded by an insulating layer, a metallic shield to reduce
interference, and an outer insulating layer.
 Telephone Cable (Twisted-pair): Consists of pairs of copper wires twisted together, usually without additional
shielding.

2. Signal Quality:

 Coaxial Cable: Provides better signal quality due to the shielding that reduces electromagnetic interference (EMI),
making it suitable for higher-frequency signals like cable TV and internet.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 14 of 22


1st year CS - Chapter # 03
 Telephone Cable: More prone to interference and has limited signal quality, mainly used for voice transmission
(voiceband).

3. Data Transmission Speed:

 Coaxial Cable: Supports higher data transmission rates, making it ideal for broadband internet and high-frequency
applications.
 Telephone Cable: Suitable for lower data transmission speeds, primarily used for voice communication and older
internet connections (DSL).

4. Usage:

 Coaxial Cable: Used for cable TV, internet connections, and satellite communication.
 Telephone Cable: Used for telephone lines and basic internet connections (DSL).

In summary, coaxial cables are more robust and suitable for high-speed, high-frequency applications, whereas
telephone cables are simpler and generally used for voice and low-speed data transmission.

er
3.14. What is a fiber optics? How is it used for data communications?

nt
Fiber optics

Fiber optics refers to the technology that uses glass or


plastic fibers to transmit data as light signals. These fibers
are thin strands that can carry vast amounts of data over
Ce
ish
long distances with minimal loss of signal quality.
gl

How Fiber Optics is Used for Data Communications:


En

1. High-Speed Data Transmission: Fiber optic


cables are used for high-speed internet connections,
supporting bandwidths much higher than traditional
copper cables like coaxial or twisted-pair.
E

2. Long-Distance Communication: Fiber optics can transmit data over much greater distances without signal
M

degradation, making it ideal for long-haul telecommunications and international data connections.
3. Minimal Interference: Because fiber optics transmit data using light, they are immune to electromagnetic
interference, which makes them suitable for environments with high electrical noise (e.g., industrial areas).
4. Secure Communication: Fiber optics are more difficult to tap into compared to other cables, providing
enhanced security for sensitive data transmission.

Common Uses:
 Internet Backbone: Used to connect cities, countries, and continents through high-speed networks.
 Telecommunications: Fiber optic cables are used for phone networks and cable TV.
 Data Centers: Within data centers, fiber optics are used to connect servers and networks for fast and efficient data
exchange.

In short, fiber optics is a fast, secure, and reliable medium for transmitting large amounts of data over long distances.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 15 of 22


1st year CS - Chapter # 03
3.15. What carries data over fiber optic cables and how is it produced?

Data over fiber optic cables is carried by light signals. These light signals are produced by lasers or light-
emitting diodes (LEDs) at the transmitting end, which convert electrical signals into light. The light travels
through the fiber core, reflecting off the inner walls due to total internal reflection, and is received at the other
end where it is converted back into electrical signals.

3.16. What are the advantages of fiber optics?

Advantages of Fiber Optics

The advantages of fiber optics include:

1. High-Speed Data Transmission: Capable of supporting very high data transfer rates, much faster than
traditional copper cables.
2. Long-Distance Communication: Can transmit data over long distances without significant loss of signal
quality.

er
3. Immunity to Electromagnetic Interference (EMI): Fiber optics are not affected by electrical interference,
ensuring more reliable communication.

nt
4. Greater Bandwidth: Supports much higher bandwidth, allowing for the transmission of large amounts of
data simultaneously.

Ce
5. Security: Difficult to tap into, providing enhanced data security compared to other transmission mediums.
6. Lightweight and Flexible: Fiber optic cables are thinner, lighter, and more flexible than copper cables,
making them easier to install and manage.
ish
3.17. Explain how microwave systems can be used for communication between two distant stations?
gl

Microwave systems
En

Microwave systems are used for communication between


distant stations by transmitting microwave signals through
the atmosphere. Here’s how they work:
E

1. Transmission: Microwave antennas at the transmitting


M

station send high-frequency microwave signals toward the


receiving station. These signals are typically in the range of
1 GHz to 100 GHz.
2. Line-of-Sight: The microwave signals travel in a straight
line (line-of-sight) between the two stations. This means the
antennas must be positioned with a clear, unobstructed path between them.
3. Relay Stations: For very long distances, microwave signals may be relayed through a series of relay stations.
These stations receive the microwave signals, amplify them, and retransmit them to the next station.
4. Reception: The receiving station’s antenna captures the microwave signals and converts them back into
electrical signals, which are then processed into usable data, such as voice, video, or internet data.

Key Features of Microwave Communication:

 High Data Rates: Suitable for transmitting large amounts of data quickly.
 Line-of-Sight Limitation: Requires clear visibility between stations, making it difficult to use in areas with obstacles like
mountains or tall buildings.
 Used for Point-to-Point Communication: Commonly used for telephone networks, television broadcast links, and
internet backbones.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 16 of 22


1st year CS - Chapter # 03
3.18. Why are microwave relay stations placed on top of tall buildings, towers, and mountains about
40-50 kilometres apart?

Microwave relay stations are placed on top of tall buildings, towers,


and mountains about 40-50 kilometers apart to ensure line-of-sight
communication. This distance is optimal for the following reasons:

1. Line-of-Sight Requirement: Microwave signals travel in a straight


line and require an unobstructed path between the transmitting and
receiving antennas. By placing relay stations on high ground, such
as tall buildings or mountains, the stations can "see" each other
over long distances without interference from obstacles.
2. Earth's Curvature: The Earth's curvature limits the distance that
microwave signals can travel. Elevating the stations ensures that the
microwave signals can cover distances of 40-50 kilometers without
the curvature of the Earth blocking the signal path.
3. Signal Strength and Clarity: By using elevated positions, the

er
microwave signals avoid interference from buildings, trees, or other
obstacles, leading to stronger, clearer signals with minimal

nt
degradation over the distance.

Ce
3.19. How are communications satellites used? What are the possible advantages of using satellites?

Communication satellites
ish
Communication satellites are used to facilitate long-distance
communication by transmitting signals between Earth-based
gl

stations via space. Here's how they work:


En

1. Transmission: Communication signals (such as


telephone, TV, internet data) are sent from a ground
station (called a uplink station) to the satellite in orbit.
2. Relay: The satellite receives the signal, amplifies it, and
E

retransmits it back to a downlink station on Earth. This


M

allows signals to travel over vast distances, such as across


continents or even around the world.
3. Coverage Area: Satellites can cover large geographical areas, including remote or isolated regions that are
difficult to reach with traditional terrestrial communication infrastructure.

Advantages of Using Satellites:

1. Global Coverage: Satellites provide worldwide communication coverage, enabling communication in


remote areas, ships at sea, and aircraft in flight, where terrestrial networks cannot reach.
2. Fast Deployment: Once launched, satellites can quickly establish communication links without needing
extensive ground infrastructure, making them ideal for emergency response and disaster recovery.
3. High Capacity: Communication satellites can handle large amounts of data transmission, making them
suitable for services like broadcasting, internet, and telephone communication.
4. Reliability: Satellite communication is less prone to physical disruptions (like weather-related issues)
compared to land-based systems, ensuring consistent performance in many cases.
5. No Physical Cables: Satellites eliminate the need for long-distance cables or wires, which reduces costs and
installation time, especially in geographically challenging areas.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 17 of 22


1st year CS - Chapter # 03
3.20. Identify several communications media that can be used over very long distances.

Several communication media can be used for transmitting data over very long distances. These include:

1. Fiber Optic Cables:


o Use light signals to transmit data at extremely high speeds and over long distances.
o Advantages: High bandwidth, immunity to electromagnetic interference, and very low signal loss.
2. Microwave Transmission:
o Uses high-frequency radio waves to transmit data between stations that are in line-of-sight.
o Advantages: High data rates and reliability over long distances, especially for point-to-point
communication.
3. Satellite Communication:
o Relays signals from ground stations to satellites, which retransmit them to other ground stations.
o Advantages: Provides global coverage, ideal for remote areas, and high-speed communication.
4. Coaxial Cables:
o Used for cable television and broadband internet.
o Advantages: Reliable and capable of supporting high data transfer speeds over long distances.

er
5. Radio Waves:
o Can be used for long-distance communication, especially for broadcasting and mobile phone networks.

nt
o Advantages: Wireless transmission, used for AM/FM radio, television, and mobile networks.
6. Microwave Relay Systems:

Ce
o Relays microwave signals through a series of relay stations.
o Advantages: Efficient for transmitting data over medium-to-long distances when fiber optics are not
available.
ish
Each medium has its specific advantages depending on the environment, cost, and requirements for speed and
reliability.
gl

3.21. What do you understand by modulation and demodulation?


En

Modulation:

Modulation is the process of altering a carrier signal (typically a sine wave) to encode information (such as
E

voice, video, or data) for transmission.


M

 Purpose: It allows the transmission of data over a


medium (such as air, cables, or fiber) by adjusting the
amplitude, frequency, or phase of the carrier signal.
 Types: Common types include Amplitude Modulation
(AM), Frequency Modulation (FM), and Phase
Modulation (PM).

Demodulation:

Demodulation is the reverse process of modulation. It


involves extracting the original information from the
modulated carrier signal at the receiving end.

 Purpose: It enables the receiver to retrieve the transmitted data by removing the carrier signal's modulation.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 18 of 22


1st year CS - Chapter # 03
Summary:

Modulation: Transmitter’s process to encode data onto a carrier.

Demodulation: Receiver’s process to decode the data from the modulated signal.

3.22. Why is modulation used in communications? Describe the two forms of modulation used in
communications.

Modulation is used in communications for several important reasons:

1. Signal Transmission over Long Distances: Modulation allows the transmission of signals over long
distances by adjusting a carrier wave's properties, making it suitable for radio waves, cables, or fiber optics.
2. Efficient Use of the Frequency Spectrum: Modulation enables multiple signals to share the same channel,
improving bandwidth utilization.
3. Overcoming Limitations of the Transmission Medium: It allows data to be sent over different types of
media (air, cables, etc.), especially those that cannot directly carry the original signal.

er
4. Improved Signal Strength and Quality: Modulation can improve the signal-to-noise ratio and avoid
interference from unwanted signals.

nt
Two Forms of Modulation:

1. Amplitude Modulation (AM): Ce


o Description: In AM, the amplitude (strength) of the carrier signal is varied in proportion to the
ish
information signal (such as sound or data) being transmitted.
o Use: Commonly used in AM radio broadcasting and analog TV.
o Example: An AM radio station broadcasts by modulating the amplitude of a carrier wave to carry sound.
gl

2. Frequency Modulation (FM):


En

o Description: In FM, the frequency of the carrier signal is varied according to the amplitude of the
information signal.
o Use: Widely used for high-fidelity radio broadcasting, like FM radio stations, and TV signals.
o Example: FM radio transmissions adjust the frequency of the carrier wave to encode sound information.
E
M

Both these modulation techniques are essential for ensuring that signals can be transmitted effectively and
efficiently across various communication mediums.

3.23. What are modems? What purpose do they serve in data communications?

Modems

Modems (short for Modulator-Demodulator) are devices used in data communications to enable digital data
transmission over analog communication channels, such as telephone lines.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 19 of 22


1st year CS - Chapter # 03
Purpose of Modems:

1. Modulation: A modem converts digital data (from a computer or digital device) into an analog signal (for
transmission over an analog medium like a telephone line). This is called modulation.
2. Demodulation: On the receiving end, the modem converts the incoming analog signal back into digital data
that the computer can process. This process is called demodulation.

Key Functions:

 Data Transmission: Modems allow data to be sent over long distances using telephone lines or other analog
transmission systems, which cannot directly carry digital data.
 Signal Conversion: They convert digital signals to analog signals for transmission, and analog signals back
into digital format upon reception, enabling data to travel between devices that operate on different types of
signals.
 Error Checking: Some modems also perform error checking and correction to ensure reliable data transfer.

Example:

er
 A dial-up modem connects a computer to the internet over a phone line by modulating the digital data into

nt
analog signals for transmission and demodulating it back at the receiving end.

Ce
3.24. Explain the need to set standards in communications networks

Setting standards in communication networks is crucial for several reasons:


ish
1. Interoperability: Standards ensure that different devices and systems from various manufacturers can
communicate and work together seamlessly. Without common protocols or formats, devices would not be
gl

able to exchange data or interact effectively.


2. Compatibility: Standards provide a common framework that ensures compatibility between different
En

network hardware, software, and protocols, which is essential for creating large-scale, diverse
communication networks like the internet.
3. Quality and Reliability: By defining acceptable levels of performance, data transmission protocols, and
error-handling techniques, standards help maintain the quality and reliability of communication networks.
E

This ensures smooth, consistent data exchange with minimal disruption.


M

4. Cost-Effectiveness: When standardized components and technologies are used, manufacturing and
procurement costs are lowered. It promotes competition, reduces vendor lock-in, and enables easier upgrades
or expansions.
5. Security and Safety: Standards often include guidelines for security measures, ensuring that communication
networks are protected against unauthorized access, data breaches, or other vulnerabilities.
6. Global Communication: Standards, such as those set by organizations like ISO, IEEE, or ITU, make it
possible for networks to be used globally. Without standardized protocols, international communication
would be highly fragmented and inefficient.

Examples of Standards in Communication Networks:


 TCP/IP: The standard protocol for data transmission on the internet.
 Wi-Fi: A standardized set of protocols for wireless local area networks (WLANs).
 Bluetooth: A standard for short-range wireless communication between devices.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 20 of 22


1st year CS - Chapter # 03
3.25. Describe the data link layer in the OSI model.

Data Link Layer

The Data Link Layer is the second layer in the OSI


(Open Systems Interconnection) model, positioned
above the Physical Layer and below the Network Layer.
Its primary function is to ensure reliable data transfer
between two directly connected devices in a network.

Functions of the Data Link Layer:

1. Framing:
o It divides the data received from the Network
Layer into manageable units called frames. Each
frame includes not only the data but also control
information like addressing and error

er
detection/correction.
2. Error Detection and Correction:

nt
o It detects errors that may have occurred during
transmission and may correct them using
methods like CRC (Cyclic Redundancy
Check). This ensures that data is transmitted
correctly without corruption.
Ce
ish
3. Flow Control:
o It manages the rate of data transmission between devices to prevent congestion. This is done through
mechanisms like windowing and acknowledgments.
gl

4. Addressing:
o It uses MAC (Media Access Control) addresses to identify devices on the same local network
En

segment. This allows proper routing of data to the intended device.


5. Access Control:
o It determines how devices access the shared communication medium. In networks with multiple devices
(like Ethernet or Wi-Fi), it ensures that devices do not interfere with each other’s transmissions using
E

methods like CSMA/CD (Carrier Sense Multiple Access with Collision Detection) for Ethernet.
M

6. Reliable Data Transfer:


o It guarantees that frames are delivered reliably between devices by using techniques like
acknowledgments and retransmissions in case of lost or corrupted data.

Sub-layers of the Data Link Layer:

1. Logical Link Control (LLC):


o Responsible for managing communication between the Data Link Layer and Network Layer. It handles
error correction, flow control, and frame synchronization.
2. Media Access Control (MAC):
o Responsible for controlling how devices on a network gain access to the transmission medium. It
handles the addressing and the channel access mechanisms.

Examples:

 Ethernet: Uses the MAC sublayer to provide unique addresses (MAC addresses) and manage access to the
communication medium.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 21 of 22


1st year CS - Chapter # 03
 Wi-Fi: A wireless communication protocol that also operates at the Data Link Layer, using MAC addresses
for device identification.

3.26. What kinds of tasks does communications software perform?

Communications software

Communications software manages and controls the flow of data over a network, ensuring that information is
transmitted correctly and efficiently between devices. The main tasks it performs include:

1. Data Formatting:
o It ensures that data is properly formatted and structured before transmission, converting it into a format
that can be understood by both the sender and the receiver.
2. Error Detection and Correction:
o Communications software checks for errors that may occur during data transmission and handles error
correction to ensure that the data is received accurately.
3. Data Compression:

er
o It compresses data to reduce the amount of bandwidth needed for transmission, improving the
efficiency of data transfer.

nt
4. Flow Control:
o It manages the rate at which data is sent to prevent network congestion or data loss by controlling the
speed of transmission.
5. Network Access: Ce
o The software manages how devices access the network, ensuring proper use of network resources and
ish
coordinating the sharing of the communication medium.
6. Protocol Management:
o It implements and manages communication protocols (such as TCP/IP, HTTP, etc.) to ensure that the
gl

devices can exchange data in a standardized manner.


7. Connection Establishment and Termination:
En

o Communications software is responsible for establishing and terminating connections between devices,
managing the communication session from start to finish.
8. Security:
o It may include encryption and other security measures to protect data during transmission, ensuring
E

privacy and preventing unauthorized access.


M

9. Addressing and Routing:


o It handles the addressing of data packets and ensures they are routed to the correct destination within
the network.

In short, communications software facilitates, controls, and secures the entire process of sending and receiving
data over a network.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 22 of 22


1st year CS - Chapter # 04

Class: 1st year

Chapter # 4

Applications and Use of Computers

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 8


1st year CS - Chapter # 04
Contents
Applications of Computer ......................................................................................................................................................... 3
Uses of Computers ..................................................................................................................................................................... 3
The Impact of Computers on People......................................................................................................................................... 4
The Impact of Computers on Organisation .............................................................................................................................. 5
Section (A).................................................................................................................................................................................. 6
-: Answer Keys :-................................................................................................................................................................ 6
Section (B / C) ............................................................................................................................................................................ 7

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 8


1st year CS - Chapter # 04
Applications of Computer
Computers have become integral to everyday life, playing a role in education, employment, productivity, innovation,
and entertainment. Their universal presence makes it essential to understand and use them effectively.

Key Aspects of Computer Literacy

1. Awareness: Understanding the significance, versatility, and impact of computers.


2. Knowledge: Learning technical terminology and concepts to better comprehend how computers function.
3. Interaction: Developing the ability to use computers for various applications, from word processing to
gaming.

Why Study Computers?

1. Learning:
o Computers are vital in various domains like banking, education, and defense.
o Essential for understanding and adapting to technological advancements.

er
o Colleges increasingly integrate computers into courses and learning systems.
2. Employment:

nt
o Familiarity with computers is a critical skill for competitiveness in the job market.
3. Productivity:

faster document creation.


4. Capability:
Ce
o Enhances efficiency in tasks like word processing, which allows error correction before printing and
ish
o Enables tasks like computer-simulated experiments in labs, offering safer and more resource-efficient
alternatives.
5. Fun:
gl

o Interactive experiences, from games to learning tools, make computers enjoyable to use.
En

Applications of Computers

 Education: Enhances learning through interactive courses and simulations.


 Business: Improves efficiency in data management, analysis, and communication.
E

 Science and Research: Assists in simulations, data modeling, and experimentation.


M

 Entertainment: Offers games, music, and video playback.

Uses of Computers
1. Information Management:
Computers manage vast amounts of data for tasks like reservation systems, student registration, billing
systems, and other administrative functions.
2. Personal Productivity:
Widely used for domestic and business applications such as word processing, spreadsheets, databases,
graphics, and communication software.
3. Science and Research:
Essential in experiments, design (CAD), DNA modeling, and simulations, aiding scientists and engineers in
innovative solutions.
4. Education:
Computers enhance learning through training simulators and computer-based education, accelerating and
improving the educational process.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 8


1st year CS - Chapter # 04
5. Entertainment:
Used for gaming, edutainment, and special effects in movies, making entertainment more interactive and
visually appealing.
6. Business and E-Commerce:
Computers streamline sales, inventory management, trading, and customer service, reducing costs and
increasing efficiency.
7. Health:
Applications in diagnostics (MRI, CT scans), disease research, patient monitoring, and maintaining health
records.
8. Agriculture:
Assist in farm management, crop planning, livestock tracking, and automated tasks like robotic sheep shearing.
9. Robotics:
Robots powered by computers perform hazardous, intricate, or repetitive tasks such as bomb disposal,
surveillance, and factory operations.

Conclusion:

er
Computers have penetrated nearly every aspect of life and will continue to expand their applications as technology
evolves.

nt
The Impact of Computers on People
Positive Implications: Ce
ish
1. New Job Opportunities:
Computers have created numerous jobs in fields like programming, operations, and system management, with
demand exceeding supply.
gl

2. Greater Job Satisfaction:


Computers handle repetitive tasks, allowing professionals to focus on creative and challenging aspects of their
En

work.
3. Use by Businesses:
Businesses use computers for efficiency, reducing costs, improving services, enhancing product quality, and
E

ensuring safety (e.g., automated tools, robotic systems).


4. Use by Public Organizations:
M

Computers improve efficiency in government, education, and healthcare, providing better services like benefits
processing, educational tools, and medical test management.
5. Use in Homes:
Personal computers are used for education, entertainment, financial tasks, and numerous creative applications.

Potential Problems:

1. Unemployment:
Automation, such as robots, may displace workers in industries like manufacturing.
2. Questionable Data Practices:
Errors or unauthorized data collection can lead to inaccurate records or misuse of personal information.
3. Depersonalization:
Identification by numerical codes (e.g., NIC, credit card numbers) may feel impersonal to individuals.
4. Security Issues:
Poor data security may lead to accidental or intentional disclosure of confidential information.
5. Privacy Concerns:
Unregulated data storage and sharing can violate individuals' privacy, exposing sensitive information without
consent.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 8


1st year CS - Chapter # 04
The Impact of Computers on Organisation
Positive Implications:

1. Better Planning and Decision-Making:


Computers support quicker and broader information access, helping managers in planning, problem-solving,
and evaluating alternatives. Multinational organizations benefit from systems that link global units.
2. Better Control of Resources:
Computers enhance resource control by tracking performance against plans, automating inventory
management, and issuing alerts when action is required.
3. Greater Efficiency of Operations:
Organizations achieve operational efficiencies through automated processes, such as electronic fund transfers
in banking, computerized checkout systems in retail, and energy-efficient building management systems.
Efficiency enables competitiveness in global markets.

Potential Problems:

er
1. Complex System Design:
Designing new systems can be challenging and may lead to poor results or damage the organization's public

nt
image if done improperly.
2. System Security Threats:

computers integrate into larger networks.


3. Impact on Organizational Structure:
Ce
Weak security can result in theft, espionage, and unauthorized access to sensitive data, especially as personal
ish
Introducing new systems can alter workgroups and departments, causing resistance and stress among
employees.
4. Access Inequality:
gl

Organizations with fewer computing resources may struggle to compete with those having advanced systems.
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 8


1st year CS - Chapter # 04

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. A spreadsheet program is a type of
(a) system software (b) programming language
(c) application software (d) printer software
2. Which of the following can most likely be operated on batteries?
(a) laptop (b) portable (c) desktop (d) floor model
3. The most common microcomputer size is the
(a) laptop (b) portable (c) desktop (d) floor model

er
4. What type of computer has been traditionally used by individual scientists and engineers as a tool for
drafting, design, and map-making?

nt
(a) microcomputers (b) minicomputers
(c) mainframes
Ce
(d) supercomputers
ish

-: Answer Keys :-
gl

1. c
En

2. a

3. c
E

4. b
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 8


1st year CS - Chapter # 04

Section (B / C)
4.1. Give a specific example of how computers are used in education.

Computers are widely used in education for e-learning platforms. For example, platforms like Google
Classroom allow teachers to assign homework, share resources, and conduct virtual classes, while students can
submit assignments and access study materials from anywhere. This fosters interactive and flexible learning.

4.2. Why do employers need workers who are familiar with computers?

Employers need workers familiar with computers because most jobs require the use of software tools for tasks
like data entry, communication, and project management. Additionally, computer skills improve efficiency,
adaptability to technology changes, and the ability to work in digital environments.

4.3. What common application of computers allows you to produce documents such as letters and
reports?

er
The common application of computers for producing documents such as letters and reports is word processing

nt
software, like Microsoft Word or Google Docs. These tools allow users to create, edit, format, and print
professional documents easily.

Ce
4.4. The computer has had far-reaching effects on our lives. How has the computer affected your life?
ish
The computer has had a significant impact on my life by enhancing learning, improving communication, and
increasing productivity. It has made accessing information easier, allowed me to complete academic work
efficiently, and provided tools for developing skills like programming and problem-solving.
gl

4.5. Discuss four ways that individuals may benefit from computer usage.
En

Here are four ways individuals may benefit from computer usage:

1. Improved Productivity: Computers allow for faster completion of tasks such as writing, data analysis, and
E

organizing information, increasing overall productivity.


M

2. Access to Information: The internet and various software applications enable individuals to access a vast
amount of information for research, learning, and staying updated with current events.
3. Enhanced Communication: Computers enable instant communication through email, video calls, and
social media, making it easier to stay connected with others.
4. Entertainment and Leisure: Computers provide access to a wide range of entertainment options like
online gaming, streaming movies, music, and social networking, enhancing personal enjoyment.

4.6. Identify four ways in which computer usage may have negative effects on people.

Here are four ways in which computer usage may have negative effects on people:

1. Health Issues: Prolonged use of computers can lead to eye strain, headaches, back pain, and repetitive
strain injuries such as carpal tunnel syndrome.
2. Social Isolation: Excessive computer use, particularly for gaming or online activities, can result in reduced
face-to-face social interactions, leading to loneliness or isolation.
3. Addiction: Overuse of computers, especially for activities like gaming or social media, can lead to
addiction, affecting productivity and personal relationships.
4. Privacy Concerns: Using computers for online activities increases the risk of identity theft, cyberbullying,
and privacy violations due to inadequate security measures or sharing personal information.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 8
1st year CS - Chapter # 04
4.7. Identify two ways that organisations may benefit from computer usage.

1. Increased Efficiency: Computers help organizations automate routine tasks, manage data, and streamline
operations, which increases productivity and reduces errors.

2. Improved Communication: Computers enable faster communication through emails, video conferencing,
and collaboration tools, enhancing teamwork and decision-making within organizations.

4.8. Discuss two challenges that computer-using organisations may face.

1. Cybersecurity Risks: Organizations face the constant threat of cyberattacks, data breaches, and hacking
attempts, which can compromise sensitive information and disrupt operations.

2. Technology Dependence: Over-reliance on computers and technology can lead to issues if systems fail,
whether due to hardware malfunctions, software bugs, or power outages, which can cause significant
disruptions.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 8


1st year CS - Chapter # 05

Class: 1st year

Chapter # 5

Computer Architecture

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 21


1st year CS - Chapter # 05
Contents
Computer Architecture ............................................................................................................................................................... 3
Components of a Digital Computer ............................................................................................................................................. 3
Addressing of Memory Locations................................................................................................................................................ 4
Computer Registers .................................................................................................................................................................... 5
Types of Registers and Their Functions:........................................................................................................................... 5
Minimum Number of Registers for a Basic Computer: .................................................................................................... 5
Register Sizes: .................................................................................................................................................................... 6
Buses........................................................................................................................................................................................... 6
Bus Interconnection Scheme (Fig. 5.4) .............................................................................................................................. 6
Instructions ................................................................................................................................................................................. 7
Stack Organized CPU ................................................................................................................................................................... 8

er
Stack Organized CPU ........................................................................................................................................................ 8
Push and Pop Operations .................................................................................................................................................. 8

nt
Reverse Polish Notation (RPN) or Postfix Notation .......................................................................................................... 8

Ce
Steps to Evaluate Postfix Expressions: .............................................................................................................................. 8
Converting Infix to Postfix ................................................................................................................................................ 9
Examples: ........................................................................................................................................................................... 9
ish
Internal Working of CPU ............................................................................................................................................................. 9
Basic Features of the CPU (Assumed Example) ............................................................................................................... 9
gl

Execution of an Instruction ............................................................................................................................................... 9


En

Error Handling ................................................................................................................................................................ 10


Summary of the CPU Operation: .................................................................................................................................... 10
Fetching of an Instruction ......................................................................................................................................................... 10
E

Registers Involved in Fetching: ....................................................................................................................................... 10


M

Fetching Process: ............................................................................................................................................................. 11


Example: .......................................................................................................................................................................... 11
Execution of an Instruction ....................................................................................................................................................... 11
Structure of an Instruction (16-bit Computer): .............................................................................................................. 11
Steps in Execution: ........................................................................................................................................................... 11
Summary of Execution: ................................................................................................................................................... 12
Section (A)................................................................................................................................................................................ 13
-: Answer Keys :-.............................................................................................................................................................. 13
Section (B / C) .......................................................................................................................................................................... 14

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 21


1st year CS - Chapter # 05
Computer Architecture
In computer hardware, three terms—computer organization, computer design, and computer architecture—are
often used, each focusing on a different aspect of a computer system.

1. Computer Organization:
o Focuses on how the hardware components operate and are connected to form a functioning computer
system.
o Ensures that the components interact correctly according to the system's design.
2. Computer Design:
o Involves the creation of the computer hardware based on formulated specifications.
o Addresses decisions about which hardware to use and how to connect the components, often referred to
as computer implementation.
3. Computer Architecture:
o Concerned with how the computer system is structured and perceived by the user.
o Involves defining the instruction set, memory addressing techniques, and information formats.
o Deals with the architectural design and the functional modules, such as processors and memories, and

er
their integration into a cohesive system.

nt
In summary, while computer organization looks at the operation and connections of hardware, computer design is
about creating the hardware, and computer architecture defines how the system works from the user's perspective,
including how different components interact and function.

Components of a Digital Computer


Ce
ish
A digital computer consists of four main units:
gl

1. Input Unit:
o The input unit serves as an interface between the user and the computer system, allowing the input of
En

data and instructions. Common input devices include keyboards, mice, and audio or graphical input
devices. The data is converted into binary form by the input device before being sent to the CPU for
processing.
E

2. Output Unit:
o Similar to the input unit, the output unit provides an interface for displaying or outputting data from the
M

computer to the user. It receives binary data from the CPU and converts it into a form that the user can
understand, such as text, graphics, or sound. Common output devices include monitors and printers.
3. Central Processing Unit (CPU):
o The CPU is the brain of the computer, responsible for executing instructions and processing data. It
consists of:
 Arithmetic/Logic Unit (ALU): Performs mathematical and logical operations.
 Control Unit (CU): Manages and directs the operation of the entire computer.
 Registers: Small, fast storage locations within the CPU for temporary data.
 Buses: A network of lines for transferring data between components.
o The CPU works in close collaboration with the memory unit to execute tasks.
4. Memory Unit:
o The memory unit, also known as main memory, holds:
 Programs and data for processing.
 Intermediate results of operations.
 Final output before it is sent to output devices or storage.
o Memory is divided into locations, each with a unique address. The data in these locations can either be
instructions or actual data being processed. The content of memory changes constantly as new data is
processed and stored.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 21


1st year CS - Chapter # 05
Additionally, an I/O module (Input/Output module) transfers data between external devices, the CPU, and memory.
This module temporarily holds data in buffers before it is transferred.

Addressing of Memory Locations


In a computer system, memory plays a crucial role in storing and retrieving data or instructions. To ensure the system
can access and manage the information correctly, each memory location is assigned a unique address.

Memory Locations and Addressing

 Memory in a computer is divided into small compartments called memory locations or cells, each capable of
holding a data item or an instruction.
 Each memory location is assigned a unique address (a number), allowing the system to locate and retrieve the
stored data or instructions.
 For example, if a computer has 64 K words of memory (where K = 1024), it will have 65,536 memory
locations, with addresses ranging from 0 to 65,535.

er
Analogy of Memory Addressing:

nt
To explain how memory addressing works, consider the analogy of a multi-storey building with 100 apartments:


Ce
The postman (representing the input unit) delivers letters to the appropriate pigeonholes (representing
memory locations), each marked with an apartment number.
Each apartment is associated with a unique number, like a memory address.
ish
 The postman delivers the letters to the appropriate location and retrieves them when needed. Similarly, the
control unit of the CPU accesses the required memory locations to retrieve instructions or data.
gl

Function of Control Unit:


En

The control unit (CU) is responsible for:

1. Fetching instructions from memory by specifying the memory location's address.


2. Retrieving data and transferring it to other parts of the computer for further processing.
E
M

Although the order in which data is stored in memory doesn't matter, instructions are typically stored in serial order
to maintain a sequence for execution. After each instruction is executed, the computer retrieves the next one from the
subsequent memory address until the final instruction is reached (which tells the computer to stop).

Example of Memory Layout:

The figure below illustrates a small portion of memory with addresses ranging from 2000 to 2055:

| Address | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | ... | 2055 |
|---------|------|------|------|------|------|------|------|------|-----|------|
| Data | | | | | | | | | ... | |
| | | | | | | | | | | |
| 2027 | June | | | | | | | | | |
| 2036 | 2003 | | | | | | | | | |
| 2040-47 | Instructions (program) | ... |

 Location 2027 contains the non-numeric data "June" in binary form.


 Location 2036 contains the numeric data "2003" in binary form.
 Locations 2040 to 2047 contain program instructions stored sequentially.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 21


1st year CS - Chapter # 05
The control unit fetches data from memory by knowing the exact address of the data or instruction. This organization
ensures that data can be efficiently retrieved and processed by the computer.

Computer Registers
Registers are temporary storage devices within the CPU that hold data, instructions, or addresses while they are being
processed. Unlike memory, which uses addresses to access data, registers are directly manipulated by the control unit
during instruction execution.

Types of Registers and Their Functions:

1. General-Purpose Registers:
o Used for temporarily storing data.
o Can be programmed for various operations by the user.
o Can be combined into register pairs to handle larger data.
2. Accumulator (AC):
o Stores data and the result of arithmetic or logical operations.

er
o It is the main register for performing arithmetic and logic tasks.
3. Status Register (Flag Register):

nt
o Holds flags indicating conditions during operations.
o Common flags include:
 Carry: Overflow occurs.
 Zero: Result is zero.
 Sign: Result is positive or negative.
Ce
ish
 Parity: Indicates odd/even number of 1s in the result.
4. Memory Buffer Register (MBR) (Memory Data Register - MDR):
o Holds data being read from or written to memory.
gl

o Acts as a temporary buffer during memory operations.


5. Memory Address Register (MAR):
En

o Holds the address of the memory location being accessed (either read or write).
6. Instruction Register (IR):
o Holds the current instruction being executed by the CPU.
E

7. Program Counter (PC):


o Points to the address of the next instruction to be executed.
M

o Increments after each instruction to point to the next one in the sequence.
8. Stack Pointer (SP):
o Points to the top of the stack (used for temporary data storage during program execution).

Minimum Number of Registers for a Basic Computer:

To carry out basic operations, the following registers are necessary:

1. MBR (Memory Buffer Register): Holds data being transferred to/from memory.
2. IR (Instruction Register): Holds the current instruction being executed.
3. MAR (Memory Address Register): Holds memory addresses for read/write operations.
4. Temporary Register (TR): Holds temporary data during processing.
5. Accumulator (AC): Used for performing arithmetic and logic operations.
6. Program Counter (PC): Holds the address of the next instruction.
7. Input Register (INPR): Holds data received from input devices (like a keyboard).
8. Output Register (OUTR): Holds data to be sent to output devices (like a monitor).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 21


1st year CS - Chapter # 05
Register Sizes:

 Word Size: The word size (number of bits) determines the size of registers. For example, in a 16-bit
computer, each word consists of 16 bits.
 Memory Size: If a computer has 4K words (i.e., 4096 words), 12 bits are required for addressing because
2^12 = 4096.
 Specific Register Sizes:
o AC, MBR, IR, TR: 16 bits each (to hold 16-bit data).
o MAR, PC: 12 bits each (to address 4096 memory locations).
o INPR, OUTR: 8 bits each (to transfer data 8 bits at a time).

Buses
In microcomputers, a bus is a communication pathway that connects various components such as the CPU, memory,
and input/output devices. The bus facilitates the transfer of data, addresses, and control signals. There are three main
types of buses: address bus, data bus, and control bus.

er
1. Address Bus:

nt
 Purpose: The address bus is used by the microprocessor to specify the memory location it wants to access (for
reading or writing data).

Ce
Operation: When the microprocessor wants to access a specific memory location (e.g., address 2012), it sends
the address in binary form through the address bus. All devices connected to the system receive this address,
but only the device at that specific address will respond.
ish
 Direction: The address bus is unidirectional, meaning that data flows in one direction—from the
microprocessor to other components (memory, I/O devices).
gl

2. Data Bus:
En

 Purpose: The data bus is used for transferring actual data between the CPU, memory, and I/O devices.
 Operation: The data bus is bi-directional, meaning data can flow both ways. For example, data can be sent
from memory to the CPU for processing or from the CPU to memory for storage. It also allows communication
E

between the CPU and I/O devices (like keyboards or printers).


M

3. Control Bus:

 Purpose: The control bus is responsible for managing and coordinating the activities of the CPU, memory, and
I/O devices by sending control signals.
 Operation: It signals when reading or writing operations should occur, ensuring that each device performs the
correct task at the correct time. For instance, when an I/O device finishes an operation (like printing a
character), the control bus informs the CPU that the task is complete, and the CPU can initiate the next action,
such as sending another character to be printed.

Bus Interconnection Scheme (Fig. 5.4)

The figure shows how the three buses are interconnected in a microcomputer system:

 CPU: The central processing unit where computations and control tasks are carried out.
 Memory: The memory unit where data and instructions are stored.
 I/O Devices: Input/output devices that interact with the user or other systems.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 21


1st year CS - Chapter # 05
Instructions
An instruction is a command that tells a computer to perform a specific operation, such as reading or writing data,
performing arithmetic operations, or comparing data. Instructions are stored in the computer's main memory as a
sequence of bits (binary digits), and they can only be executed from main memory.

Components of a Computer Instruction

A machine-level instruction typically consists of the following parts:

1. Opcode (Operation Code): This part specifies the operation to be performed (e.g., addition, subtraction, etc.).
The opcode is essential to define the action the computer will take. The number of bits in the opcode
determines the number of distinct operations that can be performed (e.g., 4 bits allow for 16 operations).
2. Address Field: This part contains the address or addresses where the operand (data to be processed) is located.
It specifies where to find the data for the operation or where to store the result.

Instruction Formats

er
Instruction formats define how the instruction is structured and how many bits are allocated to different parts. The

nt
types of instruction formats include:

1. Three-Address Instruction:
o Components:
 Opcode: Defines the operation.
Ce
ish
 Address 1: Address of the first operand.
 Address 2: Address of the second operand.
 Address of Destination: Address where the result is stored.
gl

o Example: ADD A, B, C means adding the values at addresses A and B, and storing the result in
address C.
En

o Disadvantages:
 Execution is slower due to the need to access three memory addresses.
 Increased memory usage because each instruction requires more space.
 More complex interfacing between CPU and memory.
E

2. Two-Address Instruction:
M

o Components:
 Opcode: Defines the operation.
 Address 1: Address of one operand.
 Address 2: Address of the destination where the result is stored.
o Improvement: Reduces the complexity of three-address instructions by having one operand stored in a
register (e.g., Accumulator).
3. One-Address Instruction:
o Components:
 Opcode: Defines the operation.
 Address 1: Address of one operand.
o Improvement: One operand is assumed to be in the Accumulator, simplifying the instruction format.
The results are stored back in the Accumulator.
o Advantages: More space for the opcode and operands, allowing a larger instruction set and greater
memory addressing capability.
4. Zero-Address Instruction (Stack Instructions):
o Components: Only the Opcode. The operands and destination are implied, often using a stack.
o Example: An instruction like CLEAR might imply clearing the Accumulator, without explicitly
specifying the operand or destination.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 21


1st year CS - Chapter # 05
Each instruction format optimizes the balance between the number of addresses and the complexity of the operations
the computer can perform. More addresses in an instruction can lead to more complex operations, but can also slow
down execution or increase memory consumption.

Stack Organized CPU


Stack Organized CPU

A stack is a storage structure where elements are added or removed in a specific order, referred to as Last In, First
Out (LIFO). The most recently added element is the first one to be removed. A common analogy is a stack of plates:
the last plate placed on top is the first one you take off.

Stacks are used in CPUs to manage data during operations like arithmetic, program execution, and function calls. The
stack is typically implemented with a Stack Pointer (SP), which holds the memory address of the topmost element of
the stack.

er
Push and Pop Operations

nt
1. Push: This operation involves adding an element to the stack. The Stack Pointer (SP) is incremented, and the
element is stored at the new address.

Ce
2. Pop: This operation involves removing the top element of the stack. The element is removed, and the Stack
Pointer (SP) is decremented to point to the next item.

The stack has limited capacity, so there are checks for overflow (when the stack is full) and underflow (when the stack
ish
is empty).

Reverse Polish Notation (RPN) or Postfix Notation


gl

In infix notation, operators are placed between operands (e.g., A + B), requiring parentheses or precedence rules for
En

clarity. Polish notation (prefix) places the operator before the operands (e.g., + A B), while Reverse Polish notation
(RPN) (postfix) places the operator after the operands (e.g., A B +). RPN eliminates the need for parentheses.
E

Steps to Evaluate Postfix Expressions:


M

1. Convert infix to postfix.


2. Push operands onto the stack as they appear.
3. When an operator appears, pop the top two operands, perform the operation, and push the result back onto
the stack.
4. Continue until only the final result remains in the stack.

Example: Evaluate Postfix 4 3 1 / 5 +

1. Push 4, then push 3.


2. Encounter /: Pop 4 and 3, divide 4 / 3 = 1.33, push 1.33.
3. Push 1.
4. Encounter +: Pop 1.33 and 1, add 1.33 + 1 = 2.33, push 2.33.
5. Push 5.
6. Encounter +: Pop 2.33 and 5, add 2.33 + 5 = 7.33.

Final result in the stack: 7.33.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 21


1st year CS - Chapter # 05
Converting Infix to Postfix

To convert an infix expression to postfix, consider operator precedence and parentheses:

 Parentheses are handled first.


 Operators are placed in the order they are evaluated, considering precedence (multiplication and division
before addition and subtraction).

Example 1: Convert (x + y) * [z * (w + v) + s] to postfix:

1. Start with x + y inside parentheses: xy+.


2. w + v inside inner parentheses: wv+.
3. Multiply z by wv+: wv+z*.
4. Add s to the result: wv+z*s+.
5. Multiply the result by x + y: xy+wv+z*s+*.

Thus, the postfix expression is xy+wv+z*s+*.

er
Examples:

nt
1. Infix: A * B + C * D * E * F
o Postfix: AB*CD*EF*++

2. Infix: A * B + A * (B * D + C * E)
Ce
ish
o Postfix: BD*CE*+A*AB*+

3. Infix: A + B * C * D + E * (F + G)
gl

o Postfix: FG+E*CD*+B*A+
En

4. Infix: A * [B + C * (D + E)] * F * (G + H)
o Postfix: E+C*B+A*GH+F*/
E

Internal Working of CPU


M

The Central Processing Unit (CPU) is the core component of a computer that manages data processing and controls
the operation of other units in the system. The CPU fetches, decodes, and executes instructions to perform tasks.

Basic Features of the CPU (Assumed Example)

 16-bit computer word: This is the basic unit of data handled by the CPU.
 One-address instructions: The CPU uses instructions that specify one address for the operand.
 Memory size of 4K words: The CPU can access 4096 memory locations (4×1024).
 Instruction word structure: The instruction is split into:
o Opcode: 4 bits, indicating the operation to be performed.
o Address field: 12 bits, providing the memory address of the operand.

Execution of an Instruction

The CPU executes instructions through a process called the instruction cycle, which consists of two main stages:
1. Fetch Cycle
2. Execute Cycle

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 21


1st year CS - Chapter # 05
1. Fetch Cycle

 This is the phase where the CPU retrieves an instruction from memory. The CPU uses the control unit to
manage this process.
 The fetch cycle involves the following:
o The instruction is fetched from memory and loaded into a register (the Instruction Register).
o This process occurs in a set time, and the instruction is ready for decoding and execution.
 Steps:
o Check if there are instructions to execute. If yes, fetch the instruction; otherwise, stop.
o The instruction is transferred from memory to the register.
o After fetching, control is passed to the execute cycle.

2. Execute Cycle

 The execute cycle is when the CPU decodes and performs the action specified by the fetched instruction.
 The Arithmetic/Logic Unit (ALU) decodes and executes the instruction based on the opcode.
 Steps:

er
o The fetched instruction is decoded.
o The ALU performs the operation (such as addition, subtraction, logical operations, etc.).

nt
o The result is then stored back in a register or memory as required.
 After the instruction is executed, the CPU returns to the fetch stage for the next instruction, completing the
instruction cycle.

Error Handling
Ce
ish
While executing, if any errors occur, the CPU will transfer control to the error handler to address the issue. This
ensures the system can handle malfunctions or unexpected conditions efficiently.
gl

Summary of the CPU Operation:


En

 Fetch: Retrieves the instruction from memory.


 Execute: Decodes and executes the instruction using the ALU.
 Cycle: Repeats for each instruction, ensuring the CPU continues processing tasks.
E
M

This cyclical process allows the CPU to perform a wide range of operations and execute a program, making it the
central element of any computer system.

Fetching of an Instruction
The fetching of an instruction involves transferring the instruction stored in a memory location to the Instruction
Register (IR) for decoding and execution. This process is managed by the Control Unit and uses multiple registers
for efficient data transfer.

Registers Involved in Fetching:

1. Instruction Register (IR): Temporarily holds the fetched instruction for decoding.
2. Memory Buffer Register (MBR): Acts as an intermediary, temporarily storing instructions or data from
memory.
3. Program Counter (PC): Holds the address of the next instruction to be fetched.
4. Memory Address Register (MAR): Contains the memory address from which the current instruction is
fetched.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 21


1st year CS - Chapter # 05
Fetching Process:

1. Initialize the Program Counter (PC):


o The Program Counter (PC) is initialized with the address of the first instruction (e.g., 0000).
2. Transfer Address to MAR:
o The control unit transfers the address from the PC to the Memory Address Register (MAR).
3. Increment the PC:
o The PC is incremented by 1 to point to the address of the next instruction.
4. Read Memory:
o The memory location specified by the MAR is accessed, and the instruction stored at that address is
transferred to the Memory Buffer Register (MBR).
5. Transfer to Instruction Register (IR):
o The instruction in the MBR is transferred to the Instruction Register (IR) under the control of the
Control Unit.
6. Repeat:
o The process is repeated for the next instruction, with the PC providing the updated address.

er
Example:

nt
For a program stored in memory locations 0000 to 0008:

1. First instruction at location 0000:


Ce
o PC holds 0000 → MAR receives 0000 → Memory passes instruction at 0000 to MBR → MBR
transfers instruction to IR → PC increments to 0001.
ish
2. Next instruction at location 0001:
o Repeat the process with the new address in PC.
gl

Execution of an Instruction
En

The execution of an instruction involves carrying out the operation specified by the instruction and delivering the
desired result. This process follows the fetch cycle and is managed by the Control Unit (CU), which coordinates the
flow of data and commands across the CPU.
E

Structure of an Instruction (16-bit Computer):


M

1. Operation Code (Opcode): 4 bits specify the operation to be performed (e.g., addition, subtraction).
2. Address of Operand: 12 bits specify the memory location of the operand (data).

Steps in Execution:

1. Decode the Opcode:


o The Opcode part of the instruction in the Instruction Register (IR) is sent to the Control Unit.
o The Control Unit decodes the Opcode using a decoder.
o Based on the decoded operation, the Control Unit issues necessary control signals to various CPU units.
2. Fetch Operand Address:
o The address part of the instruction in the IR is transferred to a decoder, which interprets it as a
memory location.
o This address is transmitted to the Memory Address Register (MAR) and forwarded to main memory.
3. Fetch Operand:
o Under the Control Unit's instructions, the operand stored at the memory location is fetched and moved
to the Memory Buffer Register (MBR).
o The MBR transfers the operand to the Arithmetic/Logic Unit (ALU).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 21


1st year CS - Chapter # 05
4. Perform Operation in ALU:
o The operand is passed to the Accumulator in the ALU, where the necessary operation is performed.
o If another operand is required, it is already present in the Accumulator.
o The result of the operation is stored back in the Accumulator.
5. Store Result (if required):
o If the result needs to be stored, it is transferred from the Accumulator to a specified memory location or
output device as per the instruction.

Summary of Execution:

 Decode the instruction and issue control signals.


 Fetch operand from memory.
 Perform operation in ALU (using the Accumulator).
 Store or output the result.

This completes the execution cycle, forming the second stage of the instruction cycle.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 12 of 21


1st year CS - Chapter # 05

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. A CPU contains
(a) input unit (b) output unit (c) memory unit (d) arithmetic/logic unit
2. Main memory unit of a computer
(a) stores bulk of data and instructions. (b) stores a small amount of data and instructions
(c) performs arithmetic (d) supervises the working of all the other units
3. A location inside CPU where it can hold data temporarily while it carries out arithmetic and logical
operations is called a
(a) RAM (b) cache (c) buffer (d) register

er
4. A computer instruction is decoded by

nt
(a) MBR (b) Decoder (c) Accumulator (d) MAR

(a) 18 K (b) 16 K (c) 256 K


Ce
5. A one-address computer has a word size of 24 bits and can execute 55 instructions. The number of different
memory locations that can be addressed directly by the address portion of the instruction word are
(d) 512 K
ish
6. In a 4K, 16 bits per word machine, the length of the Memory Address Register is
gl

(a) 4 bits (b) 8 bits (c) 12 bits (d) 16 bits


7. A computer has 16 bits per word, the size of Memory Buffer Register must be
En

(a) 8 bits (b) 16 bits (c) 32 bits (d) 64 bits


8. The size of Instruction Register is always equal to the size of
E

(a) Program Counter (b) Memory Address Register


M

(c) Memory Buffer Register (d) None of these


9. The number of trips made to main memory to execute an addition instruction with a three-address
instruction are
(a) 1 (b) 2 (c) 3 (d) 4
10. The number of instructions executed by a computer depends upon the size of
(a) Opcode (b) Decoder (c) MBR (d) MAR
11. A stack is served on the principle of
(a) FILE (b) FILO (c) LIFO (d) FIFO

-: Answer Keys :-
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

d b d b b c b d c a c

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 13 of 21


1st year CS - Chapter # 05

Section (B / C)
5.1. What is meant by the term computer architecture?

Computer Architecture

Computer Architecture refers to the design and organization of a computer's components and systems. It
includes the structure, functions, and implementation of hardware, software, and communication protocols to
ensure efficient data processing and storage.

5.2. List main units of a computer. Describe the functions of each unit.

Main Units of a Computer and Their Functions:

1. Input Unit
o Function: Accepts data and instructions

er
from the user and converts them into a form
that the computer can process.

nt
2. Central Processing Unit (CPU)
o Function: Executes instructions and
processes data. It has two main
components:
 Control Unit (CU): Directs the flow of
data and controls the operations of other
Ce
ish
units.
 Arithmetic Logic Unit (ALU): Performs
arithmetic calculations and logical
gl

operations.
En

3. Memory Unit
o Function: Stores data, instructions, and intermediate results temporarily or permanently. It includes:
 Primary Memory (RAM, ROM): Fast, temporary storage for immediate use.
 Secondary Memory (Hard Disk, SSD): Permanent storage for data and programs.
E

4. Output Unit
o Function: Converts processed data from the computer into a human-readable form, such as text or
M

visuals, and sends it to output devices like monitors or printers.


5. Storage Unit
o Function: Holds data and instructions permanently or temporarily for future use, ensuring data is
available when needed.

5.3. What are the main units of a central processing unit of a computer? Describe the importance of
each unit.

Main Units of the Central Processing Unit (CPU) and Their Importance:

1. Control Unit (CU)


o Importance: It acts as the CPU's coordinator, directing the operations of other components. It manages
the execution of instructions by controlling the flow of data between the CPU, memory, and
input/output devices.
2. Arithmetic Logic Unit (ALU)
o Importance: It performs all arithmetic operations (e.g., addition, subtraction) and logical operations
(e.g., comparisons). The ALU is essential for carrying out computations and making decisions based on
conditions.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 14 of 21
1st year CS - Chapter # 05
3. Registers
o Importance: These are small, high-speed storage areas in the CPU that temporarily hold data and
instructions during processing. Registers ensure faster access to data compared to main memory.

Together, these units allow the CPU to fetch, decode, and execute instructions efficiently, forming the core of
computer processing.

5.4. List the main functions of the central processing unit.

Main Functions of the Central Processing Unit (CPU):

1. Instruction Fetching
o Retrieves instructions from memory.
2. Instruction Decoding
o Interprets the fetched instructions to determine required actions.
3. Data Processing
o Executes arithmetic and logical operations in the Arithmetic Logic Unit (ALU).

er
4. Data Storage
o Temporarily stores data in registers for quick access during processing.

nt
5. Control Operations
o Directs the flow of data between the CPU, memory, and input/output devices via the Control Unit (CU).
6. Managing Program Execution
Ce
o Ensures instructions are executed in sequence or as required by the program flow.
ish
5.5. Give a block diagram of a computer system, showing all its units along with the buses and
coprocessors.
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 15 of 21


1st year CS - Chapter # 05
5.6. Define a register. What is the function of a register? Name the important registers of CPU.

Register

A register is a small, high-speed storage location within the CPU used to temporarily hold data and instructions
during processing.

Function of a Register

 Temporary Storage: Holds data, instructions, and addresses that the CPU is currently working on.
 Quick Access: Provides extremely fast access compared to primary memory (RAM), ensuring efficient CPU
operation.
 Facilitates Operations: Supports arithmetic, logical, control, and data transfer operations.

Important Registers in the CPU

1. Accumulator (AC): Holds intermediate results of arithmetic and logic operations.

er
2. Program Counter (PC): Stores the address of the next instruction to be executed.
3. Instruction Register (IR): Contains the current instruction being executed.

nt
4. Memory Address Register (MAR): Holds the memory address to be accessed.
5. Memory Data Register (MDR): Stores data fetched from or written to memory.
6.
7. Ce
Stack Pointer (SP): Points to the top of the stack in memory.
General Purpose Registers: Used for general data manipulation. Examples include AX, BX, CX, DX in x86
architecture.
ish
5.7. Distinguish between CPU registers and memory locations. What makes a computer, a smart
machine?
gl

Aspect CPU Registers Memory Locations


En

Location Inside the CPU Outside the CPU in RAM or storage devices
Speed Extremely fast Slower compared to registers
E

Size Very small (in bytes) Larger in size


M

Purpose Temporary storage for immediate processing Stores programs and data for longer use
Access Time Instantaneous Relatively higher access time
Examples Program Counter, Accumulator RAM cells, Cache

What Makes a Computer a Smart Machine?

1. Processing Power: Executes millions of instructions per second.


2. Automation: Performs complex tasks with minimal human intervention.
3. Storage: Retains vast amounts of data and retrieves it quickly.
4. Adaptability: Runs diverse applications, making it versatile.
5. Interconnectivity: Connects to networks and other devices, enhancing functionality.

This combination of speed, storage, and programmability makes a computer "smart."

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 16 of 21


1st year CS - Chapter # 05
5.8. Explain the purpose of assigning addressed to memory locations in the main memory of a
computer.

Purpose of Assigning Addresses to Memory Locations in Main Memory

1. Identification: Each memory location in the main memory is assigned a unique address, enabling the CPU
to identify and access specific data quickly.
2. Data Organization: Memory addresses ensure data is systematically stored and retrieved, avoiding
confusion and overwriting.
3. Efficient Access: Assigning addresses allows the CPU to locate data directly using pointers or instructions,
reducing search time.
4. Program Execution: Instructions and data for programs are stored at specific memory locations. Addresses
help the CPU fetch instructions in the correct sequence.
5. Resource Management: Addressing allows operating systems to manage memory effectively, allocate
resources to processes, and avoid conflicts.

In summary, memory addressing is crucial for the efficient functioning of the computer, ensuring structured

er
storage and precise access to data.

nt
5.9. Explain the terms Address Bus and Data Bus as referred to a computer system.

Address Bus
Ce
The Address Bus is a communication pathway in a computer system that carries memory addresses from the
ish
CPU to other components like RAM or input/output devices.

 Purpose: It specifies the location in memory where data needs to be read from or written to.
gl

 Direction: Unidirectional, as it only sends addresses from the CPU.


 Size: The width of the address bus (number of lines) determines the maximum memory the system can
En

address. For example, a 32-bit address bus can address 2³² memory locations.

Data Bus
E

The Data Bus is a pathway for transferring actual data between the CPU, memory, and peripherals.
M

 Purpose: It carries the data being processed or used, such as instructions or results.
 Direction: Bidirectional, as data can flow to and from the CPU.
 Size: The width of the data bus (number of lines) determines how much data can be transferred at once. For
instance, a 16-bit data bus can transfer 16 bits of data simultaneously.

5.10. What do you understand by the term computer instructions?

Computer Instructions

A computer instruction is a command or a set of commands given to the computer to perform specific tasks.
These instructions are part of a program written in a language the computer can understand, usually machine
code or a high-level language translated into machine code.

Key Features of Computer Instructions :

1. Purpose: They direct the CPU on what operation to perform, such as arithmetic, data transfer, or logical
operations.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 17 of 21


1st year CS - Chapter # 05
2. Components: A typical instruction includes an opcode (operation code, specifying the task) and operands
(data or memory locations involved in the task).
3. Execution: The CPU fetches, decodes, and executes these instructions as part of its instruction cycle.

Example

 MOV A, B: An instruction that tells the CPU to move data from memory location B to A.
 ADD A, B: Adds the values in A and B and stores the result in A.

5.11. List essential parts of a computer instruction with reference to three, two, one and zero address
instructions. Also mention the significance of these parts.

Essential Parts of a Computer Instruction

A computer instruction typically consists of two key parts:

1. Opcode (Operation Code)

er
o Specifies the operation to be performed, e.g., ADD, SUB, LOAD, etc.
2. Operands

nt
o Specifies the data or memory locations involved in the operation.
o Depending on the instruction type, the number of operands varies.

Types of Instructions Based on Addressing Ce


ish
1. Three-Address Instructions

 Structure: Operation Destination Operand1 Operand2


gl

 Example: ADD C, A, B
o Adds A and B, stores the result in C.
En

 Significance: Efficient for complex operations but requires more memory for instruction storage.

2. Two-Address Instructions
E

 Structure: Operation Operand1 Operand2


M

 Example: ADD A, B
o Adds A and B, stores the result in A.
 Significance: Requires fewer operands than three-address instructions, saving space.

3. One-Address Instructions

 Structure: Operation Operand


 Example: ADD A
o Adds A with an accumulator (implied operand).
 Significance: Reduces instruction size; the accumulator serves as a default operand.

4. Zero-Address Instructions

 Structure: Operation
 Example: ADD
o Operands are implicitly on the top of a stack.
 Significance: Simplifies addressing but is limited to stack-based architectures.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 18 of 21


1st year CS - Chapter # 05
Importance of These Parts

 Opcode: Defines what operation is performed, crucial for CPU functionality.


 Operands: Specify data or memory locations, determining the operation's scope and impact.
 Addressing Style: Impacts the instruction complexity, memory usage, and processing speed.

5.12. Write briefly the advantages and disadvantages of one-address instructions.

Advantages of One-Address Instructions

1. Simplicity: Reduces the complexity of the instruction format by requiring only one explicit operand.
2. Efficient Memory Usage: Saves space as only one operand is explicitly stored in the instruction.
3. Faster Execution: Operands are implicitly handled using the accumulator, reducing memory access overhead.

Disadvantages of One-Address Instructions

1. Limited Flexibility: Operations rely heavily on the accumulator, limiting simultaneous operations.

er
2. Higher Dependency: Requires careful management of the accumulator for intermediate results, increasing
programming effort.

nt
3. Extra Operations: Additional instructions may be needed for transferring data in and out of the accumulator.

5.13. Describe the functions of the following registers:

(a) Memory Buffer Register (MBR)


Ce
ish
(b) Memory Address Register (MAR)
gl

(c) Instruction Register (IR)


En

(d) Program Counter (PC)

(e) Accumulator (AC)


E

Functions of Registers:
M

(a) Memory Buffer Register (MBR)

The MBR temporarily holds data that is being transferred to or from the memory. It acts as a buffer between
the CPU and the memory during read or write operations.

(b) Memory Address Register (MAR)

The MAR stores the address of the memory location that the CPU wants to read from or write to. It works in
conjunction with the address bus to access specific memory locations.

(c) Instruction Register (IR)

The IR holds the current instruction being executed by the CPU. It decodes the instruction and sends it to the
appropriate unit (e.g., ALU or CU) for processing.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 19 of 21


1st year CS - Chapter # 05
(d) Program Counter (PC)

The PC keeps track of the address of the next instruction to be executed. After each instruction, the PC is
updated to point to the subsequent instruction in sequence.

(e) Accumulator (AC)

The AC is a register used to store intermediate results during arithmetic and logic operations. It serves as a
working storage area within the CPU for quick data processing.

5.14. Explain the term stack.

Stack:

A stack is a specialized data structure in which data elements are added and removed using the LIFO
(Last In, First Out) principle. This means the last element added to the stack is the first one to be
removed.

er
Key Features:

nt
1. Push: Operation to add an element to the top of the stack.

Ce
2. Pop: Operation to remove the top element from the stack.
3. Top/Peek: Retrieves the top element without removing it.

Uses of a Stack:
ish
 Function Call Management: Stores return addresses, local variables, and execution contexts during function calls.
 Expression Evaluation: Used in arithmetic expression parsing.
gl

 Backtracking: Implements undo features or traversal of paths (e.g., mazes or tree structures).
En

Importance in Computers:

Stacks are vital for handling recursive functions, managing the execution flow, and temporarily storing data in
E

programming and CPU operations.


M

5.15. List some occurrences of stacks in everyday life.

Everyday Life Examples of Stacks:

1. Plates in a Cafeteria:
o Plates are stacked, and the last plate placed on top is the first one removed.
2. Books on a Shelf:
o A stack of books is accessed from the top, removing the most recently placed one first.
3. Undo Function in Text Editors:
o Actions are stored in a stack, allowing the last action to be undone first.
4. Call Logs in Mobile Phones:
o The most recent call is at the top of the log, accessed first.
5. Browser History:
o Pages are stored in a stack; the back button retrieves the last visited page.
6. Parking Garage (Last Car In, First Out):
o Cars parked last must exit first in a single-lane parking system.

These examples follow the LIFO principle, similar to computational stacks.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 20 of 21


1st year CS - Chapter # 05
5.16. Translate each infix expression into its equivalent prefix and postfix expression:

(a) (A-B)*(D/E)

(b) (A+B^D)/(E-F)+G

(c) A*(B+D)/E-F*(G+H/K)

Conversion of Infix to Prefix and Postfix Expressions:

(a) Infix Expression: (A−B)∗(D/E)(A - B) * (D / E)

 Prefix: ∗−AB / DE* - A B / D E


 Postfix: AB−DE /∗A B - D E / *

(b) Infix Expression: (A+BD)/(E−F)+G(A + B^D) / (E - F) + G

er
 Prefix: +/+ABD−EFG+ / + A ^ B D - E F G
 Postfix: ABD+EF− / G+A B D ^ + E F - / G +

nt
(c) Infix Expression: A∗(B+D)/E−F∗(G+H/K)A * (B + D) / E - F * (G + H / K)

Ce
 Prefix: −/∗A+BDE∗F+G / HK- / * A + B D E * F + G / H K
 Postfix: ABD+∗E / FGHK / +∗−A B D + * E / F G H K / + * -
ish
5.17. Explain with the help of the diagram the process of fetching and execution of an instruction from
the memory of a computer.
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 21 of 21


1st year CS - Chapter # 06

Class: 1st year

Chapter # 6

Security, Copyright and the Law

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 13


1st year CS - Chapter # 06
Contents
Computer Crime.......................................................................................................................................................................... 3
1. Software Piracy .............................................................................................................................................................. 3
2. Theft of Hardware ......................................................................................................................................................... 3
3. Theft of Time and Services ............................................................................................................................................ 3
4. Hacking and Electronic Trespassing ............................................................................................................................. 3
Impact of Hacking: ............................................................................................................................................................ 3
Computer Viruses ....................................................................................................................................................................... 3
1. Worm............................................................................................................................................................................... 4
2. Trojan Horse .................................................................................................................................................................... 4
3. Time Bomb....................................................................................................................................................................... 4
4. File Infectors .................................................................................................................................................................... 4

er
5. Macro Virus...................................................................................................................................................................... 4
6. Boot Sector Virus ............................................................................................................................................................. 4

nt
Preventing Infection ................................................................................................................................................................... 4

Ce
Computer Security ...................................................................................................................................................................... 5
1. Physical Access Restrictions .......................................................................................................................................... 5
2. Passwords ....................................................................................................................................................................... 5
ish
3. Digital Signatures ........................................................................................................................................................... 5
4. Network Protection ........................................................................................................................................................ 5
gl

5. Backup Systems.............................................................................................................................................................. 5
En

6. Emerging Solutions ........................................................................................................................................................ 5


7. Human Security Controls .............................................................................................................................................. 6
Privacy Issues.............................................................................................................................................................................. 6
E

1. Monitoring Without Consent ......................................................................................................................................... 6


M

2. Data Collection and Misuse ........................................................................................................................................... 6


3. Publicly Accessible Databases ........................................................................................................................................ 6
4. Information Privacy Protections ................................................................................................................................... 6
5. Emerging Threats .......................................................................................................................................................... 6
Concerns............................................................................................................................................................................. 6
Software Piracy and Law............................................................................................................................................................. 6
Proposed Legislation and Regulation .......................................................................................................................................... 7
Legislation Priorities .......................................................................................................................................................... 7
Regulatory Framework Objectives ................................................................................................................................... 7
Section (A).................................................................................................................................................................................. 9
-: Answer Keys :-................................................................................................................................................................ 9
Section (B / C) .......................................................................................................................................................................... 10

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 13


1st year CS - Chapter # 06
Computer Crime
With the increasing reliance on computers, various forms of computer crime have emerged. These crimes target software,
hardware, time, services, and information. Below are the key categories of computer-related criminal activities:

1. Software Piracy

 Definition: Illegal duplication or distribution of copyrighted software.


 Impact:
o Users avoid paying for software while losing access to upgrades and support.
o Violates intellectual property laws in Pakistan and globally.

2. Theft of Hardware

 Targets: Small, portable devices like laptops, microcomputers, and printers.


 Methods:

er
o Stolen from vehicles, offices, or shipping docks.
o Often resold by professional thieves.

nt
3. Theft of Time and Services

 Examples:
Ce
o Employees playing games or running personal businesses using company computers.
o Cracking codes for satellite TV, voice-mail systems, or cellular networks to access services for free.
ish
4. Hacking and Electronic Trespassing
gl

 Evolution:
o Early hackers were curious enthusiasts.
En

o Modern hackers often have criminal motives.


 Activities:
o Unauthorized access to corporate or government systems.
E

o Theft of data, financial fraud, and deployment of logic bombs or viruses.


 Tools:
M

o Stolen passwords, security loopholes, modems, and the Internet.

Impact of Hacking:

 Theft of sensitive information (e.g., credit card data).


 Malicious activities like disabling systems or altering passwords.
 Increasing involvement of organized electronic crime rings.

Computer Viruses
A computer virus is a malicious program that disrupts, damages, or manipulates data on a computer. It can spread
through disks, networks, or online connections and cause significant harm. Below are the main types of computer
viruses:

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 13


1st year CS - Chapter # 06
1. Worm

 Purpose: Duplicates itself repeatedly.


 Impact: Consumes disk space and network bandwidth, potentially crashing systems.
 Spread: Via email attachments and Internet Relay Chat (IRC).

2. Trojan Horse

 Definition: Hidden malicious code inside useful software.


 Functionality: Performs visible tasks while causing hidden damage, like erasing data.
 Disguise: Often appears as games or utilities.

3. Time Bomb

 Mechanism: Activates after specific triggers (date, action, or file change).


 Example: The Michelangelo virus, activated on March 6, to erase hard disks.

er
4. File Infectors

nt
 Target: Infects executable files (e.g., .exe, .com) and spreads via disks.
 Propagation: Rapidly moves across systems and organizations through infected files.

5. Macro Virus Ce
ish
 Specialization: Infects document files, such as Word or Excel, by exploiting macros.
 Impact: Automates harmful commands when the document is opened.
gl

6. Boot Sector Virus


En

 Hostility: Damages or hides the boot sector, disrupting computer startup.


 Behavior: Loads into memory and infects other disks.
 Impact: Makes data inaccessible or corrupts the system.
E

Preventing Infection
M

Viruses are a persistent threat, but adhering to the following precautions can help protect your computer system:

1. Use Antivirus Software

 Install reliable antivirus programs like McAfee VirusScan, Norton AntiVirus, or IBM AntiVirus.
 Ensure the antivirus software is regularly updated to detect new virus strains.

2. Scan External Media

 Always scan floppy disks, USB drives, or other external media when used on your computer.

3. Monitor Downloads

 Screen all downloaded files from the Internet for viruses before use.
 Avoid downloading files from untrusted sources.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 13


1st year CS - Chapter # 06
4. Enable Automatic Virus Scanning

 Configure antivirus software to run scans automatically at startup or in real time.

5. Stay Cautious with Attachments

 Avoid opening email attachments from unknown senders or unexpected sources.

6. Use Built-In Protections

 Utilize built-in security features in modern operating systems or computers.

7. Regular Updates

 Update both your antivirus software and operating system to patch security vulnerabilities.

er
Computer Security

nt
Computer security involves safeguarding systems and data from unauthorized access, damage, or theft. Below are key
strategies and technologies to reduce security risks:

1. Physical Access Restrictions Ce


ish
 Access Controls: Use tools like ID cards, smart cards, and biometrics (fingerprints, retinal scans).
 Layered Security: Combine methods, e.g., ID badges, keys, and passwords, for enhanced protection.
gl

2. Passwords
En

 Use strong, non-obvious passwords and change them frequently.


 Implement call-back systems to verify user identities.
 Limit access levels (e.g., read-only access for some users).
E

3. Digital Signatures
M

 Ensure data integrity using public-private key encryption systems.


 Sign electronic documents with unique keys to verify authenticity.

4. Network Protection

 Firewalls: Act as gatekeepers for internal networks.


 Encryption: Encode transmitted data to prevent interception.
 Audit-Control Software: Track and record activities to detect suspicious behavior.

5. Backup Systems

 Regularly back up data to recover from disasters like power loss or cyberattacks.
 Store backups in multiple locations for added security.

6. Emerging Solutions
 Develop technologies to counter evolving threats (e.g., for PCs and mobile devices).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 13


1st year CS - Chapter # 06
7. Human Security Controls

 Train managers and employees on risks and best practices.


 Implement robust policies and enforce security protocols.

Privacy Issues
Privacy refers to the right of individuals to control how their personal information is collected, used, and shared.
Below are key points and concerns related to privacy in IT:

1. Monitoring Without Consent

 Organizations monitor employees using surveillance software, smart badges, and call-tracking systems.
 Users fear misuse of monitoring tools to invade personal privacy.

2. Data Collection and Misuse

er
 Point-of-sale (POS) systems and credit cards capture personal data like buying habits and demographics, often

nt
without consent.
 Collected data is sold to other companies, leading to unsolicited marketing like junk emails, faxes, and calls.

3. Publicly Accessible Databases Ce


ish
 Credit bureaus and government agencies maintain vast records on individuals, accessible for various purposes,
raising concerns about misuse.
gl

4. Information Privacy Protections


En

 Companies are adopting codes of ethics, limiting data collection to what is necessary.
 Individuals have the right to access and correct their data and must consent to its release.

5. Emerging Threats
E
M

 Government databases are cross-referenced to track individuals, e.g., for tax evasion or draft registration.
 This raises fears of "Big Brother" surveillance and potential misuse of interconnected data systems.

Concerns

 Many systems force users to share personal data without choice, such as for medical insurance.
 Junk communication methods (emails, faxes, calls) harass users and invade their privacy.

Software Piracy and Law


1. Definition and Legal Framework

 Laws are formal rules imposed by authorities, including Pakistan's Copyright (Amendment) Act, 1992, which
extends to computer software.
 Making or distributing software copies without authorization is illegal.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 13


1st year CS - Chapter # 06
2. Penalties for Software Piracy

 Fines up to Rs. 200,000.


 Seizure of illegal copying tools.
 Prison sentences of up to three years.

3. User Responsibilities

 Purchase original software for every computer.


 Avoid using one license for multiple systems or distributing software without consent.
 Verify the legitimacy of software to avoid counterfeit risks such as:
1. Viruses or defective software.
2. Poor documentation and lack of support.
3. Missed software upgrades.

4. Economic Impact

er
 Counterfeit software denies developers rightful revenue, hindering industry growth and innovation.
 Funds from legitimate purchases support research and development for better software.

nt
5. Government's Role



Ce
Pakistan enforces copyright laws through surprise raids and deterrent penalties.
Ongoing commitment to curb piracy and promote original software purchases.
ish

Proposed Legislation and Regulation


gl

Legislation Priorities
En

1. Digital Signature Act


o Legal recognition of digital IDs, signature certificates, and electronic authentication.
E

2. Computer Crimes Act


o Address unauthorized access to computers and databases.
M

3. Tele-Medicine Development Act


o Regulate cross-border electronic medical services and liabilities.
4. Intellectual Property and Consumer Protection Act
o Enforce copyright laws for software developers while safeguarding consumer rights.
5. Electronic Records
o Ensure admissibility of electronic records in courts and administrative proceedings.
6. Review of Laws
o Remove contradictions in current laws and adapt statutes for electronic commerce by replacing paper -
based processes.

Regulatory Framework Objectives

1. Fair Competition
o Promote a free market with open access to IT services.
2. Infrastructure Deployment
o Facilitate rapid IT infrastructure growth.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 13


1st year CS - Chapter # 06
3. Network Development Freedom
o Allow operators to build their backbone and local access networks collaboratively.
4. Encourage Competition
o Revise government procurement policies to encourage fair competition in telecom services.
5. Standards Compliance
o Ensure service providers meet standards through Pakistan Telecommunication Authority (PTA).
6. Minimum Intrusion
o Limit monitoring and filtering to uphold free society principles.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 13


1st year CS - Chapter # 06

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. Which of the following is a computer crime?
(a) Piracy (b) Sabotage (c) Hacking (d) All of these
2. Which of the following is not a computer crime?
(a) theft or damage of hardware of software b) misuse of computer services
(c) theft or alteration of data (d) eliminating jobs by automating with computers
3. The secret word or a set of numbers to be typed in on a keyboard before any activity can take place is called
(a) password (b) private word (c) keyword (d) secret code

er
4. Which of the following is a computer virus?
(a) Time bomb (b) Worm (c) Trojan horse (d) All of these

nt
5. What is a program which copies itself over and over, eventually causing the computer to crash?
(a) Time bomb (b) Worm
Ce (c) Trojan horse
6. Which virus infects the boot sector and related areas on a hard or floppy disk?
(d) None of these
ish
(a) Boot sector virus (b) Worm (c) Logic bomb (d) All of these
7. Which of the following is a antivirus program?
gl

(a) Hope2003 (b) Brain (c) McAfee (d) None of these


En

8. A message is encrypted using a


(a) Password (b) Firewall (e) Secret code (d) Audit
E

9. The field concerned with the prevention, detection, and correction of deliberate and accidental loss to computer
M

systems, programs, and data is


(a) EDP auditing (b) computer security
(c) antivirus programming (d) computer crime legislation

-: Answer Keys :-
1. d 6. a
2. d 7. c
3. a 8. c
4. d 9. b
5. b

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 13


1st year CS - Chapter # 06

Section (B / C)
6.1. What is computer crime? What forms may it take?

Computer Crime

Computer crime refers to illegal activities involving the use of computers or networks. It includes unauthorized
access, theft, damage, or misuse of data or systems.

Forms of Computer Crime:

1. Hacking: Unauthorized access to computer systems or networks.


2. Identity Theft: Stealing personal data for fraudulent purposes.
3. Phishing: Using deceptive methods to obtain sensitive information like passwords.
4. Malware Attacks: Deploying viruses, worms, or ransomware to disrupt or damage systems.

er
5. Data Theft: Stealing intellectual property, trade secrets, or confidential information.

nt
6. Cyberbullying and Harassment: Using digital platforms to harass or intimidate others.
7.
8.
9.
Ce
Financial Fraud: Online fraud, including credit card fraud or unauthorized financial transactions.
Denial-of-Service (DoS) Attacks: Overloading systems to make them unavailable to users.
Software Piracy: Unauthorized copying or distribution of software.
ish
10. Espionage: Spying on organizations or governments through cyber means.
gl

6.2. Briefly summarize the ways in which computer crime may be minimized or prevented?
En

Ways to Minimize or Prevent Computer Crime:

1. Use Strong Passwords: Implement secure and unique passwords for accounts and systems.
E

2. Install Security Software: Use firewalls, antivirus, and anti-malware programs to protect systems.
M

3. Regular Updates: Keep software and systems updated to address vulnerabilities.


4. Access Control: Limit access to sensitive data through proper authorization mechanisms.
5. Encryption: Use encryption to secure data during transmission and storage.
6. Employee Training: Educate users about phishing, social engineering, and safe online practices.
7. Monitor Activity: Implement system monitoring to detect and respond to suspicious activities.
8. Secure Networks: Use VPNs and strong network protocols for safe communication.
9. Data Backups: Regularly back up important data to recover from breaches or attacks.
10. Legal Frameworks: Enforce strict cybersecurity laws and penalties to deter criminals.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 13


1st year CS - Chapter # 06
6.3. What is a computer virus? How are computer viruses spread? What measures must be taken to
avoid virus on your computer?

Computer Virus

A computer virus is a malicious software program designed to infect and alter the normal functioning of a
computer system without the user's consent.

How Are Computer Viruses Spread?

1. Email Attachments: Opening infected files in emails.


2. Infected Software: Downloading or installing malicious programs.
3. Removable Media: Using infected USB drives, CDs, or DVDs.
4. Untrusted Websites: Visiting compromised or malicious websites.
5. File Sharing: Downloading files through unsafe file-sharing platforms.

er
nt
Measures to Avoid Computer Viruses:

Ce
1. Install Antivirus Software: Use reliable antivirus programs and keep them updated.
2. Avoid Unknown Links: Do not open suspicious links or email attachments.
3. Download Safely: Only download software from trusted sources.
ish
4. Update Systems: Regularly update your operating system and software to fix vulnerabilities.
5. Scan External Devices: Check removable drives for viruses before use.
gl

6. Enable Firewalls: Use firewalls to block unauthorized access to your system.


En

7. Educate Users: Train users to recognize phishing and malicious activities.

6.4. What is computer security?


E
M

Computer Security

Computer security refers to the protection of computer systems and networks from unauthorized access, data
breaches, and potential damage or disruption to hardware, software, and data.

Key Objectives of Computer Security:

1. Confidentiality: Ensuring that sensitive data is accessed only by authorized individuals.


2. Integrity: Protecting data from unauthorized modification or deletion.
3. Availability: Ensuring that systems and data are accessible to authorized users when needed.

Importance:

Computer security safeguards personal, financial, and business data, ensuring the proper functioning of
computer systems and preventing cyber threats such as hacking, malware, and phishing.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 13


1st year CS - Chapter # 06
6.5. What are the different security measures?

Different Security Measures

1. Physical Security
o Restrict physical access to computers and servers using locks, surveillance, and secured facilities.
2. Authentication
o Use strong passwords, biometrics, or multi-factor authentication to ensure only authorized users
access systems.
3. Access Control
o Assign user roles and permissions to limit access to sensitive data or system resources.
4. Data Encryption
o Encode sensitive data to protect it during transmission or storage.
5. Firewalls
o Use hardware or software firewalls to block unauthorized access to networks.

er
6. Antivirus and Anti-malware
o Install and regularly update software to detect and remove malicious programs.

nt
7. Regular Software Updates
o Keep operating systems, applications, and security tools up-to-date to patch vulnerabilities.
8. Backup Systems
Ce
o Maintain regular backups of data to recover in case of cyberattacks or data loss.
9. Intrusion Detection Systems (IDS)
ish
o Monitor network traffic to detect and alert on suspicious activities.
10. Education and Awareness
gl

o Train employees and users on recognizing and preventing phishing, social engineering, and other
cyber threats.
En

6.6. Explain how passwords help to protect computer data?


E

Passwords help protect computer data by acting as a security barrier that only allows authorized users to access
the system. They ensure that sensitive information remains secure by preventing unauthorized access. When a
M

user enters a correct password, it verifies their identity, granting access, while incorrect passwords prevent
entry, protecting the data from breaches.

6.7. What is meant by backing up data?

Backing up data means creating copies of important files and information and storing them in a separate
location. This ensures that if the original data is lost, corrupted, or damaged, you can restore it from the backup,
preventing data loss.

6.8. What is data encryption used for?

Data encryption

Data encryption is used to protect sensitive information by converting it into a coded format that can only be
read by authorized users with the correct decryption key. It helps ensure data privacy and security, especially
during transmission or storage, by making it unreadable to unauthorized parties.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 12 of 13


1st year CS - Chapter # 06
6.9. List at least four ways of safeguarding the security of a computer system.

1. Use strong passwords: Create complex, unique passwords to prevent unauthorized access.
2. Install antivirus software: Protect the system from malware and viruses.
3. Enable firewalls: Block unauthorized access and control incoming and outgoing network traffic.
4. Regularly update software: Ensure the system has the latest security patches to protect against
vulnerabilities.

6.10. Briefly summarize the threats to personal privacy posed by technological advances.

Technological advances pose several threats to personal privacy, such as data breaches, where personal
information is exposed due to inadequate security; surveillance, which allows for constant tracking of
individuals' activities; identity theft, where personal data is stolen and misused; and online tracking, where
personal behavior and preferences are monitored for targeted advertising and other purposes. These

er
technologies can compromise personal information and reduce privacy if not properly managed.

nt
6.11. Give three examples of how computer system can be secured.

Ce
1. Installing Antivirus Software: Protects the system from malicious software, viruses, and malware.
2. Using Firewalls: Monitors and controls incoming and outgoing network traffic to prevent unauthorized
access.
ish
3. Regular Software Updates: Keeps the system secure by patching vulnerabilities and ensuring it runs the
latest security features.
gl
En

6.12. Define the term software piracy. Why should copyrights be respected? In what ways does the
federal government of Pakistan reduce invasion of piracy?

Software Piracy:
E
M

Software piracy is the illegal act of copying, distributing, or using software without the proper authorization
from the copyright holder. This includes downloading or sharing cracked software without paying for it.

Importance of Respecting Copyrights:


 Copyrights protect the creators' intellectual property rights.
 They ensure developers receive fair compensation for their work.
 Respecting copyrights encourages creativity and innovation.

Measures by the Federal Government of Pakistan to Combat Piracy:

 Enforcement of Laws: The government enforces the Copyright Ordinance of 1962 to prevent piracy.

 Awareness Campaigns: Programs are launched to educate people about the legal consequences of piracy.

 Raids and Penalties: The government conducts raids on businesses involved in pirated software and

imposes fines.
 International Cooperation: Collaborates with global organizations to track and reduce piracy activities.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 13 of 13


1st year CS - Chapter # 07

Class: 1st year

Chapter # 7

Operating System (Windows)

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 11


1st year CS - Chapter # 07
Contents
Operating System Overview ......................................................................................................................................... 3
Key Roles of an Operating System: ................................................................................................................................... 3
Layers of an Operating System ......................................................................................................................................... 3
Benefits of an Operating System: ...................................................................................................................................... 3
What is a User Interface?............................................................................................................................................... 4
Components of a User Interface ........................................................................................................................................ 4
Types of User Interfaces .................................................................................................................................................... 4
Advantages of GUI............................................................................................................................................................. 4
Disadvantages of GUI ........................................................................................................................................................ 4
What is Windows?............................................................................................................................................................. 5
Evolution of Windows Versions......................................................................................................................................... 5

er
Key Components of Windows OS...................................................................................................................................... 5

nt
Managing Print Jobs .......................................................................................................................................................... 6
File management ................................................................................................................................................................ 6
Ce
Section (A) ............................................................................................................................................................................. 7
-: Answer Keys :-................................................................................................................................................................ 8
ish
Section (B / C) ...................................................................................................................................................................... 9
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 11


1st year CS - Chapter # 07
Operating System Overview
An Operating System (OS) is essential for managing computer hardware and software resources in more complex
systems. While simple devices like microwave ovens do not require an OS, more sophisticated systems like desktops
and servers depend on it for efficiency and application development.

Key Roles of an Operating System:

1. Resource Management:
o Manages the processor, memory, disk space, and I/O bandwidth.
o Allocates resources among competing programs and devices.
o Ensures all applications function efficiently without conflicts.
2. Providing a Consistent Application Interface:
o Offers a stable and uniform API for applications to interact with hardware.
o Facilitates compatibility across systems with varying hardware configurations.
o Simplifies the integration of hardware upgrades without affecting application functionality.

er
Layers of an Operating System

nt
1. Applications Programs:

2. I/O Management:
Ce
o Software like word processors and browsers interact with the OS.

o Manages input and output devices, such as keyboards and printers.


3. Device Drivers:
ish
o Bridge between hardware and OS to ensure smooth communication.
4. Memory Management:
o Allocates and monitors system memory usage.
gl

5. CPU Management:
o Supervises and schedules CPU tasks for optimal performance.
En

6. Hardware:
o The foundation layer comprising physical components like processors, storage, and peripherals.
E

Benefits of an Operating System:


M

 Simplifies software development by abstracting hardware complexities.


 Provides flexibility to accommodate diverse hardware configurations.
 Enhances efficiency by supervising and coordinating system resources.
 Supports hardware updates without disrupting software functionality.

Example:
Windows Me demonstrates OS flexibility by supporting:

 Hardware from various vendors.


 Thousands of peripherals like printers and disk drives.
 Seamless integration in different combinations.

In essence, operating systems like Windows are crucial for enabling multitasking, resource management, and
compatibility in modern computing systems.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 11


1st year CS - Chapter # 07
What is a User Interface?
A user interface (UI) is the combination of hardware and software that allows users to interact with a computer. It
facilitates communication between the user and the computer through the following:

1. Making selections: Choosing operations or commands.


2. Requesting information: Accessing or querying data.
3. Responding to messages: Interacting with prompts displayed by the system.

Components of a User Interface

1. Hardware: Includes devices like:


o Monitor: Displays messages and outputs.
o Keyboard/Mouse: Inputs commands or selects options.
2. Software: Provides programs for interaction and dialogue management, determining:
o Messages displayed to users.
o Expected responses.

er
o Actions triggered by user inputs.

nt
Types of User Interfaces

1. Command-line Interface (CLI)


Ce
Function: Users type commands using a keyboard to interact with the computer.
ish
 Example: In MS-DOS, the command C:\>copy project.a: copies files from the current folder to drive A.
 Characteristics:
o Command-line interpreter (CLI) executes the typed commands.
gl

o Used in systems like MS-DOS and Unix.


En

2. Graphical User Interface (GUI)

 Function: Users interact with graphical elements like icons, menus, and dialog boxes instead of typing
E

commands.
 Interaction:
M

o Actions performed using a mouse pointer.


o Provides a desktop-like layout with symbols representing familiar objects.
o Features consistency, valid options, and comprehensive on-line help.
 Examples: Windows (95 through XP), OS/2, Linux.

Advantages of GUI

1. User-friendly and intuitive.


2. Minimal training required.
3. Visual elements enhance user experience.

Disadvantages of GUI

1. Resource Intensive:
o Requires more RAM, secondary storage, and a powerful processor.
o Demands advanced graphics capabilities.
2. Slower Command Execution:
o Commands take longer due to graphical interpretation.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 11


1st year CS - Chapter # 07
3. Less Efficient for Simple Tasks:
o Multiple operations required for straightforward actions.

While CLI is lightweight and faster for experts, GUI offers better accessibility and ease of use, making it ideal for
general users.

What is Windows?
Windows is an operating system developed by Microsoft Corporation that dominates the PC-compatible
environment. Its primary feature is the Graphical User Interface (GUI), which allows users to interact using icons
and menus rather than typing commands.

Evolution of Windows Versions

Windows evolved with time, offering improved features and usability:

 Windows 95: Introduced as a distinct operating system.

er
 Windows 98, Me, XP: Enhanced with additional utilities and improved interfaces, maintaining a consistent
GUI-based environment.

nt
Key Components of Windows OS

1. Start Button Ce
ish
 Located on the left side of the taskbar.
 Opens a Start Menu offering options like:
o Programs: Launch installed applications.
gl

o Search/Help: Find files or seek assistance.


o Settings: Customize system configurations.
En

o Shut Down: Power off or restart the computer.

2. Desktop
E

 The workspace displaying icons, windows, and tools.


M

 Resembles a physical desktop for organizing and interacting with files and applications.

3. Taskbar

 Located at the bottom of the screen, containing:


o Start Button: Quick access to programs.
o Quick Launch Toolbar: Frequently used program icons.
o Taskbar Button Area: Indicates open applications or windows.
o Status Area: Displays system notifications, volume, and clock.

4. Window

 A rectangular area for interacting with files or applications.


 Key Components:
o Title Bar: Displays window name and control buttons (Minimize, Maximize, Close).
o Menu Bar: Provides options like File, Edit, and View.
o Scroll Bars: Navigate content not visible in the window.
o Corners/Borders: Resize the window.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 11


1st year CS - Chapter # 07
5. Icons

Graphical representations of applications, files, or drives.

 Application Icons: Launch programs.


 Shortcut Icons: Provide quick access to items.
 Document Icons: Represent active or saved files.
 Disk Drive Icons: Symbolize storage devices.

Managing Print Jobs

Windows allows users to monitor and manage printing tasks:

1. Open the printer window via the system tray or Printers folder.
2. View print queue for pending documents.
3. Pause/Cancel Jobs: Right-click on print jobs to manage them (administrative privileges required for other
users' jobs).

er
Windows offers an intuitive interface and multitasking capabilities, making it accessible for both novice and advanced

nt
users.

File management
The file management system of an operating system handles:
Ce
ish
1. Allocating and deallocating storage space for files.
2. Tracking the allocation units used by files.
gl

3. Controlling file access permissions.


4. Mapping logical file addresses to physical storage locations.
En

It manages file operations like copying, renaming, deleting, and backing up files.
E

Windows Explorer
Windows Explorer in Windows Me allows users to view, manage, and organize files and folders. Key features
M

include:

 Displaying contents of folders.


 Creating, renaming, deleting, copying, and moving files or folders.
 Launched via the Start menu or the My Computer icon.

The interface consists of:

 Menu Bar: Commands for managing files and drives.


 Two Panes: Left pane (folders hierarchy) and right pane (contents).
 Expandable folders with "+" or "-" icons.

Printer Management
The Printers folder helps manage local and network printers. It allows users to:

 Add new printers.


 Set a default printer (identified by a check mark).
 Access printer driver icons for other devices like fax modems.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 11


1st year CS - Chapter # 07

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. Through a user interface, the user is able to
(a) control the computer (b) request information from the computer
(c) respond to messages displayed by the computer (d) all of these
2. A shortcut menu displays when you __________ a(n) _______________ .
(a) right-click, object (b) click, menu name on the menu bar
(e) click, submenu (d) click, recessed button in the taskbar button area
3. To view the contents of a window that are not currently visible in the window, use the

er
(a) title bar (b) scroll bar (c) menu bar (d) Restore Down button
4. To shut down Windows Me,

nt
(a) click the Start button, select Shut Down, and then click the OK button
(b) click File on the menu bar and then click Shut Down
Ce
(c) right-click the taskbar, click Shut Down on the shortcut menu, and then click the OK button
ish
(d) press the F10 key and then click the OK button
5. The Folders pane in the My Computer window contains the
gl

(a) hierarchy of folders (b) source drive


En

(c) source folder (d) contents of the highlighted folder in the Contents pane
6. The contains the Desktop icon.
E

(a) Contents pane (b) Folders pane (c) status bar (d) Standard Buttons toolbar
M

7. To display the contents of a folder in the Contents pane,


(a) double-click the plus sign to the left of the folder icon
(b) right-click the folder icon in the Folders pane
(c) click the folder icon in the Contents pane
(d) click the folder icon in the Folders pane
8. You __________ the minus sign to the left of a folder icon to expand a folder.
(a) click (b) double-click (c) drag (d) point to
9. When an expanded folder is collapsed in the Folders pane,
(a) the subfolders in the folder do not display (b) the My Computer window closes
(c) the computer beeps at you because you cannot perform this activity
(d) the My Computer window displays

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 11


1st year CS - Chapter # 07
10. In ____________ format, file and folder icons in the Contents pane are represented by larger icons.
(a) Large Icons (b) List (e) Small Icons (d) Details

-: Answer Keys :-
1. d 6. b

2. a 7. d

3. b 8. a

4. a 9. a

5. a 10. a

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 11


1st year CS - Chapter # 07

Section (B / C)
7.1. Why an operating system is required in a complex computer system?

An operating system is required in a complex computer system to manage hardware and software resources
efficiently. It acts as an interface between the user and hardware, ensuring multitasking, file management,
memory allocation, device control, and security. This simplifies operations and optimizes system performance

7.2. Define the term user interface. Distinguish between a command-line interface and graphical user
interface, stating one advantage of each.

User Interface:
A user interface is the medium through which a user interacts with a computer system, allowing them to provide
inputs and receive outputs.

Differences:

er
Aspect Command-Line Interface (CLI) Graphical User Interface (GUI)

nt
Users type commands to perform Users interact using visual elements like icons
Interaction

Ce
tasks. and menus.
Requires knowledge of specific
Ease of Use Intuitive and easier for beginners.
commands.
ish
Slower due to reliance on graphics and
Speed Faster for experienced users.
navigation.
gl

Advantages:
En

 CLI Advantage: Offers precise control and is efficient for experienced users.
 GUI Advantage: Easier to learn and use, especially for beginners.
E

7.3. In the Windows Me environment, how is an item, such as an application program or a menu
M

option, selected with a mouse? How is the item opened?

In the Windows Me environment:

 Selecting an item: Move the mouse pointer to the item (e.g., application program or menu option) and click
the left mouse button once.
 Opening an item: Double-click the left mouse button on the item. Alternatively, you can right-click the item
and choose "Open" from the context menu.

7.4. In the Windows environment, what is the screen area called upon which icons, windows, and so
on are displayed?

In the Windows environment, the screen area where icons, windows, and other elements are displayed is called
the desktop.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 11


1st year CS - Chapter # 07
7.5. List four elements of the Windows application window.

Four elements of the Windows application window are:

1. Title Bar: Displays the name of the application and includes minimize, maximize, and close buttons.
2. Menu Bar: Contains menus like File, Edit, View, etc., providing various commands and options.
3. Toolbars: Provide quick access to commonly used commands and tools.
4. Status Bar: Located at the bottom, it displays information about the current state or actions of the application.

7.6. What area is just below the Windows title bar or menu bar?

The area just below the Windows title bar or menu bar is typically the toolbar or ribbon.

 Toolbar: Contains icons and buttons for quick access to frequently used commands.
 Ribbon (in some applications): A tabbed interface that combines menus and toolbars for organized
functionality.

er
7.7. Name four types of icons in the Windows graphical environment.

nt
Four types of icons in the Windows graphical environment are:

1.
2.
3.
Ce
Folder Icons: Represent directories that store files and subfolders.
File Icons: Represent individual documents, images, or other data files.
Shortcut Icons: Links to programs, files, or folders for quick access.
ish
4. System Icons: Represent system elements like "My Computer," "Recycle Bin," or "Network."

7.8. What results when a Windows menu option, which is followed by an ellipsis (...). is chosen?
gl

When a Windows menu option followed by an ellipsis (...) is chosen, a dialog box appears. This dialog box
En

provides additional options or requires further input before the action is executed.

7.9. In the Windows environment, is the active window highlighted in the foreground or the
E

background?
M

In the Windows environment, the active window is highlighted in the foreground to indicate it is currently
selected and ready for interaction.

7.10. What is displayed in a Windows Me taskbar?

In Windows ME, the taskbar displays the following elements:

1. Start Button: Opens the Start menu for accessing programs, settings, and files.
2. Quick Launch Bar: Contains shortcuts to frequently used programs for easy access.
3. Active Program Buttons: Show the open applications, allowing you to switch between them.
4. System Tray: Displays system icons, such as the clock, volume control, and background processes or
notifications.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 11


1st year CS - Chapter # 07
7.11. Define file management system. How can you use Window Explorer for file management?

File Management System:

A file management system is software that helps users organize, store, retrieve, and manage files on a
computer. It provides tools for creating, editing, moving, copying, and deleting files and directories.

Using Windows Explorer for File Management:

Windows Explorer (now called File Explorer in newer versions) allows you to manage files and folders in the
following ways:

1. View Files and Folders: Navigate through directories to view and access files.
2. Create, Rename, and Delete Files/Folders: Create new folders, rename them, or delete unnecessary files.
3. Copy and Move Files: Drag and drop or use right-click options to copy or move files and folders.
4. Search for Files: Use the search bar to find specific files or folders by name or type.
5. Organize Files: Sort files by name, size, date, or type for better organization.

er
6. Access File Properties: Right-click files or folders to view or modify their properties, including
permissions and attributes.

nt
7.12. What type of jobs can be performed using Window Explorer?

Ce
Using Windows Explorer (File Explorer), you can perform the following types of jobs:
ish
1. File Navigation: Browse through folders and files on your computer or network.
2. File Management: Create, delete, rename, and organize files and folders.
3. File Search: Search for specific files or folders by name, type, or date.
gl

4. Copy and Move Files: Copy or move files and folders to different locations.
5. File Properties: View and modify file properties such as size, date modified, and file type.
En

6. File Preview: Preview certain types of files (like images or documents) without opening them fully.
7. File Sharing: Share files with other users or over a network.
8. Compression/Decompression: Create and extract compressed files (ZIP files).
9. Access Network Drives: Connect to and manage files on network drives or external storage devices.
E
M

7.13. What is a default printer? How would you change the default printer?

Default Printer:

A default printer is the printer that is automatically selected when you print a document, unless you specify a
different printer. It is set by the operating system and helps streamline the printing process.

Changing the Default Printer:

To change the default printer in Windows:

1. Open Settings: Click on the Start menu and select Settings (or press Windows + I).
2. Go to Devices: Click on Devices, then select Printers & Scanners.
3. Choose a Printer: Under Printers & Scanners, find the printer you want to set as default.
4. Set as Default: Click on the printer and select Manage, then click Set as Default.

Alternatively, you can change it via the Control Panel under Devices and Printers. Right-click on the desired
printer and choose Set as Default Printer.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 11 of 11


1st year CS - Chapter # 08

Class: 1st year

Chapter # 8

Word Processing

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 9


1st year CS - Chapter # 08
Contents
Word Processing ......................................................................................................................................................................... 3
Basic Word Processing Functions ................................................................................................................................................ 3
Advanced Options....................................................................................................................................................................... 4
Printing Documents .................................................................................................................................................................... 4
Popular Word Processing Packages............................................................................................................................................. 4
Section (A).................................................................................................................................................................................. 6
-: Answer Keys :-................................................................................................................................................................ 6
Section (B / C) ............................................................................................................................................................................ 7

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 9


1st year CS - Chapter # 08
Word Processing
Word Processing package is software that helps you enter, store, modify, format, copy, and print text. Word
processing packages are by far the most popular type of application software, since almost every microcomputer user
has at least one word processing program. In fact, many people purchase microcomputers solely for their word
processing capabilities. The reason is simple. Anyone who routinely produces written material can benefit from a
word processing package.

Our economy has been gradually shifting its emphasis from manufacturing industries to service and information
industries. Almost everyone, from school students to chief executive officers of multinational corporations, must
communicate using the written word. Memos, letters, resumes, reports, proposals, legal briefs, contracts, term papers,
thesis, articles, and books can all be produced with a word processing package.

Basic Word Processing Functions


A comprehensive overview of word processing functions and features. It highlights the tools available for creating,

er
editing, formatting, and enhancing documents in word processors like Microsoft Word. Key points include:

nt
1. Basic Word Processing:
o Purpose: Preparing documents with varied complexity.

o
Ce
User Interfaces: Command-based, menu-based, and graphical.
2. Document Creation:
ish
o Creating new documents or editing existing ones.

o Cursor/insertion point for typing and editing.


gl

3. Editing Features:
o Viewing: Scrolling, Page Up/Down, and using a scroll bar for navigation.
En

o Inserting: Adding text at any position using a cursor.


o Deleting: Removing text with Backspace, Delete keys, or other functions.
E

o Moving/Copying: Using cut, copy, and paste with a clipboard.


M

4. Advanced Tools:
o Find and Replace: Locating and changing words or phrases.

o Undo/Redo: Correcting mistakes or reversing undo actions.


5. Formatting:
o Character: Fonts, sizes, styles (bold, italic).

o Paragraph: Alignment, indentation, spacing.


o Page: Margins, tabs, page numbers.
6. Enhancements:
o WordArt: Decorative text options.

o Graphics: Integrating images, charts, and drawings.


o Tables: Creating structured layouts with rows and columns.
o Columns: Snaking and parallel columns for publications.

These features make word processing an indispensable tool for creating professional, polished documents efficiently.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 9


1st year CS - Chapter # 08
Advanced Options
1. On-line Help: Provides contextual assistance directly on the screen, such as pressing F1 in MS Word for help.

2. Table of Contents and Index Generation: Automates creation, beneficial for long documents like books.

3. Outline Processing: Structures content with hierarchical headings and facilitates reordering.

4. Math Functions: Performs basic to advanced calculations within the document.

5. Sorting: Arranges data (text or numbers) in ascending, descending, or alphabetical order.

6. Mail-Merge: Combines a main document with a data source for personalized letters or documents.

7. Macros: Saves time by automating repetitive tasks using pre-recorded keystroke sequences.

8. Desktop Publishing: Includes tools for complex layouts, such as multi-column text and integrated graphics.

er
9. Web Publishing: Facilitates creating Web pages with multimedia and hypertext links.

nt
10. WYSIWYG (What-You-See-Is-What-You-Get): Ensures the on-screen display matches the printed output,

exemplified by MS Word. Ce
ish
Printing Documents
gl

1. Printing Parts of a Document: Enables printing the entire document or specific pages as needed.
En

2. Printing Copies: Allows printing multiple copies of a document with a single command.

3. Paper Feed: Supports automatic feeding through paper trays or manual insertion for single sheets, envelopes,
E

labels, or cheques.
M

4. Print Quality: Offers different modes (e.g., draft, medium-quality, or letter-quality) for varying output needs.

5. Printer Selection: Facilitates switching between multiple connected printers, such as dot-matrix for drafts and

laser for high-quality output.

Popular Word Processing Packages


1. WordStar:
o Developed by MicroPro International Corporation.
o Launched in 1979, initially for CP/M systems.
o Later adapted for IBM PC and MS-DOS.
o Features: pull-down menus, context-sensitive help, mail-merge, undo, character formatting, and math
functions.
o Criticized for being outdated but improved in Release 7.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 9


1st year CS - Chapter # 08
2. WordPerfect:
o Developed by WordPerfect Corporation in 1982.

o Best-selling package till 1997.


o Available for various systems like IBM, Apple, Commodore, and Digital MicroVAX.
o Known for its rich features and frequent updates.

3. Microsoft Word:
o Introduced by Microsoft in 1983.

o Became highly popular with versions like Word 97 and Word 2000.
o Features: advanced word processing tools, desktop publishing capabilities, graphics interface, and
compatibility with various printers.
o Especially optimized for laser printers and remains a leading package.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 9


1st year CS - Chapter # 08

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. Which is a task not normally performed with word processing software?
(a) creating a document (b) editing a document
(c) formatting a document (d) compiling source code
2.. The word processing feature that eliminates having to press the Enter key at the end of every line is called
(a) justification (b) word wrap (c) indentation (d) mail-merge
3. Many word processing packages with a graphics interface let you move up or down in a document through
the use of a(n)
(a) cursor (b) insertion point (c) ruler line (d) scroll bar

er
4. Which typing mode would you use to add a new word between two existing words?

nt
(a) insert (b) overwrite (c) justify (d) word wrap

(b) Page Down key Ce


5. In many cases, the simplest way to remove the last few characters you have typed is with the
(a) Up Arrow key (c) Backspace key (d) Alternate key
ish
6. Which operation involves moving an existing segment of text from one place to another?
(a) cut-and-paste (b) copy-and-paste (c) search and replace (d) global delete
gl

7. Which feature would you use to change every occurrence of Ahmed to Jamal in entire document?
En

(a) cut-and-paste (b) copy-and-paste (c) find and replace (d) global delete
8. Which of the following words in a document would probably be presented to you as a possible error by a
spelling checker?
E

(a) the (b) brown (c) cat (d) Ernie


M

9. Which of the following is an example of character formatting?


(a) justification (b) boldface (c) indentation (d) spacing
10 Which feature would you use to create form letters?
(a) style sheet (b) WYSIWYG (c) mail-merge (d) keyboard macro
11. Which feature lets you record a series of keystrokes and "play" them back at any time?
(a) style sheet (b) WYSIWYG (e) mail-merge (d) keyboard macro

-: Answer Keys :-
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

d b d a c a c d b c d

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 9


1st year CS - Chapter # 08

Section (B / C)
8.1. List the basic functions every word processing package performs.

The basic functions every word processing package performs include:

1. Creating and Editing Text: Writing, deleting, and modifying text.


2. Formatting: Adjusting font size, style, color, and text alignment.
3. Document Layout: Setting margins, page orientation, headers, footers, and page breaks.
4. Spell Check and Grammar: Identifying and correcting language errors.
5. Cut, Copy, and Paste: Moving or duplicating text and objects.
6. Search and Replace: Finding specific text and replacing it with alternatives.
7. Printing: Preparing and printing documents in desired formats.

er
8. File Management: Saving, opening, and managing documents in various file formats.

nt
9. Tables and Lists: Creating structured data representations like tables and bullet/number lists.
10. Inserting Objects: Adding images, charts, and other multimedia elements.

Ce
8.2. What is the difference between cut-and-paste and copy-and-paste operations?
ish
The difference between cut-and-paste and copy-and-paste operations lies in what happens to the original
content:
gl

1. Cut-and-Paste:
o Removes the original content from its source location.
En

o Transfers it to the destination location.


o Shortcut: Ctrl + X (Cut) and Ctrl + V (Paste).
2. Copy-and-Paste:
E

o Leaves the original content intact in its source location.


o Creates a duplicate in the destination location.
M

o Shortcut: Ctrl + C (Copy) and Ctrl + V (Paste).

In essence, "cut" deletes the content from the source, while "copy" does not.

8.3. What editing feature might you use to correct a consistently misspelled name throughout a
document?

To correct a consistently misspelled name throughout a document, you can use the Find and Replace feature.

 Find: Locate all instances of the misspelled name.


 Replace: Substitute it with the correct spelling.

Shortcut: Ctrl + H opens the Find and Replace dialog in most word processors.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 9


1st year CS - Chapter # 08
8.4. Which operation is used to cancel the effect of the previously executed command?

The Undo operation is used to cancel the effect of the previously executed command.

Shortcut: Ctrl + Z in most applications.

8.5. How do word processing packages help you manage documents?

Word processing packages help manage documents by providing features like:

1. File Management: Create, save, organize, and retrieve documents.


2. Editing Tools: Modify text, apply formatting, and correct errors.
3. Templates: Use pre-designed layouts for consistency.
4. Collaboration: Track changes, add comments, and share documents.
5. Version Control: Maintain revisions and restore previous versions.

er
nt
8.6. What kind of on-line help displays information specifically relevant to what you are currently
doing inside a program?

Ce
The type of online help that displays information specifically relevant to what you are currently doing inside a
program is called context-sensitive help.
ish
This help system provides guidance, tips, and instructions based on the task or feature you're using at that
moment, ensuring the information is directly related to your current activity within the program. It can usually be
gl

accessed by pressing F1 or selecting help options within the interface.


En

8.7. What timesaving feature lets you record a series of key stokes and play them back at any time?

The timesaving feature that lets you record a series of keystrokes and play them back at any time is called a
E

Macro.
M

Macros allow you to automate repetitive tasks by recording actions like typing, mouse clicks, or menu selections,
and then executing them with a single command or keystroke. This feature is commonly used in word
processors, spreadsheet applications, and other software programs.

8.8. What word processing features are generally considered to be characteristics of desktop
publishing?

The word processing features generally considered characteristics of desktop publishing include:

1. Advanced Layout and Formatting: Precise control over text, images, and page layout, allowing for multi-
column designs and complex page structures.
2. Typography Control: Extensive font selection, font size, spacing, and text styling (bold, italics, underline)
for professional-looking documents.
3. Image and Graphics Integration: The ability to insert and manipulate images, shapes, and graphics
alongside text, creating visually rich documents.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 9
1st year CS - Chapter # 08
4. Page Design Tools: Tools for setting margins, headers, footers, and the ability to adjust page sizes for
printing and distribution.
5. Template Use: Availability of pre-designed templates for brochures, newsletters, flyers, and other
publications.
6. Text Wrapping: Control over how text flows around images or objects, enhancing the layout design.
7. Color and Backgrounds: Use of color, gradients, and patterned backgrounds for added visual appeal in
documents.

8.9. List three popular microcomputer word processing packages.

Three popular microcomputer word processing packages are:

1. Microsoft Word: A widely used word processing software with advanced features for formatting, editing,

er
and collaboration.
2. Google Docs: A cloud-based word processor that allows for real-time collaboration and easy sharing.

nt
3. LibreOffice Writer: A free and open-source word processing software that offers many features similar to
Microsoft Word.
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 9


1st year CS - Chapter # 09

Class: 1st year

Chapter # 9

Spreadsheet

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 10


1st year CS - Chapter # 09
Contents
Spreadsheet ................................................................................................................................................................................ 3
Types of Data in Cells: ....................................................................................................................................................... 3
Spreadsheet Functions: ...................................................................................................................................................... 3
Spreadsheet Operations: .................................................................................................................................................... 3
Entering and Editing Data ........................................................................................................................................................... 3
Formatting Data.......................................................................................................................................................................... 4
Additional Spreadsheet Features ................................................................................................................................................ 5
Popular Spreadsheet Programs................................................................................................................................................... 6
Section (A).................................................................................................................................................................................. 7
-: Answer Keys :-................................................................................................................................................................ 8
Section (B / C) ............................................................................................................................................................................ 9

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 10


1st year CS - Chapter # 09
Spreadsheet
A spreadsheet is an application software that allows users to manipulate numerical and string data in rows and
columns of a table, known as a worksheet. Here are some key aspects:

Types of Data in Cells:

1. Numbers: Quantities that can be positive, negative, with or without decimals, or in scientific notation (e.g.,
4.32E+5 for 432,000).
2. Labels: Descriptive titles or notes that help explain the contents of a worksheet (e.g., headings like "Income"
or "Expenditures").
3. Formulas: Expressions that perform calculations on numbers and labels. For example, A1+B1 adds the contents
of cells A1 and B1.

Spreadsheet Functions:

er
Functions are predefined operations that simplify complex tasks. Some common categories include:

nt
 Mathematical: For simple calculations (e.g., SUM for summing a range of cells).



Ce
Statistical: For statistical calculations (e.g., AVERAGE, COUNT, MAX).
Financial: For business-related calculations (e.g., FV for future value, IRR for internal rate of return).
Text: To manipulate text (e.g., LENGTH, MID).
ish
 Date & Time: To handle dates and times (e.g., DATE, NOW).
 Logical: For comparisons and conditional actions (e.g., IF, AND).
 Trigonometric: For angle and triangle calculations (e.g., COS, SIN).
gl

 Logarithmic: For exponential and logarithmic calculations (e.g., EXP, LN).


En

Spreadsheet Operations:


E

Cell Ranges: Cells can be addressed individually or as a range (e.g., A1:F1 for a row, B2:B14 for a column).
 Scrolling: Spreadsheets can accommodate very large datasets, with many programs allowing over 200
M

columns and thousands of rows.

Overall, spreadsheets are essential for tasks like budgeting, financial analysis, and data visualization. Let me know if
you'd like examples or further details!

Entering and Editing Data


1. Moving the Cell Pointer:
o The cell pointer (or active cell) indicates where you can enter data. It can be moved using arrow keys
or by clicking with the mouse. To view hidden cells, use scroll bars.
2. Typing Entries:
o Numbers: Simply type the number. Spreadsheet programs recognize entries starting with numerical
characters (e.g., 1, 3.5, $100).

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 10


1st year CS - Chapter # 09
o Labels: Any entry starting with a non-numerical character is treated as a label (e.g., "Expenditures").
For labels starting with a digit (e.g., "2002 Expenditures"), a special prefix like a quotation mark ( ")
may be needed in some programs.
o Formulas: Formulas typically begin with an equal sign (=), followed by operations (e.g., =A1+B1,
=SUM(A1:A5)).

3. Modifying Cells:
o If you haven't pressed Enter or moved the pointer, use Backspace to erase characters. Some programs
allow you to edit within the cell before completing the entry.
4. Inserting and Deleting Rows/Columns:
o Insert: Insert rows or columns by shifting existing cells. This creates space for new rows or columns.
o Delete: Delete rows or columns, and the remaining cells shift to fill the space.
5. Selecting Ranges:

er
o A range refers to a block of cells (e.g., A1:A5, A1:C10). Selecting a range allows you to apply changes

nt
(e.g., filling a range with a number, label, or formula).
6. Copying and Moving Data:
o Ce
Copy: Select a range and use the Copy command. Then place the pointer in a new location and use
Paste.
ish
o Move: Select a range, use Cut, move the pointer to a new location, and use Paste to reposition the data.
gl

These features make spreadsheets flexible and efficient for handling large amounts of data, allowing users to edit,
En

organize, and manipulate information easily.

Formatting Data
E

1. Numeric Formats:
M

o Spreadsheet programs allow for various numeric formats to display data according to the type of data
(e.g., monetary, scientific, mathematical). These formats are applied through commands where you
select the desired format and the range of cells to apply it to.
2. Column Widths:
o To ensure that numbers or formulas fit into cells, column widths can be adjusted. The default width is
usually 8 to 10 characters, but you can set column widths anywhere from 1 to 240 characters. This
helps prevent data from being cut off or replaced by asterisks ( *) or hash signs (#).
3. Alignment:
o Alignment can be left-justified, centered, or right-justified. By default:
 Numbers and formulas are right-justified.
 Labels (text) are left-justified.
o You can change alignment for individual cells, rows, columns, or ranges.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 10


1st year CS - Chapter # 09
4. Displaying Formulas:
o When formulas are entered, the spreadsheet usually displays the result of the formula, not the formula
itself. To view the formula, move the cell pointer to the cell and look at the control panel, where the
actual formula is shown (e.g., =SUM(E10:E14) instead of the result like 1500).
5. Calculating Results:
o Spreadsheets automatically recalculate the worksheet whenever a cell is updated. This feature,
automatic recalculation, ensures that results are always up-to-date based on the changes made to any
cell.
6. Printing:
o Spreadsheets can be printed easily, with options to control page layouts such as margins, page length,
headers, footers, and page numbering. Some programs also allow printing of gridlines, row numbers,
and column labels. Larger worksheets can be printed across multiple pages or rotated sideways to fit on

er
a single page, depending on the printer's capabilities.

nt
Additional Spreadsheet Features
 Graphing:
Ce
ish
 Spreadsheets offer graphing capabilities, including bar graphs, pie charts, scatter plots, and line graphs, which
help to visualize data. This feature allows users to present data more effectively, making it easier to
gl

communicate key information in reports and presentations.


En

 Data Management:

 Spreadsheets are useful for organizing and managing tables of data, such as mailing lists, inventories, and price
E

lists. They offer functions to create, search, and rearrange data efficiently, making them versatile for various
data management tasks.
M

 Macros:

 Macros automate repetitive tasks by recording sequences of keystrokes and allowing users to replay them with
a single command. This reduces manual work and can even execute complex tasks, such as decision-making
processes, prompting for inputs, and calculating results. Macros can be stored in the worksheet or in separate
files for reuse.

 Merging Worksheets:

 Many spreadsheet programs allow users to merge data from multiple worksheets. You can copy or combine
cells from a source worksheet to a target worksheet, either overwriting or adding values. Merging can also
include formulas, labels, and formatting like numeric display and alignment.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 10


1st year CS - Chapter # 09
 Multidimensional Spreadsheets:

 These spreadsheets extend beyond the usual two-dimensional format, enabling connections between cells
across multiple worksheets. A three-dimensional spreadsheet can be visualized as a stack of conventional
worksheets, providing an additional level of organization. For example, a cell address in the third row of the
second page would be denoted as 2A3.

 Moving Data Between Applications:

 Spreadsheets can interact with other applications, such as word processors, database management systems, and
graphics programs. Data can be transferred from spreadsheets to these applications and vice versa, allowing for
seamless integration across different tools. For example, spreadsheet graphs can be used in word processing or
desktop publishing software.

Popular Spreadsheet Programs

er
1. Lotus 1-2-3:

nt
o Introduced in 1982, Lotus 1-2-3 became the standard spreadsheet program and a benchmark for other

Ce
programs. It combined powerful spreadsheet functionality with graphics and data management
capabilities. It remains popular in corporate and business markets, especially for IBM-compatible
systems.
ish
2. SuperCalc:
gl

o Initially launched for the CP/M operating system before being adapted for IBM PCs, SuperCalc is one
of the oldest surviving spreadsheet programs. It evolved through versions like SuperCalc 2 and 3,
En

which added features like improved formatting, macros, and graphics. SuperCalc 5 is a powerful
program with a loyal user base, though it is not as widely used as Lotus 1-2-3.
E

3. Microsoft Excel:
M

o Introduced in 1987, Excel became the top-selling spreadsheet program. Known for its user-friendly
interface with pull-down menus, windows, and mouse support, Excel surpassed Lotus 1-2-3 in
popularity. It offers advanced graphics, data management, and ease of use, making it a powerful
competitor in the spreadsheet market. Excel remains a leading choice for users on IBM-compatible
systems, benefiting from Microsoft’s strong technical and marketing support.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 10


1st year CS - Chapter # 09

Section (A)
Multiple Choice Questions (MCQs)
Choose the correct answer
1. The intersection of a row and a column in a worksheet is called a
(a) macro (b) cell (c) formula (d) function
2. The range C3:D6 refers to which of the following sets of cells?
(a) C3, C4, C5, C6, D3, D4, D5, and D6 (b) C3, C4, C5, and C6
(c) D3, D4, D5, and D6 (d) A1, B2, C3, and D6
3. Which is not a basic type of data that can be entered into a worksheet cell?
(a) number (b) label (c) formula (d) pointer

er
4. Which of the following Microsoft Excel formulas adds the contents of cells A1, A2, A3, A4, and A5?
(a) =COUNT(A1:A5) (b) =AVG(A1:A5)

nt
(c) =SUM(A1:A5) (d) =A1+A5

(a) macros
Ce
5. Unless you specify otherwise, most spreadsheet packages assume all cell addresses are
(b) relative cell reference
ish
(c) absolute cell references (d) mixed cell references
6. If you want numbers in a worksheet to be preceded by dollar signs and to have two places to the right of the
gl

decimal point, you should use


En

(a) general format (b) integer format (c) scientific format (d) currency format
7. A spreadsheet program that immediately updates the entire worksheet whenever you change the contents of a
cell is using
E

(a) automatic recalculation (b) manual recalculation


M

(c) smart recalculation. (d) intelligent recalculation


8. Which spreadsheet feature allows you to store a long sequence of keystrokes and replay it later by pressing a
single combination of keys or selecting a menu option?
(a) formula (b) macro (c) function (d) clipboard
9. A general-purpose worksheet that lets you perform a task by simply filling in the blanks is called a
(a) formula (b) macro (c) function (d) template
10. Worksheets are often merged to
(a) make larger worksheets (b) add the contents of corresponding cells
(c) save disk space (d) use three dimensions

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 10


1st year CS - Chapter # 09
11. A three-dimensional worksheet can be envisioned as a
(a) stack of conventional worksheet pages (b) pie chart
(e) circular reference (d) macro template

-: Answer Keys :-

1. b 6. d 11. a

2. a 7. a

3. d 8. b

er
4. c 9. d

nt
Ce
5. b 10. b
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 10


1st year CS - Chapter # 09

Section (B / C)
9.1. What is the main function of spreadsheet programs?

The main function of spreadsheet programs is to organize, analyze, and store data in tabular form. They
allow users to perform calculations, create charts, and manipulate data using formulas and functions.
Spreadsheets are commonly used for tasks like financial analysis, data tracking, and budgeting.

9.2. What is the cell address of the tenth column of the sixth row in a worksheet?

The cell address of the tenth column in the sixth row of a worksheet is J6.

 The letter "J" represents the 10th column.


 The number "6" represents the 6th row.

9.3. Why are labels used in worksheets?

er
Labels are used in worksheets to identify and describe data in rows and columns. They help clarify the content

nt
of cells, making it easier to understand and organize the information. Labels typically consist of text or numbers
and are often used for headings, titles, or descriptions to differentiate between various types of data in a
spreadsheet.
Ce
9.4 Write a formula that adds the contents of the first five cells in column B.
ish
The formula to add the contents of the first five cells in column B is:

=SUM(B1:B5)
gl

This formula adds the values in cells B1 to B5.


En

9.5. Give an example of a computation that would be impossible without using a function.
E

An example of a computation that would be impossible without using a function is calculating the average of a
large dataset.
M

For example, to compute the average of values in cells A1 to A1000, you would use the AVERAGE function:

=AVERAGE(A1:A1000)

Without the function, you would have to manually sum all the values and then divide by the number of entries,
which is impractical for large datasets.

9.6. What are the three types of alignment for labels and numeric values?

The three types of alignment for labels and numeric values in a spreadsheet are:

1. Left Alignment: Labels (text values) are typically aligned to the left of the cell.
2. Right Alignment: Numeric values (numbers) are usually aligned to the right of the cell.
3. Center Alignment: Text or numbers can be centered within the cell, often used for titles or headings.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 10


1st year CS - Chapter # 09
3.1. How are worksheets used as simple data managers?

Worksheets are used as simple data managers by organizing and storing data in a structured format, allowing
users to easily input, modify, analyze, and retrieve information. Here's how they serve as data managers:

1. Data Organization: Worksheets organize data into rows and columns, making it easier to categorize and
locate information.
2. Data Entry: Users can input and update data quickly within cells.
3. Data Sorting and Filtering: Worksheets allow users to sort and filter data to find specific information.
4. Data Analysis: Functions and formulas can be applied to analyze data, such as performing calculations,
finding averages, or creating reports.
5. Data Visualization: Worksheets enable users to create charts and graphs to visually represent data for better
understanding and presentation.

er
9.8. Why might you create a spreadsheet macro?

nt
You might create a spreadsheet macro to automate repetitive tasks and save time. Macros can record a

Ce
sequence of actions, such as formatting, calculations, or data entry, and then execute them with a single
command. This helps improve efficiency, reduce errors, and streamline complex workflows, especially when
dealing with large datasets or frequent operations.
ish

9.9. What is a three-dimensional worksheet?


gl

A three-dimensional (3D) worksheet refers to a type of worksheet that allows data to be stored and
En

referenced across multiple sheets within a workbook. In a 3D worksheet, you can perform calculations and
analysis involving data from more than one sheet, treating them as part of a unified data structure.
E

For example, if you have multiple sheets (Sheet1, Sheet2, and Sheet3) in a workbook, a 3D reference might
look like this:
M

=SUM(Sheet1:Sheet3!A1)

This formula sums the values in cell A1 across Sheet1, Sheet2, and Sheet3. Essentially, it adds data across
multiple worksheets in a 3D space.

9.10. List three popular microcomputer spreadsheet packages.

Three popular microcomputer spreadsheet packages are:

1. Microsoft Excel: A widely used spreadsheet program with advanced features for data analysis, charting,
and automation.
2. Google Sheets: A cloud-based spreadsheet tool that allows for real-time collaboration and easy sharing.
3. LibreOffice Calc: A free and open-source spreadsheet software with many features similar to Microsoft
Excel.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 10


1st year CS - Chapter # 10

Class: 1st year

Chapter # 10

Internet browsing and using E-mail

er
nt
Ce
( According to old book )
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 1 of 10


1st year CS - Chapter # 10
Contents
Internet Browsing and Using E-mail ............................................................................................................................................ 3
Understanding E-mail ................................................................................................................................................................. 4
Understanding Newsgroups........................................................................................................................................................ 5
Section (B / C) ............................................................................................................................................................................ 7

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 2 of 10


1st year CS - Chapter # 10
Internet Browsing and Using E-mail
Browsing the Web

 The World Wide Web (WWW) is a distributed system designed for browsing and searching multimedia
documents.
 Hypermedia: Web pages are composed of text, images, and links, creating a maze of interlinked content.
 Web Pages and Sites: A web page is part of a website, with the home page being the main entry point. Web
browsers like Microsoft Internet Explorer and Netscape Navigator allow users to explore the web by
clicking on "hot links" (text or images that lead to other pages).
 Navigation: Browsers offer Back and Forward buttons for retracing steps, and bookmarks/favorites to save
important sites for later visits.

er
Going Directly to a Page

nt
 Every webpage has a unique address called a URL (Uniform Resource Locator).
o

o Ce
Protocol: Commonly "http" for web pages or "ftp" for file transfers.
Domain Name: Identifies the site, with suffixes like .com, .gov, .edu, etc., indicating the site’s nature.
 Example: [Link] is a typical URL format.
ish
o Path Name: Some URLs include a path, like
[Link]
gl

o AutoComplete: In browsers like Internet Explorer, typing part of a URL may auto-complete the rest if
En

you’ve visited it before.


E

Downloading a File
M

 Downloading: Copying a file from the web to your computer.


 Caution is necessary to avoid downloading viruses from unknown sites. Virus protection software is
recommended.
 Download Speed: Large files may take time, especially on slower connections, and compressed files (e.g.,
.zip) save download time.

 Ensure sufficient storage space for downloaded files.


 Software Sites: Many software companies provide updates, demos, and drivers for download.

Searching the Web

 Directories: Hierarchical catalogs of websites, like Yahoo!, organize sites into categories. Directories are
curated by researchers and provide lists of relevant pages in a topic.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 3 of 10


1st year CS - Chapter # 10
 Search Engines: Search engines like AltaVista and HotBot use software agents (spiders) to explore the web
and automatically index pages.
o Users input keywords to search the web, refining searches with Boolean operators (AND, OR, NOT).
o Search engines provide a broader database than directories but may list pages of varying relevance.
 Meta-search Engines: Tools like MetaCrawler run parallel searches across multiple search engines and
directories for more comprehensive results.

Understanding E-mail
 E-mail (electronic mail) allows you to send messages instantly over the Internet. It's one of the most popular
reasons people connect to the web, enabling communication at any time without additional charges.
 Instantaneous Messaging: E-mail allows messages to be sent and received at the convenience of the recipient.

er
Decoding E-Mail Addresses

nt
 An e-mail address is composed of two main parts:
o
Ce
Username: This part identifies the individual user and is chosen by the user (except for college
accounts where it's assigned).
ish
o Domain Name: This identifies the server that handles the email, separated by an @ symbol. The domain
can have several parts, usually with an extension that indicates the type of server.
gl

Example: amir@[Link]
En

o amir: Username
o [Link]: Domain Name (indicating an educational institution, with the .edu extension).
E

 Common Domain Extensions:


M

o .edu - Education

o .org - Non-profit, non-commercial organizations

o .com - Commercial entities

o .net - Network service providers

o .gov - Government institutions

E-mail Address Format

 E-mail addresses must follow certain standards, and can be quite complex. Here are some examples:
o foo:a@[Link]
o jkorpela@[Link]
o [Link]@[Link]
o i4u@[Link]

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 4 of 10


1st year CS - Chapter # 10
 Although some e-mail systems may have their own standards, simple and easy-to-remember e-mail addresses
are preferred to avoid interface issues.

Your E-Mail Program

 To use e-mail, you need an e-mail program. This program can be provided by your institution or Internet
Service Provider (ISP).
 For personal use, Outlook Express (included with Internet Explorer) is one option for managing e-mails. You
can access your e-mail through Outlook Express or other similar programs.

Understanding Newsgroups
What is a Newsgroup?

er
 A newsgroup is not related to traditional news. Instead, it is an electronic discussion forum where users can

nt
post messages and engage in discussions on specific topics.

Ce
Newsgroups cover a wide variety of subjects such as gardening, TV shows, motorcycles, investments, jobs,
and more. The collection of all newsgroups across the Internet is called Usenet.
ish
How Newsgroups Work
gl

 To participate in a newsgroup, you subscribe to it. Once subscribed, you can review posts and contribute by
En

posting your own messages.


 Messages posted in newsgroups are open for anyone to see and respond to, unlike e-mail, which is directed to
individual recipients.
E

 Conversations in newsgroups are not live. They happen asynchronously, with messages being posted at
M

different times, creating an ongoing discussion.

Content in Newsgroups

 The content in newsgroups can vary. Some may contain casual chat, while others offer more in-depth
discussions or information.
 Because newsgroups are unmoderated, messages are not typically screened or censored. This means that
while free speech is encouraged, some discussions might not be appropriate for everyone. Users can choose to
ignore or unsubscribe from newsgroups or specific posts that they find offensive.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 5 of 10


1st year CS - Chapter # 10
Subscribing to Newsgroups

 Since there are thousands of newsgroups, it can be overwhelming to keep track of all the messages. Therefore,
you can subscribe only to the newsgroups that interest you.
 The available newsgroups depend on the server and newsreader you are using. You'll often need to download
a list of newsgroups from your server before subscribing to the ones you want to follow.

er
nt
Ce
ish
gl
En
E
M

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 6 of 10


1st year CS - Chapter # 10

Section (B / C)
10.1. What can you tell from the suffix of a Web address?

The suffix of a web address, known as the top-level domain (TLD), can provide information about the type,
origin, or purpose of the website. Here's what you can tell from some common suffixes:

1. .com: Typically used for commercial websites or businesses.


2. .org: Used by non-profit organizations.
3. .gov: Represents government websites.
4. .edu: Associated with educational institutions.
5. .net: Originally for network-related organizations but now used more broadly.
6. .co: Often used as an alternative to .com, typically for companies or businesses.

er
7. Country code TLDs (e.g., .uk, .ca, .jp): Indicate the country or region of the website (e.g., .uk for the
United Kingdom, .ca for Canada).

nt
Ce
These suffixes can help identify the intended purpose or geographical origin of a website.

10.2. If an address ends in .gov, what type of site is it?


ish
If an address ends in .gov, it indicates that the site is a government website. These websites are typically owned
and operated by federal, state, or local government entities and provide official information, services, or
gl

resources to the public.


En

10.3. Why is file compression important on the Internet?

File compression is important on the Internet because it:


E

1. Reduces File Size: Compressing files decreases their size, making them easier and faster to upload,
M

download, and share.


2. Saves Bandwidth: Smaller files consume less bandwidth, reducing data transfer costs and speeding up
downloads or streaming.
3. Improves Storage Efficiency: Compressed files take up less storage space, both on local devices and on
servers, allowing for better space management.
4. Enhances User Experience: Faster file transfers and quicker access to compressed files lead to a more
efficient and smoother online experience for users.

10.4. What is a search engine?

A search engine is a software system that enables users to search for information on the internet. It indexes web
pages and returns relevant results based on user queries. Popular search engines like Google, Bing, and Yahoo
use algorithms to rank and display the most relevant results, helping users find websites, images, videos, news,
and other content.
Prepared by: Aqib Ilyas (BSCS, SMIU) Page 7 of 10
1st year CS - Chapter # 10
10.5. How can you get to a search engine Internet site?

To get to a search engine internet site, you can follow these steps:

1. Open a Web Browser: Launch a web browser (like Chrome, Firefox, Safari, or Edge).
2. Enter the Search Engine URL: In the address bar, type the URL of your preferred search engine (e.g.,
[Link], [Link], or [Link]) and press Enter.
3. Use the Browser's Default Search Engine: If your browser's default search engine is set (e.g., Google or Bing), you
can directly type your query in the browser's address bar and hit Enter to search.

These steps will take you to the search engine where you can start searching for information.

10.6. What are the basic steps for searching?

er
The basic steps for searching on the internet are:

nt
1. Open a Search Engine: Go to a search engine like Google, Bing, or Yahoo in your web browser.

Ce
2. Enter a Query: Type keywords or a phrase related to what you're looking for into the search bar.
3. Review the Results: Browse through the search results displayed, which typically include a list of
ish
websites, articles, images, or videos related to your query.
4. Click on Relevant Results: Click on the links that seem most relevant to your search to view more
gl

information.
5. Refine Search: If necessary, refine your search by adding more specific keywords or using search
En

operators (e.g., quotes for exact phrases).


E

10.7. What can you do once you see the results of a search?
M

Once you see the results of a search, you can:

1. Click on Links: Visit the web pages that seem most relevant to your query by clicking on the search
results.
2. Refine Your Search: Modify or narrow your search terms to find more specific information or different
results.
3. Use Filters: Apply filters (e.g., time, type of content) to narrow down the results further, depending on the
search engine.
4. Bookmark or Save: Save useful links or pages for later reference by bookmarking them or adding them to
your reading list.
5. Explore Images, Videos, or Maps: Switch to other types of content, such as images, videos, or maps, if
your search engine supports this.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 8 of 10


1st year CS - Chapter # 10
10.8. What is freeware?

Freeware refers to software that is available for use at no cost. Unlike paid software, freeware can be
downloaded, installed, and used without requiring payment. However, freeware may have limitations in terms
of features, updates, or support compared to paid versions. It is typically distributed with a license that allows
free usage but may restrict redistribution or modification. Examples include popular programs like Adobe
Acrobat Reader or VLC Media Player.

10.9. What is shareware?

Shareware is software that is distributed for free initially, but with the expectation that users will pay for it if
they find it useful. It typically comes with a trial period or limited functionality. After the trial period ends or
the limitations are reached, users are encouraged to purchase the full version to access all features or to
continue using it.

Shareware allows users to evaluate the software before committing to a purchase, and it's often distributed via

er
the internet or through software-sharing networks. Examples include programs like WinRAR or WinZip.

nt
10.10. What is an electronic mail (e-mail)? Why is it preferred by many to paper mail, telephone ad
fax services?

Electronic Mail (E-mail):


Ce
ish
E-mail is a system for sending and receiving messages electronically over the internet. It allows users to
exchange text, images, files, and links quickly and efficiently between devices. An e-mail address typically
gl

consists of a username and a domain name, like username@[Link].


En

Why E-mail is Preferred Over Paper Mail, Telephone, and Fax Services:

1. Speed: E-mail is instantaneous, allowing messages to be sent and received within seconds, unlike paper
E

mail, which can take days, and telephone or fax, which may involve waiting for connections or busy
M

lines.
2. Cost-Effective: E-mail is free or very low-cost compared to traditional paper mail, telephone calls, or
fax services, especially for long-distance or international communication.
3. Convenience: E-mail can be accessed anytime from anywhere using internet-connected devices, while
paper mail requires physical delivery, and phone or fax services depend on specific devices or lines.
4. Efficiency: E-mails can carry large attachments and be sent to multiple recipients simultaneously,
saving time compared to faxing or mailing individual copies.
5. Environmentally Friendly: E-mail reduces paper usage, making it a more eco-friendly alternative to
paper mail.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 9 of 10


1st year CS - Chapter # 10
10.11. What is a newsgroup? How is it useful?

Newsgroup:

A newsgroup is an online discussion forum where users can post messages, share information, and engage in
discussions on specific topics. Newsgroups are organized by subject matter and are part of a broader network
known as Usenet. They allow users to exchange ideas, ask questions, and provide answers or insights on a
wide range of subjects.

How Newsgroups Are Useful:

1. Information Sharing: Newsgroups provide a platform for sharing knowledge, news, and opinions on
specialized topics, from technical discussions to hobbies or academic subjects.
2. Community Engagement: They facilitate interaction between people with similar interests, helping
users build connections and learn from each other.

er
3. Problem-Solving: Newsgroups are valuable for seeking advice or solutions to technical or practical

nt
problems, as experienced members often provide helpful answers.

solutions to similar issues. Ce


4. Archive of Discussions: Past discussions in newsgroups are archived, so users can refer to old posts and

5. Free Access: Most newsgroups are free to access, making them a cost-effective resource for exchanging
ish
ideas or gaining support on various topics.
gl

10.12. Differentiate between moderated and non-moderated newsgroups.


En

Feature Moderated Newsgroups Non-Moderated Newsgroups


E

Posts are reviewed and approved by a Posts are published immediately without
Post Approval
moderator. review.
M

Content Quality Higher quality due to moderation. Varies; may include spam or irrelevant content.

Speed of Posting Delays in posting due to moderation. Immediate posting of messages.

Control Over Moderator controls content based on Content is managed by group members or self-
Content guidelines. regulation.

Advantages Better organization, reduced spam. Greater freedom of expression, fast interaction.

Potential delays, possible bias in content


Disadvantages Disorganized discussions, potential for spam.
filtering.

Prepared by: Aqib Ilyas (BSCS, SMIU) Page 10 of 10

You might also like