0% found this document useful (0 votes)
6 views59 pages

MTL CSC 111

This document provides an overview of computers and computer science, defining key concepts such as data, information, and programs. It covers the history of computers, their advantages and limitations, and the fundamental operations and components of computer systems. Additionally, it discusses the evolution of computers through various generations, highlighting technological advancements from early devices to modern electronic systems.

Uploaded by

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

MTL CSC 111

This document provides an overview of computers and computer science, defining key concepts such as data, information, and programs. It covers the history of computers, their advantages and limitations, and the fundamental operations and components of computer systems. Additionally, it discusses the evolution of computers through various generations, highlighting technological advancements from early devices to modern electronic systems.

Uploaded by

emmamoyin384
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 59

MASTERMIND TUTORIAL LIMITED (MTL CSC 101/111)

LECTURE 1

Defining Computers and Computer Science

 What is a Computer?
o A programmable electronic device capable of performing mathematical, logical,
and graphical manipulations.
o Operates under the control of stored instructions and processes data from input to
output.
 What is Computer Science?
o The study of computers and computing, including theoretical foundations,
hardware, software, and their application in processing information.

3. Data, Information, and Programs

 Data: Raw facts, figures, and symbols (e.g., unordered lists of student names and marks).
 Information: Processed data that is organized and presented in a meaningful way (e.g.,
sorted lists, calculated totals and averages).
 Program: A set of instructions that directs a computer to perform specific tasks.

4. History of Computers

 Human Computers:
o Originally, "computers" were people skilled in mathematical calculations.
 Early Calculation Devices:
o Tally Sticks: Ancient tools for recording numbers, quantities, or messages.
o Abacus: A mechanical device used for performing mathematical calculations.
o Napier’s Bones: Invented in 1614 by John Napier, these rods aided in
multiplication, division, and computing square/cube roots.
 Assignments Mentioned:
o Write a short note on several historical devices (Slide Rule, Pascaline, Stepped
Reckoner, Jacquard Loom, Arithmometer, Difference Engine, and Analytical
Engine), including their years of invention and their uses.
o Explore the history of computer generations.

5. Impact and Comparison

1
 Discussion Topics:
o Impact of Computers on Society: How computers have transformed work,
communication, and everyday life.
o Computers vs. Humans: A comparison highlighting the strengths of computers
(speed, accuracy, storage, automation) against human capabilities, while noting
that computers cannot think or feel.

6. Advantages of Computers

 High Speed: Can perform millions of calculations per second.


 Accuracy: Executes tasks with precision.
 Large Storage: Capable of storing vast amounts of data and information.
 Automation: Can be programmed to perform complex tasks automatically.
 Diligence: Performs repetitive tasks consistently without fatigue.
 Versatility: Capable of handling both simple and complex tasks.
 Cost Effectiveness: Reduces paperwork and manual labor, leading to overall cost
savings.

7. Limitations of Computers

 Lack of Thought: Computers do not possess independent thinking or creativity.


 Absence of Emotions: They cannot experience emotions such as love or empathy.

Questions

1. What is a computer?
a) A mechanical device for writing letters
b) A programmable electronic device that processes data
c) A device that stores only images
d) A tool for manual calculations
o Answer: b) A programmable electronic device that processes data
2. What is Computer Science?
a) The study of human behavior
b) The study of cooking techniques
c) The study of computers, including their theoretical and algorithmic foundations,
hardware, software, and applications
d) The study of natural sciences only
o Answer: c) The study of computers, including their theoretical and algorithmic
foundations, hardware, software, and applications

2
3. In computing terms, what is “data”?
a) Processed information in an organized form
b) Raw facts, figures, and symbols
c) A set of instructions for the computer
d) The output produced by a computer
o Answer: b) Raw facts, figures, and symbols
4. What does “information” mean?
a) Unorganized raw data
b) Data that has been processed and organized to be meaningful
c) A type of computer program
d) Only numbers and statistics
o Answer: b) Data that has been processed and organized to be meaningful
5. What is a program?
a) A storage device for data
b) A set of instructions that enables a computer to perform a given task
c) An output produced by a computer
d) A type of hardware component
o Answer: b) A set of instructions that enables a computer to perform a given task

2. History of Computers

6. Who were the “computers” in the early days before electronic devices?
a) Automated robots
b) Specialized software programs
c) Humans trained to perform calculations
d) Abacuses
o Answer: c) Humans trained to perform calculations
7. What was the primary purpose of tally sticks in ancient times?
a) To perform complex algebra
b) To record and document numbers, quantities, or messages
c) To process digital information
d) To store images
o Answer: b) To record and document numbers, quantities, or messages
8. What is an abacus?
a) A digital storage device
b) A mechanical device used to perform mathematical calculations
c) A type of computer virus
d) A modern computer peripheral
o Answer: b) A mechanical device used to perform mathematical calculations
9. Who invented Napier’s Bones, and what was its primary use?
a) Charles Babbage; for designing computers
b) John Napier; for multiplying, dividing, and calculating square/cube roots
c) Isaac Newton; for solving physics problems
d) Alan Turing; for breaking codes

3
o Answer: b) John Napier; for multiplying, dividing, and calculating square/cube
roots
10. When was the word "computer" first recorded to refer to a person?
a) In the 18th century
b) In 1613
c) In the 20th century
d) In 1492
o Answer: b) In 1613

3. Fundamental Operations & Configuration

11. Which sequence correctly describes the fundamental operations of a computer?


a) Output, Storage, Input, Processing
b) Input, Processing, Storage, Output
c) Storage, Input, Output, Processing
d) Processing, Input, Output, Storage
o Answer: b) Input, Processing, Storage, Output
12. What does “computer configuration” refer to?
a) The color of the computer case
b) The design and construction of its hardware components
c) The software installed on the computer
d) The network settings of the computer
o Answer: b) The design and construction of its hardware components

4. Impact and Comparison

13. Which of the following is an advantage of computers?


a) They can think and feel like humans
b) They can perform tasks at high speed and with great accuracy
c) They are infallible and never require maintenance
d) They always require human intervention for every task
o Answer: b) They can perform tasks at high speed and with great accuracy
14. What advantage of computers refers to their ability to perform millions of
calculations per second?
a) Accuracy
b) High Speed
c) Versatility
d) Diligence
o Answer: b) High Speed
15. Which advantage highlights a computer’s capacity to store large volumes of data?
a) Automation
b) Storage

4
c) Cost effectiveness
d) Versatility
o Answer: b) Storage
16. Which advantage refers to a computer’s capability to perform repetitive tasks
consistently?
a) High Speed
b) Diligence
c) Versatility
d) Accuracy
o Answer: b) Diligence
17. What is one major limitation of computers mentioned in the lecture?
a) They are too fast for most applications
b) They can operate without any power supply
c) They cannot think or feel emotions
d) They are always cost-effective
o Answer: c) They cannot think or feel emotions

5. Additional Concepts

18. What best describes the impact of computers on society?


a) They increase manual labor
b) They have transformed productivity by offering high speed, accuracy, storage, and
automation
c) They are used only for simple calculations
d) They have no impact on everyday life
o Answer: b) They have transformed productivity by offering high speed, accuracy,
storage, and automation
19. Which of the following is NOT listed as an advantage of computers?
a) Versatility
b) Automation
c) Inability to feel
d) Cost effectiveness
o Answer: c) Inability to feel
20. How does the lecture define “Computer Science”?
a) As the study of computer hardware only
b) As the study of computing that covers theoretical and algorithmic foundations,
hardware, software, and their applications
c) As a branch of engineering focused solely on networking
d) As a field that deals only with programming languages
o Answer: b) As the study of computing that covers theoretical and algorithmic
foundations, hardware, software, and their applications
21. Which term describes the raw, unprocessed facts used by a computer?
a) Information
b) Data

5
c) Programs
d) Algorithms
o Answer: b) Data
22. What term is used for data that has been processed and organized in a meaningful
way?
a) Data
b) Information
c) Programs
d) Code
o Answer: b) Information
23. What is a “program” in the context of computers?
a) A storage unit for data
b) A set of instructions that tells the computer what tasks to perform
c) The hardware that executes operations
d) A type of input device
o Answer: b) A set of instructions that tells the computer what tasks to perform
24. Which of the following historical devices was used as a memory aid for numbers?
a) Abacus
b) Tally Stick
c) Napier’s Bones
d) Analytical Engine
o Answer: b) Tally Stick
25. The lecture assigns a short note on several historical devices. What is the primary
purpose of this assignment?
a) To discuss modern computer programming techniques
b) To explore the evolution of calculating devices and understand their historical context
c) To analyze computer networks
d) To design a new computer system
o Answer: b) To explore the evolution of calculating devices and understand their
historical context

Lecture 2

History of Computers

 Generations & Evolution:


o Overview of how computers evolved from early calculating devices to modern
electronic systems.
o Emphasis on historical milestones and the transition from human “computers” to
electronic devices.

3. Computer Constituents

 Hardware vs. Software:

6
o Hardware: The physical components of a computer (e.g., monitor, keyboard,
system unit).
o Software: A set of instructions that directs the hardware to perform specific tasks.
 Desktop Computer Components:
o System Unit: The core of the computer where key components reside.
o Central Processing Unit (CPU): The “brain” responsible for processing and
calculations.
o Random Access Memory (RAM): Temporarily stores data used by the CPU
while the computer is on.
o Cabling: Almost every peripheral device connects to the system unit via cables.

4. Functional Units of a Computer

 The Four Basic Units:


1. Input Unit: Receives data and instructions from the user.
2. Storage Unit: Stores data and instructions (both temporary and permanent).
3. Central Processing Unit (CPU): Processes data; includes the Arithmetic Logic
Unit (ALU) and the Control Unit.
4. Output Unit: Delivers the processed results in a desired form.
 Additional Note: Any device connected outside the CPU and working memory (e.g.,
peripherals) is considered part of the computer system.

5. Input Devices

 Definition: Peripherals that supply data and control signals to a computer.


 Examples & Types:
o Keyboard:
 Primary input device; similar to a typewriter with additional keys.
 Types: Standard (desktop), Laptop, Gaming/Multimedia, Thumb-sized,
Virtual, and Foldable.
 Keyboard Layouts: QWERTY (most common), QWERTZ (used in parts
of Europe), AZERTY (used by French speakers), and DVORAK
(alternative layout for efficiency).
 Key Categories: Function keys (F1–F12 for shortcuts), Control keys,
Keypad (for numbers and math functions), Arrow keys, and other shortcut
keys.
o Pointing Devices:
 Mouse: Primary device for moving the pointer; available as mechanical
(ball-based) or optical (laser-based).
 Trackball: A stationary alternative where the ball is rotated by hand.
 Touchpad: Commonly found on laptops.

7
 Graphic Tablet, Touchscreen, Light Pen, and Stylus: Various devices
that allow direct input via touch or drawing.
 Joystick/Gamepad: Typically used for gaming and specialized
applications.
o Imaging & Video Input Devices:
 Digital Camera & Webcam: Capture images or live video.
 Optical Scanners: Convert physical documents or images into digital
format (available as flatbed or handheld).
 3D Scanner: Collects three-dimensional data from real-world objects.
 Fingerprint Scanner & Barcode Reader: Used for security and
inventory management.
o Audio Input Devices:
 Microphone: Captures sound.
 MIDI Keyboard: Used to input musical data.

6. Output Devices

 Definition: Hardware that displays, prints, or transmits processed data.


 Examples & Key Features:
o Monitor:
 Displays visual output; similar to televisions but with higher resolution.
 Types: Monochrome (CRT-based, two-color displays), Color Monitors
(RGB displays).
 Technologies: CRT, Liquid Crystal Display (LCD), and Light-Emitting
Diode (LED).
 Key Features: Screen size (typically measured diagonally in inches),
aspect ratio (commonly 4:3 or 16:9), display resolution (e.g., 1024×768,
1280×1024), refresh rate (measured in hertz, e.g., 75Hz), and color depth
(ranging from 4-bit to 24-bit).
o Printer:
 Produces hard copies of digital data.
 Types:
 Impact Printers: (e.g., Daisy-wheel and Dot-matrix) that
physically strike the paper.
 Non-Impact Printers: (e.g., Laser, Inkjet, Thermal, and
Multifunction Printers) that use ink, toner, or heat.
 Speed Measurements: Characters per second (cps), lines per minute
(lpm), and pages per minute (ppm).
o Plotter: Specialized printer for vector graphics used in computer-aided design
(CAD); uses pens to draw lines.
o Speakers & Headphones:
 Speakers: Output sound for general use.
 Headphones: Provide personal audio output.

8
o Projector: Displays enlarged images or video on a large screen, used in
presentations and classrooms.
 Types of Projectors: CRT projectors, LCD projectors, and Digital Light
Processing (DLP) projectors.

Generations of Computers

The evolution of computers is typically divided into several generations, each marked by
significant technological breakthroughs and changes in design, performance, and application.

1. First Generation (1940s–1950s):


These early computers used vacuum tubes for circuitry and magnetic drums for memory.
They were enormous, consumed vast amounts of power, generated excessive heat, and
were programmed in machine language. Despite their limitations, first-generation
computers laid the foundation for electronic computation.
2. Second Generation (1950s–1960s):
With the advent of transistors, computers became smaller, more reliable, and energy-
efficient compared to their predecessors. Programming languages like assembly language
began to be used, and these machines started to be employed in business, scientific, and
military applications.
3. Third Generation (1960s–1970s):
The introduction of integrated circuits (ICs) revolutionized computer design. Multiple
transistors were packed onto a single chip, which led to faster processing speeds, reduced
cost, and increased reliability. High-level programming languages also emerged, making
software development more efficient.
4. Fourth Generation (1970s–Present):
The development of the microprocessor—a single chip containing the CPU—ushered in
the era of personal computers. This generation saw dramatic improvements in
performance, affordability, and accessibility. Graphical user interfaces (GUIs) and
networking capabilities became standard, transforming the computer from a specialized
tool to an everyday utility.
5. Fifth Generation (Emerging Trends):
Though still evolving, fifth-generation computers are characterized by advancements in
artificial intelligence, parallel processing, and the use of neural networks. This generation
aims to create machines that can learn and adapt, paving the way for more intuitive
human-computer interactions and smarter automation.
6.  Abacus:
A manual counting tool using beads on rods that slide to represent numbers; it has been
used for basic arithmetic for millennia, especially in Asia.
7.  Tally Sticks:
Simple wooden sticks with notches carved into them, used in ancient times to record
numerical data, transactions, or quantities as a primitive accounting method.
8.  Napier’s Bones:
Invented by John Napier in 1614, these are a set of numbered rods that, when arranged,

9
help perform multiplication, division, and extraction of roots through repeated addition
and subtraction.
9.  Slide Rule:
An analog computational tool based on logarithmic scales, used from the 17th century
until the advent of electronic calculators to perform multiplications, divisions, and more
complex functions like exponentiation.
10.  Pascaline:
Created by Blaise Pascal in the 1640s, this early mechanical calculator used a series of
interlocking gears to perform addition and subtraction, marking one of the first devices to
automate arithmetic.
11.  Stepped Reckoner:
Designed by Gottfried Wilhelm Leibniz, this mechanical calculator improved on earlier
devices by incorporating a stepped drum mechanism, enabling it to perform
multiplication and division as well as addition and subtraction.
12.  Jacquard Loom:
Developed by Joseph Marie Jacquard in 1804, this loom used punched cards to control
the weaving of complex patterns, demonstrating early ideas of programmability that
influenced later computing.
13.  Arithmometer:
A 19th-century mechanical calculator that became one of the first mass-produced devices
for performing reliable arithmetic operations in business and industry.
14.  Difference Engine:
Conceptualized by Charles Babbage, this mechanical calculator was designed to compute
polynomial functions using the method of finite differences, aimed at automating the
creation of mathematical tables.
15.  Analytical Engine:
Also proposed by Babbage, this was the first design for a general-purpose programmable
computer. It incorporated features such as a memory, a control unit, and the use of
punched cards to input instructions—foreshadowing modern computer architecture.

Questions

Early Counting and Calculation Tools

1. What is an abacus?
a) A mechanical calculator with interlocking gears
b) A manual counting tool with beads on rods
c) A device that uses punched cards for calculations
d) A slide-based logarithmic tool
o Answer: b) A manual counting tool with beads on rods
2. Tally sticks were primarily used for:
a) Recording numbers and quantities through notches
b) Multiplying large numbers using rods
c) Automating arithmetic operations
d) Encrypting secret messages
o Answer: a) Recording numbers and quantities through notches

10
3. Napier’s Bones are best described as:
a) A set of rods with numbers used to aid in multiplication and division
b) An early form of abacus used in Asia
c) A precursor to the slide rule using logarithms
d) A mechanical calculator that used gears
o Answer: a) A set of rods with numbers used to aid in multiplication and division
4. In what year were Napier’s Bones invented?
a) 1614
b) 1492
c) 1701
d) 1804
o Answer: a) 1614

2. Analog Computing Tools

5. The slide rule is an analog tool based on:


a) Mechanical gears and drums
b) Logarithmic scales for performing multiplication and division
c) Electrical circuits
d) Punched cards
o Answer: b) Logarithmic scales for performing multiplication and division
6. Slide rules were widely used until the introduction of:
a) Vacuum tubes
b) Electronic calculators
c) Transistors
d) Microprocessors
o Answer: b) Electronic calculators

3. Mechanical Calculators

7. Who invented the Pascaline?


a) Gottfried Wilhelm Leibniz
b) Charles Babbage
c) Blaise Pascal
d) Joseph Marie Jacquard
o Answer: c) Blaise Pascal
8. The Pascaline was primarily designed to perform:
a) Multiplication and division
b) Addition and subtraction
c) Complex algebraic functions
d) Graphical computations
o Answer: b) Addition and subtraction

11
9. Which device introduced a stepped drum mechanism to improve calculations?
a) Napier’s Bones
b) Pascaline
c) Stepped Reckoner
d) Arithmometer
o Answer: c) Stepped Reckoner
10. The Stepped Reckoner, designed by Leibniz, could perform:
a) Only addition
b) Addition, subtraction, multiplication, and division
c) Logical operations
d) Data storage
o Answer: b) Addition, subtraction, multiplication, and division

4. Inventions Influencing Programmability

11. What is the Jacquard Loom known for?


a) Being the first mechanical calculator
b) Using punched cards to control weaving patterns
c) Automating arithmetic computations
d) Implementing the first electronic circuit
o Answer: b) Using punched cards to control weaving patterns
12. How did the Jacquard Loom influence later computers?
a) It introduced the concept of data storage in magnetic tapes
b) It demonstrated early programmability through the use of punched cards
c) It invented the microprocessor
d) It was the first device to use binary code
o Answer: b) It demonstrated early programmability through the use of punched
cards
13. Which of the following devices is considered one of the first mass-produced
mechanical calculators?
a) Abacus
b) Pascaline
c) Arithmometer
d) Analytical Engine
o Answer: c) Arithmometer
14. In which century was the Arithmometer introduced?
a) 16th century
b) 17th century
c) 18th century
d) 19th century
o Answer: d) 19th century

12
5. Pioneering Computing Machines

15. Who conceptualized the Difference Engine?


a) Blaise Pascal
b) Charles Babbage
c) Gottfried Wilhelm Leibniz
d) Alan Turing
o Answer: b) Charles Babbage
16. The primary purpose of the Difference Engine was to:
a) Automate printing
b) Compute polynomial functions using finite differences
c) Weave textiles with patterns
d) Encode secret messages
o Answer: b) Compute polynomial functions using finite differences
17. What distinguishes the Analytical Engine from the Difference Engine?
a) It was designed to perform only addition and subtraction
b) It was the first general-purpose programmable computer concept
c) It used vacuum tubes instead of gears
d) It was a purely analog device
o Answer: b) It was the first general-purpose programmable computer concept
18. Which of the following was a key feature of the Analytical Engine?
a) Use of magnetic storage
b) Incorporation of a memory unit and control unit with punched card programming
c) Operation based on steam power
d) Utilization of binary arithmetic exclusively
o Answer: b) Incorporation of a memory unit and control unit with punched card
programming

6. Terminology and Evolution

19. Originally, the term "computer" referred to:


a) An electronic device
b) A human who performed calculations
c) A mechanical calculator
d) A programming language
o Answer: b) A human who performed calculations
20. The evolution of computing is divided into generations. Which generation
introduced the microprocessor?
a) First Generation
b) Second Generation
c) Third Generation
d) Fourth Generation
o Answer: d) Fourth Generation

13
21. First-generation computers were characterized by the use of:
a) Transistors
b) Integrated circuits
c) Vacuum tubes
d) Microprocessors
o Answer: c) Vacuum tubes
22. Second-generation computers replaced vacuum tubes with:
a) Optical fibers
b) Transistors
c) Integrated circuits
d) Punched cards
o Answer: b) Transistors
23. Which generation of computers saw the widespread use of high-level programming
languages?
a) First Generation
b) Second Generation
c) Third Generation
d) Fifth Generation
o Answer: c) Third Generation
24. The concept of programmability through punched cards was first demonstrated by:
a) The Pascaline
b) Napier’s Bones
c) The Jacquard Loom
d) The Difference Engine
o Answer: c) The Jacquard Loom

7. Impact and Legacy

25. Which invention is credited with laying the conceptual foundation for modern
computers by introducing programmability?
a) Abacus
b) Analytical Engine
c) Slide Rule
d) Arithmometer
o Answer: b) Analytical Engine
26. The Stepped Reckoner was significant because it:
a) Was the first device to use punched cards
b) Improved mechanical calculation with its stepped drum design
c) Was the first electronic computer
d) Used binary code for computations
o Answer: b) Improved mechanical calculation with its stepped drum design
27. Which invention used logarithmic scales to simplify complex calculations before
electronic calculators became common?
a) Napier’s Bones

14
b) Slide Rule
c) Pascaline
d) Abacus
o Answer: b) Slide Rule
28. What common feature did both the Difference Engine and the Analytical Engine
share?
a) They were both built using transistors
b) They both used punched cards for programming
c) They both aimed to automate mathematical computations
d) They were both mass-produced commercial products
o Answer: c) They both aimed to automate mathematical computations
29. How did early computing devices like the abacus and tally sticks contribute to
modern computing?
a) They introduced the concept of binary arithmetic
b) They established early methods for counting and data recording
c) They directly led to the development of the microprocessor
d) They were used as storage devices in modern computers
o Answer: b) They established early methods for counting and data recording
30. The historical evolution of computing devices demonstrates a continuous trend
toward:
a) Larger, less efficient machines
b) Increasing manual intervention in calculations
c) Greater automation, efficiency, and programmability
d) Reliance solely on human computation
o Answer: c) Greater automation, efficiency, and programmability

LECTURE 3

COMPUTER HARDWARE

Computer Hardware
 Definition: The physical components of a computer.
 Architecture/Configuration: The design and structure of hardware.
 Categories of Hardware:
1. Central Processing Unit (CPU)
2. Main Memory
3. Peripheral Devices (External hardware like printers, scanners).

Functional Units of a Computer

A computer has four primary functional units:

1. Input Unit – Receives data from the user.


2. Storage Unit – Stores data temporarily or permanently.

15
3. Central Processing Unit (CPU) – Processes data.
o Includes Arithmetic Logic Unit (ALU) and Control Unit.
4. Output Unit – Displays the results of processing.

Major Functions of a Computer

 Accepts input data.


 Stores data and instructions.
 Processes data.
 Controls all operations.
 Produces output/results.

3. Input Devices
 Devices used to enter data into the computer.

Examples of Input Devices

1. Keyboard – The most common input device.


2. Mouse – A pointing device used for navigation.
3. Touchscreen – Allows direct interaction via touch.
4. Graphic Tablet – Used for drawing and sketching.
5. Microphone – Captures audio input.
6. Scanner – Converts physical documents into digital form.

Types of Keyboards

 Standard Keyboard – 101 or 104 keys.


 Laptop Keyboard – Compact version with fewer keys.
 Gaming Keyboard – Designed for gaming with extra controls.
 Thumb-sized Keyboard – Small keyboards for mobile devices.
 Virtual Keyboard – Software-based keyboard.
 Foldable Keyboard – Portable and flexible for travel.

Keyboard Layouts

 QWERTY – Most common layout.


 QWERTZ – Used in Germany, Hungary, and the Czech Republic.
 AZERTY – Used in France and some parts of Europe.
 DVORAK – Alternative to QWERTY with reduced finger movement.

16
4. Pointing Devices
 Definition: Devices used to control cursor movement.

Types of Pointing Devices

1. Mouse – Moves cursor on screen.


o Mechanical Mouse – Uses a rolling ball.
o Optical Mouse – Uses laser for movement.
2. Trackball – A stationary mouse alternative.
3. Touchpad – Used in laptops for finger movement.
4. Graphic Tablet – Used for digital drawing.
5. Touchscreen – Allows direct screen interaction.
6. Light Pen – Used for selecting items on a screen.
7. Stylus – Pen-like device for digital input.

5. Imaging and Video Input Devices


 Used to capture images or videos and convert them into digital format.

Examples

1. Digital Camera – Stores images in digital format.


2. Webcam – Captures live video.
3. Optical Scanner – Converts physical documents into digital form.
4. 3D Scanner – Captures object shapes in three dimensions.
5. Fingerprint Scanner – Used for biometric authentication.
6. Barcode Reader – Scans product barcodes.

6. Audio Input Devices


 Used to capture and process sound.

Examples

1. Microphone – Converts sound waves into digital signals.


2. MIDI Keyboard – Used for creating digital music.

17
7. Output Devices
 Devices that display or output processed data.

Examples of Output Devices

1. Monitor – Displays visual data.


2. Printer – Produces physical (hard copy) output.
3. Speakers – Produces sound.
4. Projector – Enlarges and displays content on a larger screen.

Types of Monitors

1. Monochrome Monitor – Displays two colors.


2. Color Monitor – Can display millions of colors.
3. Cathode Ray Tube (CRT) Monitor – Old bulky monitors.
4. Liquid Crystal Display (LCD) Monitor – Thin and energy-efficient.
5. Light-Emitting Diode (LED) Monitor – Improved LCD with better contrast.

Monitor Features

 Screen Size – Measured diagonally in inches.


 Aspect Ratio – Common ratios are 4:3 and 16:9.
 Display Resolution – The clarity of the display (e.g., 1024×768 pixels).
 Refresh Rate – Measured in Hz (higher is better for reducing flickering).
 Color Depth – Number of colors a monitor can display.

8. Printers
 Devices used to produce hard copies of digital data.

Types of Printers

1. Impact Printers – Use mechanical force to print.


o Daisy-Wheel Printer – Similar to typewriters.
o Dot-Matrix Printer – Uses ink ribbon and pins.
2. Non-Impact Printers – Use ink or toner.
o Laser Printer – Uses toner for high-speed printing.
o Inkjet Printer – Uses liquid ink to print.
o Thermal Printer – Uses heat-sensitive paper.

Printer Speed Measurements

18
 CPS (Characters per second)
 LPM (Lines per minute)
 PPM (Pages per minute)

9. Plotters
 Definition: Used for printing vector graphics (e.g., architectural drawings).
 Difference from Printers: Uses pens to draw lines instead of spraying ink.

10. Audio Output Devices


 Examples:
1. Speakers – Produce sound output.
2. Headphones – Provide personal sound output.

11. Projectors
 Definition: Display computer output on a larger screen.

Types of Projectors

1. Cathode Ray Tube (CRT) Projector – Uses three CRTs (Red, Green, Blue).
2. Liquid Crystal Display (LCD) Projector – Uses liquid crystal panels.
3. Digital Light Processing (DLP) Projector – Uses micro mirrors for better quality.

Output Devices
 Definition: Hardware that displays or outputs processed data from a computer.
 Examples: Monitor, Printer, Speakers, Projector.

Types of Output Devices

1. Monitor – Displays visual output from the computer.


2. Printer – Converts digital documents into physical copies.
3. Speakers – Outputs sound from the computer.
4. Projector – Enlarges and displays content on a screen.

19
2. Monitors (Display Devices)
Types of Monitors

1. Monochrome Monitor – Displays two colors (e.g., black & white, green & black).
2. Color Monitor (RGB Monitor) – Displays up to millions of colors.
3. Cathode Ray Tube (CRT) Monitor – Old, bulky monitor type.
4. Liquid Crystal Display (LCD) Monitor – Uses liquid crystals for better energy
efficiency.
5. Light-Emitting Diode (LED) Monitor – Improved LCD with higher contrast and better
viewing angles.

Monitor Features

 Screen Size: Measured diagonally in inches (e.g., 14-25 inches).


 Aspect Ratio: Ratio of screen width to height (Common ratios: 4:3 and 16:9).
 Display Resolution: Number of pixels on the screen (e.g., 1024×768, 1280×1024).
 Refresh Rate: Number of times per second the screen updates (measured in Hz).
 Color Depth: Number of colors a monitor can display.
o 4-bit (EGA): 16 colors.
o 8-bit (VGA): 256 colors.
o 16-bit (High Color): 65,536 colors.
o 24-bit (True Color): 16 million colors.

3. Printers
 Definition: A device that prints digital data on paper.

Types of Printers

Impact Printers (Use mechanical force to print)

1. Daisy-Wheel Printer – Prints using a rotating wheel.


2. Dot-Matrix Printer – Prints using a set of pins striking an ink ribbon.

Non-Impact Printers (No physical impact)

1. Laser Printer (Toner-based) – Uses laser technology for high-quality text and graphics.
2. Inkjet Printer – Sprays liquid ink onto paper.
3. Thermal Printer (Inkless) – Uses heat-sensitive paper.

Printer Speed Measurement

20
 Characters per Second (CPS)
 Lines per Minute (LPM)
 Pages per Minute (PPM)

4. Plotters
 Definition: A specialized printer used for printing vector graphics (e.g., architectural
designs).
 Difference from printers: Uses pens to draw lines instead of ink.

5. Audio Output Devices


1. Speakers – Produce sound output for music, alerts, or spoken text.
2. Headphones – Personal audio device for individual listening.

6. Projectors
 Definition: Displays computer output on a larger screen.
 Used in: Meetings, presentations, classrooms.

Types of Projectors

1. Cathode Ray Tube (CRT) Projector – Uses three CRTs (Red, Green, Blue).
2. Liquid Crystal Display (LCD) Projector – Uses liquid crystal panels.
3. Digital Light Processing (DLP) Projector – Uses tiny mirrors to reflect light.

Questions

1. What is computer hardware?


a) The set of instructions that tell a computer what to do
b) The physical components of a computer
c) A type of software
d) A type of programming language
o Answer: b) The physical components of a computer
2. Which of the following is NOT a major category of computer hardware?
a) Input devices
b) Storage devices

21
c) Web browsers
d) Output devices
o Answer: c) Web browsers
3. Which part of the computer is responsible for processing data?
a) Monitor
b) Central Processing Unit (CPU)
c) Hard Disk Drive (HDD)
d) RAM
o Answer: b) Central Processing Unit (CPU)
4. What are the two main components of the CPU?
a) Monitor and Keyboard
b) Arithmetic Logic Unit (ALU) and Control Unit (CU)
c) RAM and ROM
d) Hard Drive and SSD
o Answer: b) Arithmetic Logic Unit (ALU) and Control Unit (CU)
5. Which of the following is NOT an example of computer hardware?
a) Printer
b) Operating System
c) Motherboard
d) RAM
o Answer: b) Operating System

2. Input Devices
6. What is the function of an input device?
a) Displays information on a screen
b) Stores data permanently
c) Allows the user to enter data into the computer
d) Connects computers to the internet
o Answer: c) Allows the user to enter data into the computer
7. Which of the following is NOT an input device?
a) Keyboard
b) Mouse
c) Monitor
d) Scanner
o Answer: c) Monitor
8. Which input device is used to enter alphanumeric data?
a) Joystick
b) Scanner
c) Keyboard
d) Webcam
o Answer: c) Keyboard
9. Which input device uses a light-sensitive sensor to scan images or documents?
a) Mouse
22
b) Scanner
c) Touchpad
d) Gamepad
o Answer: b) Scanner
10. Which of these is a biometric input device?
a) Microphone
b) Fingerprint scanner
c) Projector
d) Hard drive

 Answer: b) Fingerprint scanner

3. Pointing Devices
11. Which of the following is an example of a pointing device?
a) Speaker
b) Mouse
c) Printer
d) RAM

 Answer: b) Mouse

12. Which pointing device is commonly used in laptops instead of a mouse?


a) Trackball
b) Touchpad
c) Stylus
d) Joystick

 Answer: b) Touchpad

13. What is the function of a trackball?


a) To display images
b) To scan documents
c) To move a pointer by rotating a stationary ball
d) To print documents

 Answer: c) To move a pointer by rotating a stationary ball

14. Which pointing device is used for digital drawing and sketching?
a) Scanner
b) Graphic tablet
c) Microphone
d) Joystick

23
 Answer: b) Graphic tablet

15. Which pointing device is often used for gaming?


a) Touchscreen
b) Mouse
c) Gamepad
d) Light pen

 Answer: c) Gamepad

4. Imaging and Video Input Devices


16. Which of the following is an example of an imaging input device?
a) Printer
b) Webcam
c) Speaker
d) Projector

 Answer: b) Webcam

17. Which input device is used to capture three-dimensional images of objects?


a) Optical scanner
b) 3D scanner
c) Barcode reader
d) Stylus

 Answer: b) 3D scanner

18. Which device captures video input and allows for live streaming?
a) Printer
b) Webcam
c) Trackball
d) Stylus

 Answer: b) Webcam

19. Which device scans barcodes and converts them into digital data?
a) Digital camera
b) Barcode reader
c) Microphone
d) Joystick

 Answer: b) Barcode reader

24
20. What type of scanner is commonly used at retail stores?
a) 3D scanner
b) Flatbed scanner
c) Barcode scanner
d) Optical scanner

 Answer: c) Barcode scanner

5. Audio Input Devices


21. What is the primary function of a microphone?
a) To record audio input
b) To print text documents
c) To process data
d) To display images

 Answer: a) To record audio input

22. Which of the following is a musical input device?


a) MIDI keyboard
b) Joystick
c) Trackball
d) Webcam

 Answer: a) MIDI keyboard

23. Which device is used for voice recognition technology?


a) Monitor
b) Speaker
c) Microphone
d) Projector

 Answer: c) Microphone

6. Output Devices
24. What is the primary function of an output device?
a) To enter data into a computer
b) To process information
c) To display, print, or transmit the results of processing
d) To store data permanently

25
 Answer: c) To display, print, or transmit the results of processing

25. Which of the following is NOT an output device?


a) Monitor
b) Printer
c) Keyboard
d) Speaker

 Answer: c) Keyboard

26. Which type of monitor is the oldest technology?


a) LCD
b) LED
c) CRT
d) OLED

 Answer: c) CRT

27. Which of these printers uses heat-sensitive paper?


a) Inkjet printer
b) Laser printer
c) Thermal printer
d) Dot-matrix printer

 Answer: c) Thermal printer

28. Which type of output device projects a computer screen onto a larger surface?
a) Monitor
b) Projector
c) Printer
d) Speaker

 Answer: b) Projector

29. Which of the following is a feature of an LED monitor?


a) Low contrast ratio
b) High power consumption
c) Higher contrast and better viewing angles than LCD
d) Uses a cathode ray tube

 Answer: c) Higher contrast and better viewing angles than LCD

30. Which device converts digital sound signals into audio output?
a) Projector
b) Printer

26
c) Speaker
d) Scanner

LECTURE 4

Introduction to Software
 Definition: A set of programs that instructs the computer to perform tasks.
 Hardware & software complement each other to produce meaningful results.
 Two main types of software:
1. System Software (Operating Systems, Compilers, Device Drivers)
2. Application Software (Word processors, Spreadsheets, Database Software)

3. System Software
 Definition: Controls and manages hardware and system operations.
 Functions:
o Manages memory, peripherals, files.
o Provides an interface between application programs and the computer.
 Examples: MS-DOS, UNIX.

Operating System (OS)

 Definition: Software that controls all other software and hardware.


 Functions:
o Loads and runs application programs.
o Allocates memory and processor time.
o Provides input & output management.
o Manages system files.
o Provides security and authentication.

Types of Operating Systems

1. Multi-user OS: Allows multiple users at different times.


2. Multiprocessing OS: Uses multiple processors.
3. Multitasking OS: Runs multiple applications at the same time.
4. Multithreading OS: Runs different parts of a program simultaneously.

27
4. Programming Languages
 Definition: A set of rules and symbols used to create software.
 Types of Programming Languages:
1. Machine Language - Direct binary code.
2. Low-Level Language - Assembly language.
3. High-Level Language - Java, Python, C++, etc.

Language Translators

 Assemblers: Convert assembly language to machine code.


 Compilers: Convert high-level language into machine language.
 Interpreters: Convert and execute high-level language line by line.

Compilation vs Interpretation

Feature Compilation Interpretation


Speed Faster Slower
Error Detection Before execution During execution
Flexibility Less flexible More flexible

5. Utility Software
 Definition: Helps maintain and optimize a computer system.
 Examples:
o File conversion (changing file format).
o File copying.
o Housekeeping operations (cleaning up storage).

6. Application Software
 Definition: Programs designed for users to perform specific tasks.
 Examples:
o Word Processing Software (MS Word, Notepad).
o Spreadsheet Software (MS Excel).
o Database Management Systems (MS Access).
o Graphics Software (Photoshop).

Definition of Storage Devices

28
A storage device is any hardware component that is used to store, retrieve, and manage digital
data. Storage devices retain data either temporarily (volatile storage) or permanently (non-
volatile storage).

Types of Storage Devices


Storage devices are categorized based on their functionality and technology:

1. Primary Storage (Volatile Memory)

 Directly accessible by the CPU.


 Loses data when the computer is turned off.
 Used for temporary storage and processing.

a) Random Access Memory (RAM)

 Definition: A volatile memory that temporarily holds data and programs that the CPU is
currently using.
 Types:
o Static RAM (SRAM): Faster, used for cache memory.
o Dynamic RAM (DRAM): Slower, used for main memory.
 Purpose: Provides quick read/write access to running programs.

b) Cache Memory

 Definition: A small, high-speed memory located close to the CPU.


 Function: Stores frequently accessed data to improve processing speed.

c) Register Memory

 Definition: Small storage locations inside the CPU.


 Purpose: Holds instructions and addresses for quick execution.

d) Read-Only Memory (ROM)

 Definition: Non-volatile memory that stores firmware.


 Types:
o PROM (Programmable ROM): Can be written once.
o EPROM (Erasable PROM): Can be erased and rewritten using UV light.
o EEPROM (Electrically Erasable PROM): Can be erased and rewritten
electronically.
 Function: Stores BIOS and booting instructions.

29
2. Secondary Storage (Non-Volatile Memory)

 Used for long-term data storage.


 Retains data even when the computer is turned off.

a) Hard Disk Drive (HDD)

 Definition: A magnetic storage device that stores and retrieves digital data.
 Components:
o Platter: Circular disks where data is stored.
o Read/Write Head: Reads and writes data.
o Spindle: Rotates the platters.
 Advantages: Large storage capacity, cost-effective.
 Disadvantages: Slower than SSDs, prone to mechanical failures.

b) Solid State Drive (SSD)

 Definition: A modern storage device that uses flash memory instead of moving parts.
 Types:
o SATA SSD: Slower but affordable.
o NVMe SSD: Faster, uses PCIe connection.
 Advantages: Faster, durable, energy-efficient.
 Disadvantages: More expensive than HDDs.

c) External Hard Drive

 Definition: A portable storage device used for backup and data transfer.
 Advantages: Portable, large storage capacity.
 Disadvantages: More expensive than internal drives.

d) Optical Discs (CD/DVD/Blu-ray)

 Definition: Use laser technology to read/write data.


 Types:
o CD (Compact Disc): Stores up to 700 MB.
o DVD (Digital Versatile Disc): Stores up to 4.7 GB (single-layer) or 8.5 GB
(dual-layer).
o Blu-ray Disc: Stores up to 25 GB (single-layer) or 50 GB (dual-layer).
 Advantages: Good for media storage.
 Disadvantages: Easily scratched, limited rewrites.

e) USB Flash Drive (Pen Drive)

 Definition: A small, portable device that uses flash memory.

30
 Advantages: Compact, durable, easy to use.
 Disadvantages: Limited lifespan, small storage compared to HDDs.

f) Memory Card (SD Card)

 Definition: A small storage device used in cameras, smartphones, and tablets.


 Types: SD, microSD, SDHC, SDXC.
 Advantages: Portable, used in mobile devices.
 Disadvantages: Limited storage capacity, easily lost.

g) Magnetic Tape

 Definition: A storage medium using a magnetized strip of plastic tape.


 Uses: Used for backup in large-scale data storage (e.g., servers).
 Advantages: High durability, large storage.
 Disadvantages: Slow access time.

3. Cloud Storage

 Definition: A remote storage service that allows users to store data online.
 Examples: Google Drive, Dropbox, OneDrive, iCloud.
 Advantages: Accessible from anywhere, secure backups.
 Disadvantages: Requires internet access, potential security risks.

Comparison of Storage Devices

Storage Type Speed Capacity Volatility Cost Durability


RAM Very Fast Low Volatile High Low
HDD Slow High Non-Volatile Low Medium
SSD Very Fast High Non-Volatile High High
Optical Discs Slow Low-Medium Non-Volatile Low Low
USB Flash Drive Medium Low-Medium Non-Volatile Medium High
Cloud Storage Variable Unlimited Non-Volatile Subscription-based High

Questions on computer software

Introduction to Software
1. What is software?
a) A physical component of a computer
b) A set of programs that instructs the hardware
31
c) A type of input device
d) A computer virus
o Answer: b) A set of programs that instructs the hardware
2. Which of the following is NOT a category of computer software?
a) System Software
b) Application Software
c) Hardware Software
d) Programming Software
o Answer: c) Hardware Software
3. Which of the following statements is true?
a) Hardware and software function independently.
b) Software is unnecessary for hardware to operate.
c) Hardware and software must work together.
d) Software is always built into the hardware.
o Answer: c) Hardware and software must work together.

2. System Software
4. Which software manages hardware and allows applications to run?
a) System Software
b) Application Software
c) Programming Software
d) Web Browser
o Answer: a) System Software
5. Which of the following is an example of system software?
a) Microsoft Word
b) Linux
c) Photoshop
d) Google Chrome
o Answer: b) Linux
6. Which of the following is NOT a function of an operating system?
a) Managing memory
b) Controlling input and output devices
c) Running application software
d) Designing graphics
o Answer: d) Designing graphics
7. Which of these is NOT a type of operating system?
a) Multi-user
b) Multithreading
c) Multiprocessing
d) Database
o Answer: d) Database
8. Which operating system is commonly used in mobile devices?
a) Windows
32
b) MacOS
c) Android
d) UNIX
o Answer: c) Android
9. Which of the following is a function of an operating system?
a) Managing files and directories
b) Browsing the internet
c) Editing videos
d) Creating presentations
o Answer: a) Managing files and directories

3. Programming Languages & Translators


10. What is a programming language?
a) A software that creates documents
b) A set of rules for instructing a computer
c) A type of computer virus
d) A storage device

 Answer: b) A set of rules for instructing a computer

11. Which of the following is NOT a high-level programming language?


a) Java
b) C++
c) Assembly
d) Python

 Answer: c) Assembly

12. Which software converts high-level code into machine language?


a) Assembler
b) Compiler
c) Debugger
d) Web Browser

 Answer: b) Compiler

13. Which translator executes code line by line?


a) Compiler
b) Interpreter
c) Assembler
d) Debugger

 Answer: b) Interpreter
33
14. Which of the following is an example of a compiled programming language?
a) Python
b) JavaScript
c) C++
d) HTML

 Answer: c) C++

15. What does an assembler do?


a) Converts high-level code to machine code
b) Converts assembly language into machine code
c) Runs programs without compiling them
d) Helps design graphics

 Answer: b) Converts assembly language into machine code

4. Utility Software
16. Which of the following is a utility software?
a) Microsoft Excel
b) Disk Cleanup
c) Mozilla Firefox
d) Photoshop

 Answer: b) Disk Cleanup

17. What is the main purpose of utility software?


a) To create spreadsheets
b) To help manage system resources
c) To browse the internet
d) To design graphics

 Answer: b) To help manage system resources

18. Which of the following is NOT a type of utility software?


a) Disk Defragmenter
b) Antivirus
c) Word Processor
d) File Compression

 Answer: c) Word Processor

34
5. Application Software
19. What is application software used for?
a) Managing hardware
b) Running system utilities
c) Performing specific tasks for users
d) Controlling memory

 Answer: c) Performing specific tasks for users

20. Which of the following is NOT an application software?


a) Spreadsheet software
b) Database software
c) Operating system
d) Web browser

 Answer: c) Operating system

21. Which software is used for document creation?


a) Spreadsheet software
b) Word processor
c) Database management system
d) Operating system

 Answer: b) Word processor

22. Which of the following is an example of database software?


a) Microsoft Word
b) Microsoft Excel
c) Microsoft Access
d) Adobe Photoshop

 Answer: c) Microsoft Access

23. Which software is used for making presentations?


a) PowerPoint
b) Photoshop
c) SQL Server
d) Notepad

 Answer: a) PowerPoint

6. Storage Devices
35
24. Which of the following is a non-volatile storage device?
a) RAM
b) ROM
c) Cache Memory
d) Register

 Answer: b) ROM

25. Which storage device has the fastest data access speed?
a) Hard Disk Drive (HDD)
b) Solid-State Drive (SSD)
c) USB Flash Drive
d) Optical Disc

 Answer: b) Solid-State Drive (SSD)

Questions on storage device

1. What is a storage device?


a) A device that inputs data into a computer
b) A device that processes data
c) A device that stores, retrieves, and manages digital data
d) A device that outputs data
o Answer: c) A device that stores, retrieves, and manages digital data
2. Which of the following is NOT a type of storage device?
a) Primary storage
b) Secondary storage
c) Peripheral storage
d) Cloud storage
o Answer: c) Peripheral storage
3. Which of the following storage types is volatile?
a) Hard disk drive
b) Random Access Memory (RAM)
c) Solid-state drive
d) USB flash drive
o Answer: b) Random Access Memory (RAM)

2. Primary Storage (Volatile Memory)


4. Which of the following is an example of primary storage?
a) Hard Disk Drive (HDD)
b) Solid-State Drive (SSD)
c) Random Access Memory (RAM)
d) USB Flash Drive
36
o Answer: c) Random Access Memory (RAM)
5. What is the purpose of RAM?
a) To store data permanently
b) To store frequently accessed data for quick retrieval
c) To store the operating system permanently
d) To provide an interface between the CPU and monitor
o Answer: b) To store frequently accessed data for quick retrieval
6. Which type of memory is used to store firmware?
a) RAM
b) ROM
c) Cache memory
d) Hard disk
o Answer: b) ROM
7. Which of the following is the fastest type of memory?
a) RAM
b) Hard Disk Drive (HDD)
c) Solid-State Drive (SSD)
d) Cache Memory
o Answer: d) Cache Memory
8. Which type of memory is directly accessible by the CPU?
a) ROM
b) Secondary storage
c) Cache memory
d) Optical disc
o Answer: c) Cache memory

3. Secondary Storage (Non-Volatile Memory)


9. Which of the following is NOT a secondary storage device?
a) Hard disk drive
b) USB flash drive
c) Cache memory
d) DVD
o Answer: c) Cache memory
10. Which storage device is typically used for backup purposes?
a) RAM
b) Magnetic tape
c) Cache memory
d) Registers

 Answer: b) Magnetic tape

11. Which of the following storage devices has the largest capacity?
a) CD
37
b) DVD
c) Blu-ray Disc
d) Hard Disk Drive (HDD)

 Answer: d) Hard Disk Drive (HDD)

12. Which of the following is the major disadvantage of HDDs?


a) Expensive
b) Slow access speed due to moving parts
c) Low storage capacity
d) Incompatibility with operating systems

 Answer: b) Slow access speed due to moving parts

13. Which secondary storage device uses flash memory?


a) Hard Disk Drive (HDD)
b) Solid-State Drive (SSD)
c) Magnetic Tape
d) CD-ROM

 Answer: b) Solid-State Drive (SSD)

14. Which of the following storage devices is NOT portable?


a) USB Flash Drive
b) Hard Disk Drive
c) Solid-State Drive
d) RAM

 Answer: d) RAM

15. Which of these storage devices is typically used in digital cameras and smartphones?
a) USB flash drive
b) SD card
c) External HDD
d) Optical disc

 Answer: b) SD card

4. Optical Storage & Cloud Storage


16. Which of the following optical storage devices has the highest capacity?
a) CD
b) DVD

38
c) Blu-ray
d) Floppy Disk

 Answer: c) Blu-ray

17. Which of the following is NOT an example of cloud storage?


a) Google Drive
b) Dropbox
c) OneDrive
d) SSD

 Answer: d) SSD

18. Which of the following is a disadvantage of cloud storage?


a) Requires internet access
b) Low storage capacity
c) Prone to mechanical failure
d) Expensive hardware requirement

 Answer: a) Requires internet access

19. Which storage type provides unlimited scalability?


a) Optical disc
b) Cloud storage
c) HDD
d) SSD

 Answer: b) Cloud storage

20. Which of the following is an advantage of cloud storage?


a) Limited accessibility
b) Requires physical space

LECTURE 5

Computer Constituents

Hardware

 Physical components like monitor, keyboard, storage devices.

Software

 Set of instructions that guide hardware.

39
 Types: System software, Application software, Programming software.

3. Software and Its Types

System Software

 Operates computer hardware and provides functionality.


 Includes operating systems, device drivers, utilities.
 BIOS (Basic Input/Output System) manages data flow between OS and hardware.
 Examples: Disk Defragmenter, Disk Cleanup, Disk Partition Tool.

Programming Software

 Used by developers to create, debug, and maintain software.


 Examples: Compilers, Debuggers, Linkers, IDEs (e.g., NetBeans).
 Programming Languages: C, C++, Java, Python, Visual Basic, PHP.

Application Software

 Programs for end-users to perform specific tasks.


 Examples:
o Word Processors (Microsoft Word, Notepad) – Features: Insert text, cut/paste,
search/replace.
o Spreadsheets (Excel, Google Sheets) – Features: Formulas, Charts, Cell
formatting.
o Presentation Software (PowerPoint, Google Slides) – Features: Insert slides,
animations, slide show.
o Database Management Systems (DBMS) (Oracle, MySQL, Microsoft Access) –
Used for organizing and retrieving data.
o Desktop Publishing Software (Adobe InDesign) – Used for magazines, posters.
o Web Browsers (Chrome, Firefox, Opera) – Used to access web pages.
o Graphics Software (Adobe Photoshop, GIMP) – Includes raster and vector
graphics editors.
o Accounting Software (SAGE, Microsoft Money) – Manages accounts, payroll,
ledgers.

4. Software Licensing

 Legal contract governing software use.


 Types of Software Licenses:
o Registerware – Requires user registration.
o Shareware/Demoware – Trial-based software.
o Freeware – No-cost software.
o Open Source Software (OSS) – Users can modify and redistribute.
o Abandonware – No longer available for purchase.
 Software Piracy (Illegal copying of software):
40
o Counterfeit Software – Fake copies.
o OEM Unbundling – Separating software from hardware.
o Softlifting – Sharing software without authorization.
o Hard Disk Loading – Installing illegal software on hardware.
o Internet Software Piracy – Downloading from illegal sources.

5. Computers as a Problem-Solving Tool

 Computer science is about solving problems using computers.


 Systematic Approach to Problem Solving:
1. Understand the Problem.
2. Formulate a Model.
3. Develop an Algorithm.
4. Write the Program.
5. Test the Program.
6. Evaluate the Solution.
 Example: Calculating the average grade of students.

o Input: Collect grades.


o Process: Compute the average.
o Output: Display the result.

6. Algorithm Development

 Pseudocode: Simple English-like instructions.


 Flowcharts: Graphical representation of steps.
 Example: Checking if a lamp is working using Pseudocode vs. Flowchart.

7. Writing and Testing Programs

 Writing Code: Implementing an algorithm in a programming language (C, Python, Java,


etc.).
 Testing the Program:
o Run the program to check for errors.
o Debugging: Finding and fixing errors (bugs).
o Best Practices: Use multiple test cases (test suite), have a third-party test the
code.

1. Which of the following is NOT an example of computer hardware?


a) Monitor
b) Keyboard
c) Operating System
d) Motherboard
o Answer: c) Operating System

41
2. Which part of the computer is responsible for processing data?
a) RAM
b) Hard Disk
c) CPU
d) Monitor
o Answer: c) CPU
3. Which device is used to enter data into a computer?
a) Printer
b) Mouse
c) Monitor
d) Speaker
o Answer: b) Mouse
4. Which of the following is an example of an output device?
a) Scanner
b) Keyboard
c) Speaker
d) Mouse
o Answer: c) Speaker
5. Which of the following is a primary storage device?
a) Hard disk
b) RAM
c) USB flash drive
d) DVD
o Answer: b) RAM

2. Computer Software

6. What is software?
a) Physical components of a computer
b) A set of instructions that tells the hardware what to do
c) The metal casing of a computer
d) A type of input device
o Answer: b) A set of instructions that tells the hardware what to do
7. Which of the following is NOT a type of software?
a) System software
b) Application software
c) Peripheral software
d) Programming software
o Answer: c) Peripheral software
8. Which type of software controls hardware operations?
a) System software
b) Application software
c) Utility software
d) Word processor
o Answer: a) System software

42
9. Which of the following is an example of system software?
a) Microsoft Word
b) Windows Operating System
c) Photoshop
d) Excel
o Answer: b) Windows Operating System
10. Which software helps in creating, debugging, and maintaining programs?
a) Application software
b) Programming software
c) Utility software
d) System software

 Answer: b) Programming software

3. Types of Software

11. Which of the following is NOT an example of system software?


a) Operating system
b) Device drivers
c) Microsoft Word
d) Utility software

 Answer: c) Microsoft Word

12. Which of the following is an example of application software?


a) Linux
b) Microsoft Excel
c) Windows 10
d) Device drivers

 Answer: b) Microsoft Excel

13. Which type of software is used for word processing?


a) Spreadsheet software
b) Word processor
c) Database software
d) Web browser

 Answer: b) Word processor

14. Which of these is an example of database management software?


a) Microsoft PowerPoint
b) Microsoft Access
c) Google Chrome
d) Notepad

43
 Answer: b) Microsoft Access

15. Which type of software allows users to browse the internet?


a) Word processor
b) Web browser
c) Spreadsheet software
d) Utility software

 Answer: b) Web browser

4. Programming Software

16. Which of these is NOT an example of a programming language?


a) C++
b) Python
c) Microsoft Word
d) Java

 Answer: c) Microsoft Word

17. Which of the following is an integrated development environment (IDE)?


a) Microsoft Excel
b) NetBeans
c) Google Chrome
d) VLC Media Player

 Answer: b) NetBeans

18. Which of the following is NOT a programming software?


a) Compiler
b) Debugger
c) Spreadsheet
d) Interpreter

 Answer: c) Spreadsheet

19. Which programming language is widely used for web development?


a) Python
b) JavaScript
c) C++
d) COBOL

 Answer: b) JavaScript

20. What is the purpose of a compiler in programming software?


a) To execute a program

44
b) To convert source code into machine code
c) To display graphics
d) To store data

 Answer: b) To convert source code into machine code

5. System Software

21. What is BIOS in a computer?


a) Basic Integrated Operating System
b) Basic Input/Output System
c) Binary Integrated Operating System
d) Basic Internal Operating System

 Answer: b) Basic Input/Output System

22. Which of the following is NOT a function of system software?


a) Managing memory
b) Managing peripherals
c) Loading and storing files
d) Creating PowerPoint presentations

 Answer: d) Creating PowerPoint presentations

23. Which software ensures the communication between hardware and software?
a) System software
b) Application software
c) Programming software
d) Media software

 Answer: a) System software

24. Which of the following software is used for disk maintenance?


a) Microsoft Word
b) Disk Defragmenter
c) Google Chrome
d) Adobe Photoshop

 Answer: b) Disk Defragmenter

25. Which type of software includes system utilities like disk cleanup and system
restore?
a) System software
b) Application software
c) Programming software
d) Multimedia software

45
 Answer: a) System software

LECTURE 6

Algorithm

Computers as a Problem-Solving Tool

 Problem Solving Process:


Computers help solve both real-world and abstract problems. The process involves
analyzing information and generating appropriate solutions.
 Systematic Approach:
A standard, sequential method is recommended for problem solving.

2. Steps in a Systematic Problem-Solving Approach

1. Understand the Problem:


o Identify available input data and its format.
o Determine what information is missing.
o Clarify the desired output (e.g., text, graphs, charts) and processing needs.
2. Formulate a Model:
o Break the problem into smaller parts.
o Develop a mathematical model or formula to represent the process (e.g.,
computing an average using:
Average = (x₁ + x₂ + … + xₙ) / n).
3. Develop an Algorithm:
o Create a precise sequence of steps or instructions to solve the problem.
o Represent the algorithm using:
 Pseudocode: English-like, step-by-step instructions.
 Flowcharts: Graphical representation of the sequence of steps.
4. Write the Program:
o Implement the algorithm in a suitable programming language (e.g., BASIC, C, C+
+, Java, Python).
5. Test the Program:
o Run the program with various test cases to verify that it produces correct results.
o Evaluate its performance across different data inputs.
6. Debug the Program:
o Identify, locate, and fix bugs or errors in the code.
o Use systematic testing and third-party reviews to ensure reliability.

46
3. Example Problem Scenario

 Scenario: Calculating the average grade for students.


o Input: Grades entered via keyboard or read from storage.
o Process: Add all grades and compute the average.
o Output: Display the average on a monitor, print it, or store it in memory.

4. Algorithm Representation: Pseudocode vs. Flowchart

 Pseudocode:
o Provides a clear, concise description of the steps in plain language.
o Example:

pgsql
Copy code
IF lamp works THEN
go to step 7
ELSE
CHECK if lamp is plugged in
IF not plugged in, plug in the lamp
CHECK if bulb is burnt out
IF burnt, replace the bulb
IF lamp still does not work, buy a new lamp
Quit

 Flowchart:
o Uses graphical symbols to represent the sequence and decision points in the
algorithm.
o Ideal for visually mapping out the process steps.

5. Writing, Testing, and Debugging Programs

 Writing the Program:


o Translate the algorithm into source code using a programming language.
 Testing the Program:
o Run the program with diverse test cases to ensure all parts function correctly.
o Identify scenarios where the program might fail or produce errors.
 Debugging:
o Systematically resolve bugs.
o Debugging involves rechecking both the algorithm and its implementation.

47
Note: Abbreviations:

o Review all abbreviations used in the slides.


 Pseudocode and Flowchart:
o Study the features and rules for creating effective pseudocode and flowcharts

Questions

Problem Solving and Its Role

1. What is the primary role of computers in problem solving?


a) To replace human decision making entirely
b) To systematically process information and generate solutions
c) To display data in graphical form only
d) To store data without processing
o Answer: b) To systematically process information and generate solutions
2. Which statement best describes the problem-solving process in computer science?
a) Randomly trying different solutions until one works
b) A sequential process of analyzing a situation and generating response options
c) Using only mathematical formulas to solve every problem
d) Relying solely on pre-written programs
o Answer: b) A sequential process of analyzing a situation and generating response
options
3. Computers are used as problem-solving tools because they:
a) Can only solve problems in mathematics
b) Work with both real-world and abstract problems using a systematic approach
c) Do not require any human intervention
d) Can store unlimited data without processing it
o Answer: b) Work with both real-world and abstract problems using a systematic
approach

2. Systematic Approach to Solving Problems

4. Which of the following is the first step in a systematic approach to problem solving?
a) Write the program
b) Develop an algorithm
c) Understand the problem
d) Test the program
o Answer: c) Understand the problem
5. After understanding the problem, what is the next step?
a) Debug the program
b) Formulate a model
48
c) Evaluate the solution
d) Draw a flowchart
o Answer: b) Formulate a model
6. Which step involves breaking down a problem into smaller, manageable parts?
a) Testing the program
b) Formulating a model
c) Debugging
d) Writing the program
o Answer: b) Formulating a model
7. What is the purpose of developing an algorithm in the problem-solving process?
a) To write code in a specific programming language immediately
b) To create a precise sequence of steps for solving a problem
c) To debug the program automatically
d) To store data in the computer’s memory
o Answer: b) To create a precise sequence of steps for solving a problem

3. Understanding the Problem and Model Formulation

8. When “understanding the problem,” one should determine:


a) Only the required output
b) What input is available, its format, and what output is desired
c) How many programming languages are available
d) The cost of computer hardware
o Answer: b) What input is available, its format, and what output is desired
9. In the provided example of calculating average grades, what does the model
(formula) assume?
a) That every student gets a zero if absent
b) That the grades are numbers (integer or real)
c) That all grades are letter grades
d) That no processing is needed
o Answer: b) That the grades are numbers (integer or real)
10. What does “formulating a model” typically involve?
a) Creating a hardware diagram
b) Developing a mathematical representation of the processing needed
c) Designing the user interface
d) Installing software updates
o Answer: b) Developing a mathematical representation of the processing needed

4. Algorithm Development and Representation

11. An algorithm is defined as:


a) A program written in a high-level language

49
b) A vague idea of how to solve a problem
c) A precise sequence of instructions to solve a problem
d) A debugging tool
o Answer: c) A precise sequence of instructions to solve a problem
12. Which two representations are commonly used to depict an algorithm?
a) Binary code and machine language
b) Pseudocode and flowcharts
c) Diagrams and databases
d) Spreadsheets and text files
o Answer: b) Pseudocode and flowcharts
13. Pseudocode is best described as:
a) A programming language with strict syntax rules
b) An informal, English-like description of the steps in an algorithm
c) A type of flowchart symbol
d) The final source code of a program
o Answer: b) An informal, English-like description of the steps in an algorithm
14. A flowchart is:
a) A graphical representation of an algorithm’s sequence of steps
b) A list of programming errors
c) A storage format for algorithms
d) A language used for coding
o Answer: a) A graphical representation of an algorithm’s sequence of steps
15. In the example provided for a broken lamp, what is the first decision point in the
pseudocode?
a) Checking if the lamp is broken
b) Checking if the lamp is plugged in
c) Going directly to step 7
d) Buying a new lamp
o Answer: b) Checking if the lamp is plugged in

5. Writing and Testing Programs

16. Writing a program is also referred to as:


a) Debugging
b) Drawing a flowchart
c) Implementing an algorithm
d) Formulating a model
o Answer: c) Implementing an algorithm
17. Which of the following is a primary purpose of testing a program?
a) To check if the program meets the requirements and produces correct output
b) To add additional features
c) To rewrite the entire code
d) To convert pseudocode into flowcharts

50
o Answer: a) To check if the program meets the requirements and produces correct
output
18. The process of running a program with different test cases to identify errors is
known as:
a) Programming
b) Evaluation
c) Debugging
d) Documentation
o Answer: c) Debugging
19. Why is it recommended to have a third party test your program?
a) They can write the entire code for you
b) They may identify input scenarios you overlooked
c) They can guarantee your program is bug-free
d) They can increase the program’s execution speed
o Answer: b) They may identify input scenarios you overlooked
20. Which step follows writing the program in the systematic approach?
a) Formulate a model
b) Debugging
c) Test the program
d) Evaluate the solution
o Answer: c) Test the program

6. Evaluation and Debugging

21. Evaluation of a solution in program development involves:


a) Only checking the syntax
b) Running the program to verify it meets problem requirements
c) Redesigning the hardware
d) Changing the programming language
o Answer: b) Running the program to verify it meets problem requirements
22. Bugs in a program are defined as:
a) Features of the algorithm
b) Intentional parts of the code
c) Errors that cause the program to produce incorrect or undesirable results
d) Instructions that optimize the code
o Answer: c) Errors that cause the program to produce incorrect or undesirable
results
23. Debugging is described as:
a) The process of writing pseudocode
b) The process of finding and fixing errors in a program
c) Creating flowcharts for complex algorithms
d) Evaluating the design of a computer system
o Answer: b) The process of finding and fixing errors in a program

51
24. Which of the following is NOT a benefit of following a systematic approach to
problem solving?
a) Reducing the number of bugs
b) Increasing the predictability of the solution
c) Making the process entirely error-free
d) Helping to organize the steps required to solve a problem
o Answer: c) Making the process entirely error-free

Lecture 7

Overview of Programming

 Definition of a Computer Program:


A computer program is a sequence of instructions written in a programming language to
perform a specified task. The process of writing such instructions is called computer
programming.
 Programming Languages:
There are hundreds of languages (e.g., Python, Java, C++), each with its own syntax and
features.

2. Fundamentals of Programming

 Core Components:
o Programming Environment: The platform (offline/online, mobile/desktop)
where coding is performed. For this course, the online Colab platform is used.
o Basic Syntax: Rules that define the structure of code.
o Data Types & Variables:
 Data Types: Different kinds of data such as numbers (integers, floats,
complex numbers), strings (text), and others.
 Variables: Containers used to store data values.
o Keywords & Basic Operators:
 Reserved words that have special meaning.
 Operators to perform arithmetic, comparisons, etc.
o File I/O: Input and output operations for reading and writing data to files.
o Control Structures:
 Decision making (if-else conditions).
 Loops (for, while) for repetition.
o Arrays, Strings, and Functions:
 Arrays and strings as collections of elements.
 Functions to encapsulate reusable code.

52
3. Environment Setup

 Programming Environment Setup:


Not a part of any programming language, but a necessary first step. It defines the
base/platform for coding.
 Example Environment:
o For this course, the online Google Colab platform is
used: https://colab.research.google.com.

4. Basic Syntax in Python

 Executing Code:
o Python code can be executed directly via a command line or within an IDE like
Colab.
 Key Syntax Elements:
o Indentation: Critical in Python as it indicates code blocks.
o Comments:
 Single-line comments start with #.
 Multi-line comments can be enclosed in triple quotes (""" or ''').

5. Data Types in Python

 Numbers:
o Integers (int): Non-decimal whole numbers (e.g., 1, 3, 191).
o Floats (float): Decimal numbers (e.g., 1.1, 3.4).
o Complex Numbers: Numbers with a real and imaginary part (e.g., 3j, 2j).
 Strings:
o Text enclosed in single ('hello') or double quotes ("hello").
o Escape Characters: Used to insert illegal characters in strings (e.g., \" to include
quotation marks).

6. Variables and Assignment

 Definition:
Variables are containers for storing data values.
 Example:

53
python
Copy code
x = 5
y = "John"
print(x)
print(y)

7. Comments in Python

 Purpose:
o To explain code and improve readability.
o To temporarily disable code during testing.
 Syntax Examples:
o Single-line: # This is a comment
o Multi-line:

python
Copy code
"""
This is a comment
that spans multiple lines.
"""

8. Sample Program and Execution

 Example Program:
A simple program that prints "Hello World" can be executed directly in the command
line or in Colab:

python
Copy code
print('Hello World')

9. Learning Resources

 Online Python Tutorials:


o An example resource provided is W3Schools Python Tutorial.

Questions

Overview of Programming

1. What is a computer program?


a) A list of hardware components
b) A sequence of instructions written in a programming language

54
c) A type of operating system
d) A data storage method
o Answer: b) A sequence of instructions written in a programming language
2. The act of writing computer programs is known as:
a) Debugging
b) Compiling
c) Computer programming
d) Data processing
o Answer: c) Computer programming
3. Which of the following is NOT mentioned as an example of a programming
language?
a) Python
b) Java
c) C++
d) HTML
o Answer: d) HTML

2. Fundamentals of Programming

4. Which of the following is a core component of programming fundamentals?


a) Programming Environment Setup
b) Physical hardware repair
c) Database administration
d) Network configuration
o Answer: a) Programming Environment Setup
5. Which of these is NOT typically included in the fundamentals of programming?
a) Basic Syntax
b) Data Types
c) Hardware Architecture
d) File I/O
o Answer: c) Hardware Architecture
6. What are variables in programming?
a) Fixed values that cannot change
b) Containers for storing data values
c) A type of function
d) Reserved keywords in a language
o Answer: b) Containers for storing data values
7. Which of the following is a basic operator category in most programming
languages?
a) Encryption Operators
b) Basic Arithmetic Operators
c) Hardware Operators
d) Graphic Operators
o Answer: b) Basic Arithmetic Operators

55
3. Programming Environment Setup

8. What does "Programming Environment Setup" refer to?


a) The installation of a new computer
b) The base or platform on which programming is performed
c) The debugging process
d) Writing comments in code
o Answer: b) The base or platform on which programming is performed
9. Which online platform is used as the programming environment in this course?
a) Repl.it
b) Colab
c) GitHub
d) CodePen
o Answer: b) Colab
(Accessed at https://colab.research.google.com)

4. Basic Syntax in Python

10. In Python, why is indentation important?


a) It is optional and only for readability
b) It indicates code blocks and is required for correct execution
c) It only affects comments
d) It is used to separate functions
o Answer: b) It indicates code blocks and is required for correct execution
11. Which of the following is the correct way to print "Hello World" in Python?
a) echo("Hello World")
b) print("Hello World")
c) Console.WriteLine("Hello World")
d) printf("Hello World")
o Answer: b) print("Hello World")
12. What symbol is used for a single-line comment in Python?
a) //
b) <!--
c) #
d) %%
o Answer: c) #

5. Data Types

56
13. Which of the following is NOT a numeric type in Python?
a) Integer
b) Float
c) Complex
d) String
o Answer: d) String
14. How are string literals defined in Python?
a) Using angle brackets (< >)
b) Enclosed in either single or double quotation marks
c) Using curly braces ({ })
d) With no delimiters
o Answer: b) Enclosed in either single or double quotation marks
15. What is the purpose of an escape character in a string?
a) To comment out code
b) To insert special characters that cannot be typed directly
c) To terminate a string
d) To convert a number to a string
o Answer: b) To insert special characters that cannot be typed directly

6. Variables and Assignment

16. Which of the following is an example of variable assignment in Python?


a) x == 5
b) x = 5
c) int x = 5
d) let x = 5
o Answer: b) x = 5
17. What will be the output of the following code?

python
Copy code
x = 10
y = "John"
print(x)
print(y)

a) 10 John
b) John 10
c) x y
d) 10 and John on the same line

o Answer: a) 10 John

57
7. Comments in Python

18. Which of the following is a correct way to write a multi-line comment in Python?
a) /* This is a comment */
b) // This is a comment
c) """ This is a multi-line comment """
d) <!-- This is a comment -->
o Answer: c) """ This is a multi-line comment """

8. Sample Program Execution

19. Which statement best describes the sample Python program provided in the
lecture?
a) It performs complex calculations
b) It prints a simple message to the screen
c) It demonstrates file I/O operations
d) It creates a graphical user interface
o Answer: b) It prints a simple message to the screen
20. How can Python code be executed according to the lecture?
a) Only through a web browser
b) Directly via the command line or an online platform like Colab
c) Only using an IDE installed on a local machine
d) By compiling into machine language manually
o Answer: b) Directly via the command line or an online platform like Colab

9. Learning Resources

21. Which online resource is recommended for learning Python as mentioned in the
lecture?
a) Codecademy
b) W3Schools
c) Coursera
d) Udacity
o Answer: b) W3Schools
(Refer to https://www.w3schools.com/python/default.asp)

10. General Programming Concepts

22. Which of the following best describes the relationship between data types and
variables?
58
a) Variables store data, and the type of data determines what operations can be performed
b) Data types are not important in Python
c) Variables and data types are the same thing
d) Data types only apply to numbers
o Answer: a) Variables store data, and the type of data determines what operations
can be performed
23. What role do keywords play in programming?
a) They are used for file management
b) They are reserved words that have special meaning in a programming language
c) They are used to define variables
d) They are only used in comments
o Answer: b) They are reserved words that have special meaning in a programming
language
24. What is File I/O in the context of programming?
a) Input and output operations with files
b) A type of data type
c) A method for debugging code
d) The setup of the programming environment
o Answer: a) Input and output operations with files
25. Which of the following is NOT typically part of the basic programming
fundamentals covered in the lecture?
a) Decision making and loops
b) Arrays and strings
c) Advanced database design
d) Functions
o Answer: c) Advanced database design

59

You might also like