0% found this document useful (0 votes)
21 views120 pages

PPSC Computer Science Book - Sample

The document is a comprehensive guide for computer lecturers, covering essential topics for various public service commission exams and IT-related positions. It includes detailed notes on computing, programming, database management, and emerging technologies, along with practice MCQs and past papers. The guide emphasizes a structured approach to learning and guarantees success for users preparing for these exams.
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)
21 views120 pages

PPSC Computer Science Book - Sample

The document is a comprehensive guide for computer lecturers, covering essential topics for various public service commission exams and IT-related positions. It includes detailed notes on computing, programming, database management, and emerging technologies, along with practice MCQs and past papers. The guide emphasizes a structured approach to learning and guarantees success for users preparing for these exams.
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

Updated

Updated

MK Edition!
Edition!

Computer
Computer
Lecturer Guide
Lecturer Guide
PPSC | FPSC | SPSC | BPSC | AJKPSC | KPPSC
According to the Latest Syllabus & Pattern of All Public Service Commission Exams

Also Helpful For Following Exams:


ESE, SST & TGT Computer Operator
Subject Specialist IT Administrator
Web Developer System Analyst
Data Processing Officer Assistant Director-IT

Premium Features:
To The Point
To The Point Topic
Topic Wise
Wise Notes
Notes
Authentic, Concise, Error
Authentic, Concise, Error less
less && Result
Result
Oriented Notes
Oriented Notes + + One
One Liners
Liners +
+ Practice
Practice
MCQs
MCQs
Solved Past
Solved Past Papers
Papers && Most
Most Repeated
Repeated
Important MCQs
Important MCQs
According to
According to All
All Public
Public Service
Service
Commissions Syllabus
Commissions Syllabus
100% Success
100% Success Guaranteed
Guaranteed BY
BY
K. A.
K. A. USAMA
USAMA
MK PUBLICATIONS For Online Order:
LET'S MAKE IT HAPPEN! 0348-4233593
0348-4233593
Contact: 0342-4470091 | 0333-2605045
Email: mkpreparations@[Link] @MK PREPARATIONS
MK PREPARATIONS

Table of Content
• Introduction To Computing • Programing Fundamentals
& ICT & Core Concepts
• History Of Computers • Programing In Core
• Computer System: Concepts (C, C++)
Architecture & Components • Web Development & Web
• Number Systems, Digital Programing
Logics & Data • Data Base And Data
• Operating Systems Management (DBMS)

• Artificial Intelligence (AI) • Oracle PL/SQL

• Theory of Automata • System Development,


Troubleshooting &
• Office Automation Maintenance

• Microsoft Word • System Analysis & Design

• Microsoft Excel • Emerging And


Contemporary Technologies
• Microsoft Power Point
• Digital Citizenship, Literacy
• Keyboard And Shortcut & Ethics
Keys
• Entrepreneurship In Digital
• Data Communication And Age
Networks
• Miscellaneous Information:
• Computational Thinking A Quick Revision Notes
And Algorithms
• Past Papers MCQ
MK PREPARATIONS
Chapter 1

Introduction to Computing and ICT


Information and Communication Technology (ICT)

1. Introduction to Computing and ICT


Information and Communication Technology (ICT) is defined as a comprehensive set of computing
tools that collectively allow people and organizations to interact in the digital world. It is an umbrella
term encompassing communication devices (television, cell phones), computer and network hardware,
satellite systems, and various associated services and applications such as video conferencing, distance
learning, and e-commerce. ICT also represents the technological convergence of telephone networks
M with computer networks via a single link system, enabling integrated data, voice, and video
communication.
K What is a System?
A system is a collection of interconnected components working together cohesively to achieve specific
goals or objectives by processing inputs to produce desired outputs. Systems exist in both natural and

P artificial domains. Understanding a system's structure allows for better design, management, and
optimization across fields like engineering, biology, and computing.
A system is described by four fundamental concepts:
R 1. Objective/Purpose: The primary goal the system is designed to achieve.
2. Components: The essential building blocks or parts that constitute the system.
E 3.
4.
Environment: Everything external to the system that interacts with or influences it.
Communication/Interaction: The mechanisms through which components and the system itself
P exchange information and coordinate their functions.
Types of Systems
A Systems are broadly categorized into two main types:
1.3.1 Natural Systems
R These occur organically in nature without human intervention. They are characterized by self-
regulation, adaptability, stability, and are governed by natural laws (physics, chemistry, biology).
A •
They are highly intricate and interdependent.
Examples: Ecosystems (forests, oceans), weather patterns, the solar system, the human body
T (circulatory, nervous systems), DNA, psychological systems (thoughts, emotions).
1.3.2 Artificial Systems
I These are intentionally designed and built by humans to fulfill specific needs or solve problems. They
are structured, require maintenance, and operate under predefined human-set rules and protocols.

O
• Examples:
o Knowledge Systems: Mathematics, logic, databases, information management systems.
o Engineering Systems: Civil (bridges, roads), mechanical (robotic arms), chemical (water treatment
N plants), electrical (home automation), software (library management systems).
o Social Systems: Academic institutions, governments, corporations.
S o Computer Systems: The primary focus of this chapter.
Key Differences:
Feature Natural Systems Artificial Systems
Origin Occur naturally. Designed and built by humans.

P a g e 1 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Complexity Highly intricate and Structured and relatively simpler.
interdependent.
Energy Source Natural (sunlight, water flow). Artificial (electricity, fuel).

1. Introduction to Computing and ICT


Adaptation Evolve autonomously over time. Require human updates/redesign.
Governance Natural laws. Human-defined rules and
protocols.
M Systems and Science
The study of systems aligns with different scientific approaches:
K • Natural Science: Focuses on understanding and describing existing natural systems (e.g., studying a
forest ecosystem).
• Design Science: Focuses on creating new artificial systems to solve problems (e.g., developing
conservation software).
P • Computer Science: Utilizes methods from both. It studies the natural laws of computation (e.g.,
algorithm efficiency) and engages in the design science of creating new software and hardware
R systems.

The Computer as a System


E Definition of a Computer
P A computer is a programmable electronic device that accepts raw data as input, processes it according
to a set of stored instructions (a program), produces useful output, and stores (storage) the results for
A future use. It performs arithmetic and logical operations automatically and without human intervention
during processing.

R Objectives of a Computer System


The main objectives are to perform computations, process data, and execute tasks efficiently to provide
A useful information to the user. This includes running software applications, managing files, facilitating
communication, and automating complex processes.
T Core Components of a Computer System (Hardware)
I
Computer hardware consists of physical, tangible components.
Input Devices
Tools that allow users to enter data and instructions into the computer.
O • Keyboard: For entering text, numbers, and commands. The standard layout is QWERTY.
• Mouse/Pointing Device: Controls the cursor on the screen for selection and navigation. Includes
N •
touchpads on laptops.
Scanner: Converts physical documents and images into a digital format.
S •

Microphone: Inputs audio data.
Webcam: Captures live video and images.
• Barcode Reader: Scans barcodes to input product information quickly.
• Touch Screen: Serves as both an input (touch) and output (display) device.
• Joystick/Gamepad: Used for gaming and simulations.
• Light Pen: A historical pointing device for drawing directly on CRT screens.
The System Unit
The central case that houses the primary electronic components.

P a g e 2 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• Motherboard: The main circuit board that connects and allows communication between all
components (CPU, RAM, storage, ports).
• Central Processing Unit (CPU)/Microprocessor: The "brain" of the computer. It fetches, decodes,
and executes instructions from memory.
o Control Unit (CU): Directs and coordinates operations within the processor and manages the flow of

1. Introduction to Computing and ICT


data.
o Arithmetic Logic Unit (ALU): Performs all mathematical calculations (addition, subtraction, etc.)
and logical comparisons (AND, OR, NOT).
o Registers: High-speed temporary storage locations within the CPU for holding data, instructions, and
addresses currently being processed (e.g., Memory Address Register - MAR, Memory Data Register -
M •
MDR, Accumulator - AC, Program Counter - PC, Current Instruction Register - CIR).
Memory (Primary Storage):
K o Random Access Memory (RAM): Volatile, read/write memory. It temporarily holds the operating
system, application programs, and data currently in use. It is much faster than secondary storage but
loses its contents when power is off.
o Read-Only Memory (ROM): Non-volatile memory that stores permanent, essential instructions like
the BIOS (Basic Input/Output System) for booting the computer. Its contents are typically not
P modifiable by the user.
o Cache Memory: Extremely fast, small memory located inside (L1) or close to (L2, L3) the CPU. It
R stores frequently used data and instructions to speed up processing by reducing the time the CPU
waits for data from RAM.
E Storage Devices (Secondary/Backing Storage)
Non-volatile media for the long-term retention of data, programs, and information.
P • Hard Disk Drive (HDD): Magnetic storage using spinning platters. Offers large capacity at a lower
cost but is slower and more fragile than SSDs.

A • Solid State Drive (SSD): Chip-based storage using flash memory. Much faster, more durable, silent,
and energy-efficient than HDDs, but typically more expensive per gigabyte.
Optical Discs: CDs, DVDs, and Blu-ray discs that use lasers to read and write data.
R

• USB Flash Drive: Portable, rewritable chip-based storage.
• Memory Cards (SD Cards): Portable storage used in cameras, phones, and other devices.
A Output Devices
Hardware used to present processed data (information) to the user.
T • Monitor/Visual Display Unit (VDU): Displays text, graphics, and video (soft copy). Types: CRT
(older, bulky), LCD, LED (modern, flat-panel).
I • Printer: Produces physical hard copies. Types: Impact (e.g., dot-matrix) and Non-Impact (e.g.,
inkjet, laser).

O •

Plotter: Used for printing large-scale graphics like engineering drawings and architectural blueprints.
Speakers/Headphones: Output audio.
Multimedia Projector: Projects the computer's display onto a larger surface like a wall or screen.
N

Ports, Expansion Slots, and Cards
• Ports: Interfaces on the system unit for connecting peripheral devices (e.g., USB, HDMI, Ethernet,
S •
audio jacks, VGA).
Expansion Slots: Sockets on the motherboard (e.g., PCI, PCI Express) where expansion cards can be
inserted to add new capabilities.
• Expansion Cards: Circuit boards that add new functions (e.g., graphics card for enhanced video,
sound card for improved audio, network interface card for networking).

Interaction among Components & the Environment

P a g e 3 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• Biometric Systems: Use unique biological traits for identification and authentication (e.g.,
fingerprint scanners, facial recognition, iris scanners).

Data Representation and Number Systems


Machine-Level Representation

1. Introduction to Computing and ICT


At the machine level, all data is represented using binary digits (bits), which can be either 0 or 1.
This binary system aligns with the two-state nature of electronic switches in computer hardware
(ON/HIGH/1 and OFF/LOW/0).
• A single binary digit is called a bit.
M •

Groups of bits form codes that represent all types of data: numbers, text, images, sound.
Example: The decimal number 5 is 101 in binary. The ASCII character 'A' is 01000001.

K Number Systems
A number system defines a set of values and rules used to represent quantity. The four primary
systems in computing are:

P System Base Digits/Symbols Primary Use

R Decimal 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Human-centric counting and
math.
E Fundamental representation
Binary 2 0, 1
P inside all computers.
Compact representation of
A Octal 8 0, 1, 2, 3, 4, 5, 6, 7
binary (historically significant).
R 0-9, A(10), B(11), Compact representation of
Hexadecimal 16 C(12), D(13), E(14), binary; used for memory
A F(15) addresses, color codes.
T •
All are positional-value systems: the value of a digit depends on its position.
Most Significant Digit (MSD): Leftmost digit (carries the most weight).

I • Least Significant Digit (LSD): Rightmost digit (carries the least weight).
Number System Conversions
O A. Conversion to Decimal (from any base): Multiply each digit by the base raised to its positional
power (starting at 0 for the LSD) and sum the results.
N •

Binary to Decimal: (1011.101)₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ + 1×2⁻¹ + 0×2⁻² + 1×2⁻³ = (11.625)₁₀
Hexadecimal to Decimal: (3AF)₁₆ = 3×16² + 10×16¹ + 15×16⁰ = (943)₁₀
S •
B. Conversion from Decimal (to any base):
For the integer part: Repeatedly divide by the target base and record remainders in reverse order.
• For the fractional part: Repeatedly multiply by the target base and record the integer parts
in forward order.
C. Direct Conversions Between Binary, Octal, and Hexadecimal: (Efficient because bases are
powers of 2).
• Binary ↔ Octal: Group binary digits into sets of 3 (from the binary point outward), pad if necessary,
then convert each group to its octal digit (0-7).

P a g e 7 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Examples Human voice, analog radio, vinyl MP3 files, digital TV, data in
records. computer memory.
11.2 Logic Gates

1. Introduction to Computing and ICT


Fundamental building blocks of digital circuits. They perform basic logical functions on one or more
binary inputs to produce a single binary output.
Boolean Expression Truth Table
Gate Function
(2-input) (A B | F)
M AND F=A·B 00|0 Output is 1 only if ALL inputs

K 01|0
10|0
are 1.

11|1

P OR F=A+B 00|0
01|1
Output is 1 if AT LEAST ONE
input is 1.
R 10|1

E 11|1
NOT F = Ā (or A') 0|1 Output is the inverse
P 1|0 (complement) of the input.

A NAND F = A⋅B‾A⋅B 00|1 Output is 0 only if ALL inputs


01|1 are 1 (AND + NOT).
R 10|1

A 11|0
NOR F = A+B‾A+B 00|1 Output is 1 only if ALL inputs
T 01|0 are 0 (OR + NOT).

I 10|0
11|0
O XOR F=A⊕B 00|0 Output is 1 only if inputs are
N 01|1 DIFFERENT.
10|1
S 11|0
Boolean Algebra and Simplification
• Boolean Algebra: A mathematical system for logic operations using variables that can be true (1) or
false (0) and operators (AND, OR, NOT).
• Truth Table: Lists all possible input combinations and their corresponding output for a Boolean
function or logic circuit.

P a g e 12 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Introduction to Computing and ICT
1. ICT is an umbrella term for computing tools enabling interaction in the digital world, representing
the convergence of telephone and computer networks.
2. A system is a collection of interconnected components working cohesively to achieve a specific

1. Introduction to Computing and ICT


objective by processing inputs into outputs.
3. The four fundamental concepts describing any system are its Objective, Components,
Environment, and Communication/Interaction.
4. Natural systems occur organically, are self-regulated, adaptable, and governed by natural laws,
such as ecosystems and the human body.
M 5. Artificial systems are human-designed, structured, require maintenance, and operate under
predefined rules, like engineering, social, and computer systems.

K 6. Natural systems are governed by natural laws, while artificial systems operate under human-
defined rules and protocols.
7. Design Science focuses on creating new artificial systems, like conservation software, to solve
problems.
8. A computer is a programmable electronic device that accepts input, processes it according to
P 9.
stored instructions, produces output, and stores results.
The primary objectives of a computer system are to perform computations, process data, and
R 10.
execute tasks efficiently to provide useful information.
An input device allows users to enter data and instructions into a computer, such as a keyboard,
E 11.
mouse, or scanner.
The standard keyboard layout is QWERTY.

P 12.
13.
A touch screen serves as both an input (touch) and output (display) device.
The system unit houses the primary electronic components of a computer, including the
motherboard and CPU.
A 14. The motherboard is the main circuit board connecting all components like the CPU, RAM,
storage, and ports.
R 15. The CPU, or microprocessor, is the computer's "brain," responsible for fetching, decoding, and
executing instructions.
A 16. The Control Unit (CU) directs and coordinates operations within the processor and manages data
flow.
T 17. The Arithmetic Logic Unit (ALU) performs all mathematical calculations and logical
comparisons.

I 18. Registers are high-speed temporary storage locations within the CPU for data and addresses being
processed.
19. The Memory Address Register (MAR) holds the memory location of data to be fetched or stored.
O 20. The Memory Data Register (MDR) holds the data fetched from or to be written to memory.
21. The Program Counter (PC) holds the address of the next instruction to be executed.
N 22. The Current Instruction Register (CIR) holds the instruction currently being decoded and
executed.
S 23. Random Access Memory (RAM) is volatile, read/write memory that temporarily holds the OS,
applications, and data in use.
24. Read-Only Memory (ROM) is non-volatile memory storing permanent, essential instructions like
the BIOS.
25. Cache memory is extremely fast memory located close to the CPU to store frequently used data
and speed up processing.
26. Secondary storage devices provide non-volatile, long-term retention of data, programs, and
information.
P a g e 15 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
27. Hard Disk Drives (HDD) use magnetic storage on spinning platters, offering large capacity at
lower cost but are slower than SSDs.
28. Solid State Drives (SSD) use chip-based flash memory, offering faster speeds, durability, and
energy efficiency than HDDs.
29. Output devices present processed data to the user, such as monitors (soft copy) and printers (hard

1. Introduction to Computing and ICT


copy).
30. A plotter is an output device used for printing large-scale graphics like engineering drawings.
31. Ports are interfaces on the system unit for connecting peripheral devices (e.g., USB, HDMI).
32. Expansion slots on the motherboard allow the insertion of expansion cards to add new capabilities
like enhanced graphics or audio.
M 33. The computer's environment includes external factors like the power supply, network connections,
peripherals, and the user.
K 34. The fundamental operations of a computer are Input, Processing, Storage, and Output, known as
the IPO cycle.
35. The Von Neumann architecture's revolutionary principle is the stored-program concept, where
both instructions and data reside in the same memory.
36. In the Von Neumann model, the CPU contains the ALU, CU, and Registers.
P 37. The three types of system buses are the Data Bus, Address Bus, and Control Bus.
38. The Data Bus carries the actual data being processed between components.
R 39.
40.
The Address Bus carries memory location (address) information.
The Control Bus carries control and timing signals, such as read and write commands.
E 41.
42.
The instruction cycle consists of four stages: Fetch, Decode, Execute, and Store (Write Back).
During the Fetch stage, the CU retrieves an instruction from memory into the CIR and increments
P 43.
the Program Counter.
The Von Neumann Bottleneck is the limitation in processing speed caused by the shared bus

A 44.
system transferring both instructions and data.
A security risk in the Von Neumann architecture is that instructions and data share the same
memory, allowing a program to accidentally or maliciously modify other instructions.
R 45. Software is a set of instructions, data, or programs that tell computer hardware how to function and
perform tasks.
A 46. System software manages and controls hardware, providing a stable platform for application
software.
T 47. The Operating System (OS) manages hardware resources, provides user interfaces, runs
applications, and handles file and memory management.
I 48. Device drivers are specialized programs enabling the OS to communicate with and control specific
hardware devices.

O 49. Utility programs perform maintenance tasks like antivirus scanning, disk cleanup, and file
compression.
50. A compiler translates an entire high-level program into machine code at once, producing an
N independent executable file.
51. An interpreter translates and executes source code line-by-line, without producing a separate
S 52.
executable.
An assembler translates assembly language (low-level symbolic code) into machine code.
53. Application software helps end-users perform specific tasks, such as using a word processor or
spreadsheet.
54. Open Source Software has its source code made freely available for use, study, modification, and
distribution (e.g., Linux).
55. Freeware is copyrighted software distributed free of charge, but its source code is typically not
modifiable (e.g., Adobe Reader).
P a g e 16 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. In the context of systems, which of the Answer: c) Instructions and data residing
following is NOT one of the four in the same memory space
fundamental concepts that describe any 6. Which of the following best distinguishes

1. Introduction to Computing and ICT


system? a compiler from an interpreter?
a) Objective/Purpose a) A compiler is used for system software,
b) Components an interpreter for application software.
c) Efficiency b) A compiler translates code line-by-line,
d) Environment while an interpreter translates the entire
M Answer: c) Efficiency
2. What is the key, revolutionary principle
program at once.
c) A compiler translates the entire source

K proposed by John von Neumann that


underlies almost all modern computer
code into machine code at once, producing
an executable.
architectures? d) An interpreter produces an object file,
a) The use of vacuum tubes while a compiler does not.
b) The stored-program concept Answer: c) A compiler translates the
P c) The Harvard architecture separation
d) Binary arithmetic logic
entire source code into machine code at
once, producing an executable.
R Answer: b) The stored-program concept
3. During the Fetch stage of the instruction
7. A software that is copyrighted and
distributed free of charge, but whose source
E cycle, what happens to the Program Counter
(PC) after an instruction is retrieved?
code is typically not modifiable by the user,
is classified as:

P a) It is decremented
b) It is loaded with the address of the
a) Open Source Software
b) Shareware
fetched instruction c) Freeware
A c) It is incremented d) Firmware
d) It is compared with the CIR Answer: c) Freeware
R Answer: c) It is incremented
4. Which component of the CPU is
8. The technological shift from vacuum
tubes to transistors primarily characterized
A specifically responsible for performing all
mathematical calculations and logical
which generation of computers?
a) First to Second
T comparisons?
a) Control Unit (CU)
b) Second to Third
c) Third to Fourth

I b) Memory Data Register (MDR)


c) Arithmetic Logic Unit (ALU)
d) Fourth to Fifth
Answer: a) First to Second
d) Cache Memory 9. Which type of computer is specifically
O Answer: c) Arithmetic Logic Unit (ALU) designed to process continuous physical data
5. What is the primary vulnerability like voltage or pressure and is considered
N associated with the Von Neumann
architecture that can be exploited in attacks
faster for simulations but less accurate?
a) Digital Computer
S like buffer overflows?
a) Slow processing speed due to the
b) Hybrid Computer
c) Analog Computer
bottleneck d) Quantum Computer
b) Instructions and data residing in separate Answer: c) Analog Computer
memory units 10. In a hybrid computer system, what is the
c) Instructions and data residing in the same typical role of the analog component?
memory space a) Long-term data storage
d) The use of a single system bus b) Complex logical decision-making
P a g e 22 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
c) Fast input measurement and initial Answer: c) A lightweight unit of execution
processing within a process that shares resources
d) User interface management 16. Which type of operating system is
Answer: c) Fast input measurement and designed for time-critical applications where
initial processing missing a deadline could have catastrophic

1. Introduction to Computing and ICT


11. What is the correct decimal range for an consequences?
8-bit unsigned binary number? a) Batch Processing OS
a) -128 to +127 b) Time-Sharing OS
b) 0 to 255 c) Soft Real-Time OS
c) -256 to +255 d) Hard Real-Time OS
M d) 0 to 511
Answer: b) 0 to 255
Answer: d) Hard Real-Time OS
17. In the context of file systems, which
K 12. To perform the subtraction 7 - 5 using
the 2's complement method in an 8-bit
allocation method stores file blocks
scattered across the disk, linked together by
system, what operation would the ALU pointers, making it efficient for space but
actually carry out? slow for random access?
a) 7 + (1's complement of 5) a) Contiguous Allocation
P b) 7 + (2's complement of 5) b) Indexed Allocation
c) 5 + (2's complement of 7) c) Linked Allocation
R d) Direct binary subtraction of 0101 from
0111
d) Sequential Allocation
Answer: c) Linked Allocation
E Answer: b) 7 + (2's complement of 5)
13. In the ASCII-7 character encoding
18. In data communication, which mode
allows for two-way communication but only
P standard, what is the decimal value assigned
to the uppercase letter 'A'?
in one direction at a time, similar to a
walkie-talkie?

A a) 48
b) 65
a) Simplex
b) Half-Duplex
c) 97 c) Full-Duplex
R d) 32 d) Multiplex
Answer: b) 65 Answer: b) Half-Duplex
A 14. Which Unicode encoding form is
variable-length (1-4 bytes), backward
19. What is the key functional difference
between a network hub and a network
T compatible with ASCII, and the most
common on the web?
switch?
a) A hub operates at the network layer,
I a) UTF-16
b) UTF-32
while a switch operates at the data link
layer.

O c) UTF-8
d) ASCII-8
b) A hub broadcasts data to all connected
devices, while a switch directs data only to
Answer: c) UTF-8 the specific destination device.
N 15. In process management, what is a c) A switch connects different networks,
'thread'? while a hub connects devices within the
S a) A complete, independent program in
execution
same network.
d) A hub has more ports than a switch.
b) A high-priority system process Answer: b) A hub broadcasts data to all
c) A lightweight unit of execution within a connected devices, while a switch directs
process that shares resources data only to the specific destination
d) The state of a process when it is waiting device.
for an I/O operation 20. Which network topology connects every
device to every other device, providing
P a g e 23 | 26
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 2
History of Computers

2. History of Computers
Introduction to Computers:
The word 'computer' originally referred to people who performed mathematical calculations. Before
modern computers existed, these human 'computers' were employed to carry out complex arithmetic
operations, often used in fields like astronomy, engineering, and navigation. This practice dates back to at
least the 17th century.
M The first recorded use of the word 'computer' in English was in 1613, describing a person who computes.
Over the centuries, as technology progressed, mechanical and electronic devices took over the
K computational role. This evolution marked the transition from manual computing to the automated systems
we rely on today.
Understanding the history of computing helps us appreciate the innovations and challenges faced by early
scientists and inventors who laid the foundation for today’s digital age.
P The Mechanical Era (1600–1900)
R During the Mechanical Era, inventors developed physical devices to assist in computation. These devices
worked without electricity and were typically operated by hand.
E Tally Sticks
Tally sticks were simple tools used since ancient times to record numbers, debts, or messages. They were
P not calculators but rather record-keeping aids. A notch on a stick represented a unit of value or count. These
were used extensively in medieval Europe, especially for tax collection.
A Abacus (c. 2400 BC)
R The abacus is one of the oldest calculating tools known to humanity. First used in Babylon around 2400
BC and later perfected in China around 500 BC, the abacus consists of beads that can be moved along rods
A to perform arithmetic operations. It was especially useful in trading and finance and is still used today in
parts of Asia.
T Napier’s Bones (1614)
Invented by Scottish mathematician John Napier, this device used rods inscribed with numbers to perform
I multiplication and division. It simplified large calculations and was a precursor to the logarithmic slide rule.
Slide Rule (1622)
O Developed by William Oughtred, the slide rule expanded on Napier's work by using logarithmic scales. It

N was used primarily for complex calculations like roots, trigonometry, and logarithms, especially by
engineers until the 1970s.

S Pascaline (1642)
Created by French philosopher Blaise Pascal to help his father with tax collection, the Pascaline was a
mechanical calculator that could add and subtract. It used a series of rotating wheels and was limited in
functionality, but it marked a major step in the automation of arithmetic.

P a g e 1 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: History of Computer

2. History of Computers
1. The word 'computer' originally referred to a person who performed mathematical calculations.
2. The first recorded use of the word 'computer' in English was in 1613.
3. The Mechanical Era of computing (1600-1900) involved physical devices operated without
electricity.
4. Tally sticks were ancient record-keeping aids, not calculators, often used in medieval Europe for
tax collection.
M 5. The abacus, dating to 2400 BC in Babylon, is one of the oldest calculating tools, using beads on
rods.
K 6. Napier's Bones (1614), invented by John Napier, used inscribed rods to simplify multiplication and
division.
7. The slide rule (1622), developed by William Oughtred, used logarithmic scales for complex
calculations.
8. The Pascaline (1642) was a mechanical calculator created by Blaise Pascal to perform addition and
P subtraction.
9. Gottfried Wilhelm Leibniz designed the Stepped Reckoner (1672), capable of all four basic
R arithmetic operations.
10. The Arithmometer (1820) by Charles Xavier Thomas de Colmar was the first commercially
E successful mechanical calculator.
11. Charles Babbage, the Father of the Computer, proposed the Difference Engine and Analytical
P Engine.
12. The Difference Engine was designed to compute polynomial functions and print results

A automatically.
13. The Analytical Engine is considered the first design for a general-purpose mechanical computer.
14. Ada Lovelace wrote the first algorithm intended for the Analytical Engine, making her the first
R programmer.
15. Ada Lovelace suggested using binary and conceptualized machine-generated music.
A 16. The Scheutzian Engine (1843) was the first mechanical calculator to automatically print its results.
17. The Jacquard Loom (1881) used punch cards to control weaving patterns, inspiring future
T computer data input.
18. Herman Hollerith's Tabulating Machine (1890) used punched cards for data processing, starting
I with the U.S. Census.
19. The Tabulating Machine's innovation led to the founding of IBM.

O
20. The Electronic Era brought faster, smaller, more reliable machines using electricity and introduced
programmability.
21. Konrad Zuse's Z1 (1936-1938) is considered the first freely programmable mechanical computer.
N 22. The Z1 used binary floating-point arithmetic and input via punched tape.
23. The Atanasoff-Berry Computer (ABC) (1939-1942) was the first electronic digital computer.
S 24. The ABC used binary representation and vacuum tubes to solve systems of linear equations.
25. The Harvard Mark I (1943), or IBM ASCC, was an electromechanical computer over 51 feet long.
26. The Harvard Mark I was used by the U.S. Navy for ballistics calculations during WWII.
27. ENIAC (1946) was the first general-purpose electronic digital computer, containing over 17,000
vacuum tubes.
28. Programming ENIAC required manual reconfiguration using wires and switches.
29. EDVAC (1952), proposed by John von Neumann, introduced the stored-program architecture.

P a g e 10 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs

2. History of Computers
1. What was the original meaning of the word computer
"computer"? d) First commercial computer
a) An electronic calculating device Answer: c) First freely programmable
b) A person who performs mathematical mechanical computer
calculations 7. The Atanasoff-Berry Computer (ABC)
c) A mechanical automation tool introduced which of the following concepts?
M d) A data storage unit
Answer: b) A person who performs
a) Stored-program architecture
b) Use of transistors
K mathematical calculations
2. The Pascaline, invented by Blaise Pascal, was
c) Binary representation and electronic
calculation using vacuum tubes
primarily designed to: d) Integrated circuits
a) Perform multiplication and division Answer: c) Binary representation and
b) Weave complex fabric patterns electronic calculation using vacuum tubes
P c) Assist with tax collection through addition 8. What was the primary use of the Harvard Mark I
and subtraction during World War II?
R d) Solve polynomial equations
Answer: c) Assist with tax collection through
a) Code-breaking
b) Ballistics calculations for the U.S. Navy
E addition and subtraction
3. Which device is considered the first design for a
c) Predicting election results
d) Running business payroll
P general-purpose mechanical computer?
a) Difference Engine
Answer: b) Ballistics calculations for the U.S.
Navy

A b) Analytical Engine
c) Stepped Reckoner
9. ENIAC differed from earlier computers
primarily because it was:
d) Arithmometer a) The first mechanical computer
R Answer: b) Analytical Engine b) The first general-purpose electronic digital
4. Ada Lovelace is historically significant for: computer
A a) Inventing the first mechanical calculator
b) Writing the first algorithm intended for
c) The first to use punch cards
d) The first portable computer
T machine processing
c) Developing the stored-program concept
Answer: b) The first general-purpose
electronic digital computer
I d) Building the first electronic computer
Answer: b) Writing the first algorithm
10. The key architectural concept proposed by John
von Neumann and implemented in EDVAC was:

O
intended for machine processing a) The use of vacuum tubes
5. The Tabulating Machine, which used punched b) Parallel processing
cards for data processing, directly led to the c) The stored-program architecture
N founding of which company? d) Binary logic gates
a) Microsoft Answer: c) The stored-program architecture
S b) IBM
c) Intel
11. UNIVAC I holds the distinction of being the:
a) First computer to use a graphical user
d) Apple interface
Answer: b) IBM b) First commercially sold computer
6. Konrad Zuse's Z1 is notable for being the: c) First computer to connect to the internet
a) First electronic digital computer d) First portable computer
b) First computer to use vacuum tubes Answer: b) First commercially sold computer
c) First freely programmable mechanical

P a g e 15 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 3
Computer System: Architecture and Components
Introduction To Computer And Its Basic Operations
In today's information age, computers are used in every walk of life. They are found in devices ranging

3. Computer System: Architecture and Components


from MP3 players and toys to industrial robots, fighter aircraft, and beyond, making life easier and
more comfortable.

Definition of a Computer
M A computer is an electronic device that accepts input data and instructions via input devices, stores
them until needed, processes the data, and produces output through output devices.
K Basic Operations of a Computer
All computers perform four fundamental operations to carry out any task: Input, Processing, Output,
and Storage.
P • Input Operation: The process of capturing or accepting data or information using input devices (e.g.,
keyboard, mouse).

R • Processing Operation: The transformation of input into output. The Central Processing Unit
(CPU) performs this task under the direction of a program.
• Output Operation: The result or outcome of the processing, delivered via output devices (e.g.,
E monitor, printer, speakers).
• Storage Operation: The process of retaining data, information, or instructions so the user can retrieve
P them when required. Storage can be temporary (e.g., RAM) or permanent (e.g., Hard Disk).

Evolution of Computing Devices


A The term "computing device" refers to any machine that can perform calculations, from simple

R
addition to managing complex systems.
• Early Computing Devices:
o Abacus (c. 3000 BC): Considered the first computer, using a system of sliding beads for calculations.
A o Leibniz's Calculating Machine (1694): A mechanical device that could add, subtract, and multiply
using gears and dials.
T o
o
Difference Engine (1822): Proposed by Charles Babbage to solve differential equations.
Analytical Engine: Babbage's later concept for a general-purpose computer.
I o Tabulating Machine (1889): Developed by Herman Hollerith for the U.S. census, using punched
cards.
O o
o
Z3 (1941): Developed by Konrad Zuse, used for designing airplanes and missiles.
Harvard Mark I (1944): An electromechanical relay computer.
ENIAC (1946): The first general-purpose electronic computer, significantly faster than its
N
o
predecessors.
o EDVAC (1945): Designed by John von Neumann, it introduced the stored-program concept.
S o UNIVAC-I (1951): One of the first commercially available computers.
• Modern Computing Devices: Include personal computers, laptops, tablets, smartphones, and
embedded systems in various appliances and vehicles.

P a g e 1 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
CLASSIFICATION OF COMPUTERS
Computers are classified based on size, performance, and application areas.

Type Description Key Characteristics & Uses

3. Computer System: Architecture and Components


Types: Desktop, Notebook,
The smallest and least expensive Laptop, Handheld (Palmtop,
M Microcomputers
(Personal
class, originally for individual PDA, Smartphone). Used at

K Computers)
users. Now powerful enough for
business networks.
work, home, school. Portable,
lightweight, often battery-
powered.

P High-speed processing
(Billions of Instructions Per
R Second most powerful and Second - BIPS). Supports

E Mainframe
Computers
expensive. Used by large
organizations for critical, bulk-
many terminals
simultaneously. Used for
P data processing. census, ERP, financial

A transactions, airline
reservations, ATMs.
R Extremely high speed

A The most powerful and


(trillions of instructions per
second), massive storage.
T Supercomputers
expensive. Designed for intense
Used for weather forecasting,
scientific, engineering, and
I business applications.
weapon research, space
exploration (NASA),
O complex simulations.

N Includes laptops,
Devices enabling mobile smartphones, tablets, PDAs.
S Mobile Computers computing—processing and Feature wireless connectivity
transmitting data wirelessly. (full-duplex), portability, and
mobile-specific software.

Computer Hardware And Software


Hardware
Computer hardware refers to the physical, tangible components of a computer system.
P a g e 2 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Computer Systems, Architecture and components
1. A computer is an electronic device that accepts input data and instructions, stores them, processes the
data, and produces output.
2. The four fundamental operations of a computer are Input, Processing, Output, and Storage.

3. Computer System: Architecture and Components


3. Input operation involves capturing or accepting data using input devices like a keyboard or mouse.
4. The Central Processing Unit (CPU) performs the transformation of input into output, which is the
processing operation.

M 5. Output operation delivers the result or outcome of processing via devices like a monitor, printer, or
speakers.
6. Storage operation retains data, instructions, or information for future retrieval, and can be temporary
K (RAM) or permanent (Hard Disk).
7. The Abacus (c. 3000 BC) is considered the first computing device, using sliding beads for
calculations.
8. Charles Babbage proposed the Difference Engine (1822) to solve differential equations.
P 9.
10.
The Analytical Engine was Charles Babbage's later concept for a general-purpose computer.
Herman Hollerith's Tabulating Machine (1889) used punched cards and was developed for the U.S.
R 11.
census.
The Z3 (1941), developed by Konrad Zuse, was used for designing airplanes and missiles.

E
12. The Harvard Mark I (1944) was an electromechanical relay computer.
13. ENIAC (1946) was the first general-purpose electronic computer.
14. EDVAC (1945), designed by John von Neumann, introduced the stored-program concept.
P 15. UNIVAC-I (1951) was one of the first commercially available computers.
16. Microcomputers (Personal Computers) are the smallest and least expensive class, originally for
A 17.
individual users.
Types of microcomputers include Desktop, Notebook, Laptop, and Handheld devices (Palmtop, PDA,
R 18.
Smartphone).
Mainframe computers are the second most powerful and expensive, used by large organizations for
A 19.
critical, bulk-data processing.
Mainframes support many terminals simultaneously and are used for census, ERP, financial
transactions, and airline reservations.
T 20. Supercomputers are the most powerful and expensive, designed for intense scientific, engineering,
and business applications.
I 21. Supercomputers are used for weather forecasting, weapon research, space exploration, and complex
simulations.
O 22. Mobile Computers are devices enabling mobile computing—processing and transmitting data
wirelessly.
N 23. Mobile computers include laptops, smartphones, tablets, and PDAs, featuring wireless connectivity
and portability.
S 24. Computer hardware refers to the physical, tangible components of a computer system (e.g., monitor,
keyboard, mouse, CPU).
25. The primary function of hardware is to store and execute software.
26. Computer software is a set of instructions that directs the computer on what to do and how to do it.
27. The primary function of software is to operate the hardware and perform specific tasks.
28. Hardware is physical and tangible, whereas software is logical and intangible.
29. Hardware executes software and performs physical work, while software provides instructions to the
hardware.
30. Hardware understands only binary (0s and 1s), and software provides instructions in binary form.

P a g e 10 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following is NOT one of the 6. Which type of software acts as an interface
four fundamental operations performed by all between the computer hardware and the
computers? application software?

3. Computer System: Architecture and Components


a) Input a) Utility Software
b) Processing b) System Software
c) Communication c) Firmware

M d) Storage
Answer: c) Communication
d) Customized Software
Answer: b) System Software
2. Which early computing device, considered 7. A software translator that converts the
K the first computer, used a system of sliding entire source code into machine code at once,
beads for calculations? producing an object file, is called a(n):
a) Analytical Engine a) Interpreter
b) Difference Engine b) Assembler
P c) Abacus
d) Pascaline
c) Compiler
d) Linker
R Answer: c) Abacus
3. The concept where both program
Answer: c) Compiler
8. Customized banking software developed

E
instructions and data are stored in the same for a specific bank is an example of which
memory was introduced by which computer? category of application software?
a) ENIAC a) General-Purpose Software
P b) Harvard Mark I b) Productivity Software
c) EDVAC c) Special-Purpose Software
A d) UNIVAC-I
Answer: c) EDVAC
d) System Software
Answer: c) Special-Purpose Software
R 4. Which type of computer is specifically
designed for intense scientific applications
9. Software that is copyrighted and
distributed free of charge for use, but whose
A and is the most powerful and expensive?
a) Mainframe Computer
source code is not made available for
modification, is known as:
b) Microcomputer
T
a) Open Source Software
c) Minicomputer b) Shareware
d) Supercomputer c) Freeware
I Answer: d) Supercomputer d) Firmware
5. What is the primary functional distinction Answer: c) Freeware
O between computer hardware and software?
a) Hardware is logical, software is physical.
10. Which component of the CPU is
specifically responsible for fetching,
N b) Hardware provides instructions, software
executes them.
decoding, and executing instructions, and
directing data flow?
S c) Hardware is tangible and performs
physical work, software is intangible and
a) Arithmetic Logic Unit (ALU)
b) Control Unit (CU)
provides instructions. c) Accumulator (AX)
d) Hardware is stored permanently, software d) Cache Memory
is temporary. Answer: b) Control Unit (CU)
Answer: c) Hardware is tangible and 11. Which CPU register holds the memory
performs physical work, software is address of the next instruction to be fetched
intangible and provides instructions. from memory?
a) Instruction Register (IR)

P a g e 16 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 4
Number Systems, Digital Logics and Data
Basics

4. Number Systems, Digital Logics & Data Basics


Introduction to Digital Systems and Data
Modern technology is built upon the principles of digital systems. These systems process information
using discrete values—primarily the binary digits 0 and 1—as opposed to the continuous signals found
M in the natural world. This chapter provides a comprehensive foundation in the core concepts that bridge
data representation, logical processing, and structured data management. We will explore how

K computers represent numbers, text, and multimedia, how they perform logical and arithmetic operations
using Boolean algebra and logic gates, and how complex data is organized and managed in database
systems. Mastery of these topics is essential for understanding the inner workings of all computational
devices.

P Data and Number Systems


Data, Information, and Operations
R • Data is a raw collection of facts, figures, and statistics related to an object. It is an organizational asset
used to view past activities and make future decisions.
E • Information is data that has been processed, manipulated, and organized into a meaningful and useful
context (e.g., a student's percentage result).
P • Data Processing Operations involve a series of actions to convert data into information:
1. Data Capturing: Recording data via source documents or input devices.
A 2. Data Manipulation: This includes:
 Classifying: Organizing data into groups using codes.
R  Calculating: Performing arithmetic operations.
 Sorting: Arranging data in a logical sequence.

A  Summarizing: Condensing data into a concise form.


3. Managing Output Results: This involves storing, retrieving, communicating, and reproducing the
processed information.
T Number Systems
I Number systems define how values are represented using symbols. Computers use different systems
for internal processing and human-readable formats.
O System Base Digits/Symbols Primary Use
N Decimal 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Human everyday use.

S Binary 2 0, 1 Internal computer processing.


Historical computing; compact
Octal 8 0, 1, 2, 3, 4, 5, 6, 7
binary representation (3 bits/digit).
Modern compact binary
0-9, A(10), B(11), C(12),
Hexadecimal 16 representation (4 bits/digit);
D(13), E(14), F(15)
memory addressing.

P a g e 1 | 14
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Number Systems, Digital Logics and Data Basics
1. Data is a raw collection of facts, figures, and statistics related to an object, used for viewing past
activities and making future decisions.
2. Information is data that has been processed, manipulated, and organized into a meaningful and useful

4. Number Systems, Digital Logics & Data Basics


context.
3. The first data processing operation is Data Capturing, which involves recording data via source
documents or input devices.
M 4. Data Manipulation includes the actions of Classifying, Calculating, Sorting, and Summarizing data.
5. The decimal number system uses a base of 10 and the digits 0-9, and is primarily for human everyday
use.
K 6. The binary number system uses a base of 2 and the digits 0 and 1, and is used for internal computer
processing.
7. The octal number system uses a base of 8 and digits 0-7, historically used for compact binary
representation (3 bits/digit).
P 8. The hexadecimal number system uses a base of 16 and digits 0-9 and A-F, used for modern compact
binary representation (4 bits/digit) and memory addressing.
R 9. Binary representation is used because digital circuits are built from transistors with two stable states:
ON (1) and OFF (0).

E 10. To convert a decimal number to another base, repeatedly divide the decimal number by the target base
and record remainders from bottom to top.
11. To convert binary to octal, group bits into sets of three from the right, pad with leading zeros if
P needed, and convert each group to its octal digit.
12. To convert binary to hexadecimal, group bits into sets of four from the right, pad with leading zeros if
A needed, and convert each group to its hex digit.
13. To convert octal to binary, convert each octal digit to its 3-bit binary equivalent.
R 14. To convert hexadecimal to binary, convert each hex digit to its 4-bit binary equivalent.
15. Whole numbers (unsigned integers) use all bits for magnitude; for n bits, the range is 0 to (2ⁿ – 1).
A 16. Signed integers use the Most Significant Bit (MSB) as a sign bit: 0 for positive, 1 for negative.
17. The Two's Complement method is used to represent negative integers: invert all bits of the positive

T number and add 1 to the result.


18. For an n-bit signed integer using two's complement, the range is -2ⁿ⁻¹ to (2ⁿ⁻¹ – 1).
19. Real numbers (with fractions) are represented using floating-point notation: Sign × Mantissa ×
I 2^Exponent.
20. Single-precision floating-point format uses 32 bits: 1 sign bit, 8 exponent bits, and 23 mantissa bits.
O 21. Double-precision floating-point format uses 64 bits: 1 sign bit, 11 exponent bits, and 52 mantissa bits.
22. To convert a fractional decimal part to binary, multiply the fraction by 2 repeatedly, recording the
N integer part each time.
23. Binary addition follows the rules: 0+0=0, 0+1=1, 1+0=1, 1+1=0 with a carry of 1.
S 24. Binary subtraction is performed by adding the two's complement of the subtrahend to the minuend.
25. ASCII (American Standard Code for Information Interchange) uses 7 bits, representing 128 characters.
26. Extended ASCII uses 8 bits, representing 256 characters.
27. Unicode is a universal standard designed to represent characters from all world languages.
28. UTF-8 is a variable-length Unicode encoding (1-4 bytes) that is backward compatible with ASCII.
29. UTF-16 is a variable-length Unicode encoding using 2 or 4 bytes per character.
30. UTF-32 is a fixed-length Unicode encoding using 4 bytes per character.
31. Digital images are composed of pixels, with color often represented by RGB (Red, Green, Blue)
values ranging from 0-255 each.

P a g e 7 | 14
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the key difference between data d) 11110
and information? Answer: b) 11101
a) Data is processed, information is raw. 6. The binary number 11010101 is equivalent

4. Number Systems, Digital Logics & Data Basics


b) Data is meaningful, information is a to which hexadecimal number?
collection of facts. a) D5
c) Data is raw, information is processed and b) C5
M meaningful.
d) Data is stored electronically, information
c) D4
d) E5
is printed. Answer: a) D5
K Answer: c) Data is raw, information is 7. What is the range of values for an 8-bit
processed and meaningful. unsigned integer?
2. Which of the following is NOT a step in a) -128 to +127
data manipulation? b) 0 to 255
P a) Classifying
b) Capturing
c) -255 to +255
d) 0 to 511
R c) Calculating
d) Summarizing
Answer: b) 0 to 255
8. In the two's complement representation,

E Answer: b) Capturing
3. Which number system uses a base of 8 and
how is the negative equivalent of a positive
binary number formed?
is historically significant for representing 3 a) Invert all bits.
P binary bits per digit? b) Invert all bits and subtract 1.
a) Decimal c) Invert all bits and add 1.
A b) Hexadecimal
c) Octal
d) Add 1 to the number.
Answer: c) Invert all bits and add 1.
R d) Binary
Answer: c) Octal
9. In a 32-bit single-precision floating-point
format, how many bits are allocated to the
A 4. What is the primary reason computers use
the binary number system internally?
mantissa (significand)?
a) 1 bit

T a) It is easy for humans to understand.


b) It allows for complex mathematical
b) 8 bits
c) 23 bits
operations. d) 52 bits
I c) It aligns with the two stable states Answer: c) 23 bits
(ON/OFF) of transistors in digital circuits. 10. Which Unicode encoding form is
O d) It provides the most compact
representation of numbers.
variable-length and backward compatible
with ASCII, making it the most common on
N Answer: c) It aligns with the two stable
states (ON/OFF) of transistors in digital
the web?
a) UTF-16
S circuits.
5. To convert the decimal number 29 to
b) UTF-32
c) UTF-8
binary, what is the correct sequence of d) ASCII-8
remainders from the repeated division-by-2 Answer: c) UTF-8
process? 11. In digital image representation, what does
a) 10111 the RGB model define?
b) 11101 a) Red, Gray, Blue color components
c) 11011 b) Red, Green, Blue color intensities
c) Resolution, Gamma, Brightness

P a g e 10 | 14
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 5
Operating Systems
What is Software?
Software represents the logical component of a computer system—the intangible instructions that bring

5. Operating Systems
hardware to life. Without software, even the most advanced computer hardware remains nothing more
than an inert collection of electronic circuits and components.
Formal Definition: Software is a comprehensive collection of computer programs, procedures, and
M associated documentation that instructs a computer on what tasks to perform and how to perform them.
It serves as the intermediary between human intentions and machine execution.

K Types of Software: A Fundamental Classification


Software is broadly classified into two main categories, each serving distinct but complementary roles
in the computing ecosystem:
System Software
P Definition: System software comprises programs designed to manage and operate computer hardware,
providing a stable platform upon which application software can run. This software category acts as the
R fundamental bridge between hardware components and user applications.
Key Characteristics:
E •

Acts as an intermediary between hardware and user applications
Essential for computer operation (cannot run without it)
P •

Typically pre-installed or comes with the system
Operates largely in the background
A Major Components:
1. Operating Systems (OS): The most critical system software that manages all hardware resources and

R provides common services for computer programs.


o Examples: Windows, macOS, Linux, Android, iOS
2. Device Drivers: Specialized programs that enable the operating system to communicate with hardware
A devices.
o Examples: Printer drivers, graphics card drivers, network adapter drivers
T 3. Utility Programs: Software tools designed to help manage, maintain, and optimize the computer
system.
I o Examples: Antivirus software, disk cleanup tools, backup utilities, system monitors
Primary Purpose: To manage hardware resources efficiently and create a stable, predictable
O environment for other software to execute.
Application Software
N Definition: Application software consists of programs designed to help users perform specific tasks or
solve particular problems. Unlike system software, these programs fulfill user needs directly.
S •
Key Characteristics:
Controlled by users to perform specific tasks
• Optional—installed based on user requirements
• Focuses on end-user productivity, creativity, or entertainment
• Requires system software to function
Major Categories:
1. Productivity Software: Tools for office work and document creation
o Examples: Microsoft Word, Google Docs, Microsoft Excel
2. Communication Software: Applications for information exchange
P a g e 1 | 25
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One-Liners: Operating Systems
1. Software is a collection of computer programs, procedures, and documentation that instructs a computer
on what to do and how to do it.
2. Without software, computer hardware is a useless collection of electronic components.

5. Operating Systems
3. System software manages computer hardware and provides a platform for running application software.
4. System software acts as an intermediary between hardware and user applications.
5. Operating systems, device drivers, and utility programs are examples of system software.
M 6. The purpose of system software is to manage hardware resources and create a stable environment for
other software.
7. Application software helps users perform specific tasks or solve particular problems.
K 8. Application software fulfills user needs directly through programs like word processors and web
browsers.
9. System software controls hardware; application software is controlled by users to perform tasks.
10. A computer cannot run without system software; application software is optional based on user needs.
P 11. System software is usually pre-installed; application software is installed by users.
12. An operating system is the most critical type of system software, acting as an interface between user
R and hardware.
13. The OS controls program execution and manages computer resources.

E 14. The primary purpose of an OS is to act as a resource manager for hardware and software resources.
15. An OS provides a user interface offering a stable way for users and applications to interact with
hardware.
P 16. A command line interface (CLI) is text-based, requiring users to type specific commands.
17. CLI is powerful and flexible but has a steep learning curve requiring command memorization.
A 18. DOS was one of the first widely-installed OS for IBM-compatible PCs using commands like DIR and
COPY.
R 19. UNIX is a powerful, multi-user, multitasking OS forming the basis for Linux and macOS.
20. A menu-driven interface presents users with screens of options, requiring no command memorization.
A 21. Menu-driven interfaces are simpler than CLI but less flexible, ideal for systems like ATMs.
22. A graphical user interface uses graphics and is interacted with via pointing devices like mice.

T 23. GUI is user-friendly and easier to learn but may be slower for advanced tasks compared to CLI.
24. Microsoft Windows evolved from an environment on top of DOS to a full-fledged GUI OS.
25. macOS is Apple's GUI OS known for user-friendly design.
I 26. Linux is a free, open-source OS kernel; distributions like Ubuntu provide complete user-friendly
systems.
O 27. CLI offers more precise control over file systems and OS compared to GUI.
28. GUI provides excellent multitasking with visual cues for multiple windows.
N 29. CLI can be faster for experienced users due to keyboard-only operation.
30. GUI uses more system resources to render graphics compared to CLI.
S 31. CLI is excellent for scripting and automating command sequences.
32. A single-user OS is designed for one person at a time.
33. A single-tasking OS runs only one application at a time (e.g., old MS-DOS).
34. A single-user multitasking OS allows one user to run multiple applications concurrently.
35. A multi-user OS allows multiple users to access system resources simultaneously.
36. Time-sharing divides CPU time into slices allocated among multiple users.
37. Batch processing OS collects jobs in batches and processes them without user interaction.
38. Batch processing is efficient for CPU utilization in tasks like payroll systems.
39. A disadvantage of batch processing is lack of interactivity and difficult debugging.

P a g e 18 | 25
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the fundamental role of System DIR and COPY?
Software? a) UNIX
a) To help users perform specific tasks like b) Windows 95

5. Operating Systems
word processing. c) DOS (Disk Operating System)
b) To manage and operate computer hardware, d) macOS
providing a platform for application software. Answer: c) DOS (Disk Operating System)
M c) To provide entertainment and games for
users.
6. What is a primary advantage of a
Graphical User Interface (GUI) over a
d) To connect the computer to the internet. Command Line Interface (CLI)?
K Answer: b) To manage and operate a) It offers more precise control over the file
computer hardware, providing a platform system.
for application software. b) It is faster for experienced users to perform
2. Which of the following is a key distinction complex tasks.
P between System Software and Application
Software?
c) It is more user-friendly and easier to learn,
using visual recognition.
R a) System Software is optional, Application
Software is essential.
d) It uses fewer system resources like RAM
and CPU.

E b) System Software is installed by the user,


Application Software is pre-installed.
Answer: c) It is more user-friendly and
easier to learn, using visual recognition.
c) A computer cannot run without System 7. An OS that allows only one user to run
P Software, but Application Software is multiple applications concurrently is
optional. classified as:
A d) Application Software controls the hardware
directly.
a) Multi-User, Single-Tasking
b) Single-User, Multitasking
R Answer: c) A computer cannot run without
System Software, but Application Software
c) Multi-User, Multitasking
d) Single-User, Single-Tasking
A is optional.
3. The most critical type of system software 8.
Answer: b) Single-User, Multitasking
In a multi-user operating system, the

T that acts as an interface between the user


and the computer hardware is the:
technique where CPU time is divided into
small slices and allocated among multiple
a) Device Driver users is called:
I b) Utility Program a) Batch Processing
c) Operating System (OS) b) Multiprogramming
O d) Compiler
Answer: c) Operating System (OS)
c) Time-Sharing
d) Real-Time Processing
N 4. Which type of user interface is
characterized by a text-based environment 9.
Answer: c) Time-Sharing
Which type of operating system is designed
S where users must type specific commands?
a) Graphical User Interface (GUI)
to process jobs collected in batches without
any user interaction, ideal for payroll
b) Menu-Driven Interface (MDI) systems?
c) Command Line Interface (CLI) a) Real-Time OS
d) Touch Interface b) Time-Sharing OS
Answer: c) Command Line Interface (CLI) c) Batch Processing OS
5. Which early operating system was one of d) Distributed OS
the first widely-installed for IBM- Answer: c) Batch Processing OS
compatible PCs and used commands like

P a g e 21 | 25
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 6
Artificial Intelligence (AI)
What is Artificial Intelligence?
Definition: Artificial Intelligence (AI) is the branch of computer science that aims to create systems

6. Artificial Intelligence (AI)


capable of performing tasks that normally require human intelligence. These tasks include learning,
reasoning, problem-solving, perception, language understanding, and decision-making.
Conceptual Understanding: AI represents the science and engineering of making intelligent machines,
M particularly intelligent computer programs. It is related to the similar task of using computers to
understand human intelligence, but AI does not have to confine itself to methods that are biologically
observable.
K Historical Context: The term "Artificial Intelligence" was first coined by John McCarthy in 1956 at
the Dartmouth Conference. He defined it as "the science and engineering of making intelligent
machines."

P Fundamental Goals of AI
The primary objectives of artificial intelligence research can be categorized into four main goals:

R Systems That Think Like Humans


• Systems that model human cognitive processes
E •

Example: Cognitive architectures that simulate human reasoning patterns
Approach: Study how humans think through introspection, psychological experiments, and brain
P imaging
Systems That Think Rationally
A • Systems that follow logical reasoning principles
• Example: Theorem provers that use formal logic
R • Approach: Use computational models of logical reasoning
Systems That Act Like Humans
A • Systems that exhibit human-like behavior
• Example: Chatbots that mimic human conversation
T • Approach: The Turing Test as a behavioral measure

I •
Systems That Act Rationally
Systems that make optimal decisions to achieve goals

O •

Example: Autonomous robots that navigate efficiently
Approach: Rational agent theory and decision theory
Real-World Example: Consider a self-driving car. It must:
N • Think like humans: Understand traffic patterns intuitively
• Think rationally: Calculate optimal routes mathematically
S •

Act like humans: Signal before turning like human drivers
Act rationally: Make safe decisions to reach the destination

Approaches to Artificial Intelligence


AI researchers have developed several distinct approaches to creating intelligent systems:
Symbolic AI (Good Old-Fashioned AI - GOFAI)
Concept: Uses symbols to represent problems and logical rules to manipulate them.
Characteristics:

P a g e 1 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• Knowledge representation using symbols
• Rule-based reasoning systems
• Explicit programming of knowledge
Example: Expert systems for medical diagnosis that use if-then rules:

6. Artificial Intelligence (AI)


IF patient has fever AND cough > 3 days
AND chest pain = True
THEN probability of pneumonia = 70%
M• Limitations:
Brittle (fails with incomplete information)

K •• Knowledge acquisition bottleneck


Poor handling of uncertainty
Connectionist Approach (Neural Networks)
Concept: Models intelligence using artificial neural networks inspired by biological brains.
P •
Characteristics:
Distributed representation

R •

Learning from examples
Parallel processing
Example: Handwriting recognition systems that learn from thousands of handwriting samples.
E Advantages:
• Robust to noisy data
P •

Can learn complex patterns
Generalizes well to new examples
A Evolutionary Approach
Concept: Uses principles of natural selection and genetic algorithms.
R Characteristics:
• Population-based search
A •

Fitness-based selection
Crossover and mutation operations
T Example: Optimizing antenna designs by evolving thousands of virtual antennas and selecting the best
performers.
I Bayesian Approach
Concept: Uses probability theory to handle uncertainty.
O Characteristics:
• Probabilistic reasoning
N •

Bayesian networks
Statistical learning
S Example: Spam filters that calculate the probability of an email being spam based on word frequencies.

Types of Artificial Intelligence


AI systems can be classified based on their capabilities and functionalities:
Based on Capabilities
1. Narrow AI (Weak AI)
• Designed for specific tasks
• Cannot perform beyond its programmed scope
• Examples: Chess programs, recommendation systems, voice assistants
P a g e 2 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
for each child in EXPAND(node, problem) do
s ← [Link]
if [Link]-TEST(s) then return SOLUTION(child)

6. Artificial Intelligence (AI)


if s is not in reached then
add s to reached
add child to frontier

M return failure
Properties:
K •• Complete: Yes (if branching factor finite)
Optimal: Yes (if all actions have same cost)
• Time: O(b^d) where b = branching factor, d = depth
• Space: O(b^d) (stores all nodes)
Example: Finding shortest path in unweighted graph.
P 2. Depth-First Search (DFS)

R
function DFS(problem) returns solution or failure
frontier ← LIFO stack containing Node([Link])

E reached ← {[Link]}

P while not IS-EMPTY(frontier) do

A
node ← POP(frontier)
if [Link]-TEST([Link]) then return SOLUTION(node)

R for each child in EXPAND(node, problem) do


s ← [Link]
A if s is not in reached then
add s to reached
T add child to frontier

I return failure
Properties:

O
• Complete: No (can get stuck in infinite depth)
• Optimal: No
• Time: O(b^m) where m = maximum depth
N • Space: O(bm) (linear in depth)
3. Depth-Limited Search
S •

DFS with depth limit l
Returns failure if no solution within depth l
4. Iterative Deepening Search
function ITERATIVE-DEEPENING-SEARCH(problem) returns solution or failure
for depth = 0 to ∞ do
result ← DEPTH-LIMITED-SEARCH(problem, depth)
if result ≠ cutoff then return result

P a g e 13 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
for each a in ACTIONS(state) do
v ← MAX(v, MIN-VALUE(RESULT(state, a)))
return v

6. Artificial Intelligence (AI)


function MIN-VALUE(state) returns utility value
if TERMINAL-TEST(state) then return UTILITY(state)

M v ← ∞
for each a in ACTIONS(state) do
K v ← MIN(v, MAX-VALUE(RESULT(state, a)))
return v
Properties:
• Complete: Yes (if tree finite)
P • Optimal: Yes (against optimal opponent)
• Time: O(b^m)
R • Space: O(bm) (depth-first)
Alpha-Beta Pruning
E function ALPHA-BETA-SEARCH(state) returns action

P v ← MAX-VALUE(state, -∞, ∞)
return the action in ACTIONS(state) with value v
A
R
function MAX-VALUE(state, α, β) returns utility value
if TERMINAL-TEST(state) then return UTILITY(state)

A v ← -∞
for each a in ACTIONS(state) do
T v ← MAX(v, MIN-VALUE(RESULT(state, a), α, β))
if v ≥ β then return v
I α ← MAX(α, v)

O return v

N function MIN-VALUE(state, α, β) returns utility value


if TERMINAL-TEST(state) then return UTILITY(state)
S v ← ∞
for each a in ACTIONS(state) do
v ← MIN(v, MAX-VALUE(RESULT(state, a), α, β))
if v ≤ α then return v
β ← MIN(β, v)
return v

P a g e 18 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Ethical Frameworks
• Consequentialism: Judge by outcomes
• Deontology: Follow rules/duties
• Virtue Ethics: Focus on character

6. Artificial Intelligence (AI)


• Rights-based: Protect individual rights
Bias and Fairness in AI
M• Types of Bias
Dataset Bias: Underrepresentation in training data
K •• Algorithmic Bias: Unequal treatment by algorithm
Measurement Bias: Flawed measurement of target variable
• Historical Bias: Past discrimination encoded in data
Fairness Definitions
P •

Demographic Parity: Equal selection rates across groups
Equal Opportunity: Equal true positive rates
R •

Equalized Odds: Equal true positive and false positive rates
Individual Fairness: Similar individuals treated similarly

E Mitigation Strategies
• Pre-processing: Adjust training data
P •

In-processing: Modify learning algorithm
Post-processing: Adjust model outputs
A • Adversarial Debiasing: Use adversarial training
Transparency and Explainability
R Explainable AI (XAI)
A •

Interpretable Models: Simple, understandable models
Model Explanation: Explain complex model decisions
T •

Model Inspection: Understand how model works
Model Transparency: Clear about capabilities and limitations

I •
Explanation Methods
LIME: Local Interpretable Model-agnostic Explanations
O •

SHAP: Shapley Additive Explanations
Counterfactual Explanations: "What if" scenarios
N • Attention Visualization: Show what model focuses on
Right to Explanation
S •

GDPR Article 22: Right to meaningful information about logic involved
Need for human-understandable explanations
• Balancing transparency with intellectual property

Privacy and Security


Privacy-Preserving AI
• Differential Privacy: Add noise to protect individuals
• Federated Learning: Train on decentralized data

P a g e 41 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One-Liners: Artificial Intelligence (AI)
1. Artificial Intelligence is the science and engineering of making intelligent machines that can perform
tasks requiring human intelligence.
2. The Turing Test, proposed by Alan Turing in 1950, evaluates a machine's ability to exhibit intelligent

6. Artificial Intelligence (AI)


behavior indistinguishable from a human.
3. The Chinese Room Argument by John Searle challenges strong AI by arguing that symbol manipulation
alone does not create understanding.
M 4. An intelligent agent perceives its environment through sensors and acts upon it through actuators to
achieve goals.

K 5. A rational agent selects actions that maximize its expected performance measure given its percept
sequence and built-in knowledge.
6. Breadth-First Search is complete and optimal for uniform cost but has exponential space complexity
O(b^d).
7. Depth-First Search uses linear space O(bm) but is neither complete nor optimal in infinite spaces.
P 8. A* search uses f(n) = g(n) + h(n) and is optimal if h(n) is admissible (never overestimates) and
complete if branching factor is finite.
R 9. An admissible heuristic never overestimates the cost to reach the goal, while a consistent heuristic
satisfies h(n) ≤ c(n,a,n') + h(n').
E 10. Minimax algorithm evaluates game trees assuming optimal play by both players, with time complexity
O(b^m) for depth m.

P 11. Alpha-beta pruning improves minimax by eliminating branches that cannot affect the final decision,
reducing time to O(b^(m/2)) in best case.
12. Propositional logic uses atomic sentences connected by operators (¬, ∧, ∨, ⇒, ⇔) and supports
A inference through resolution.
13. First-order logic extends propositional logic with quantifiers (∀, ∃), predicates, functions, and variables
R for more expressive knowledge representation.
14. Modus Ponens (α ⇒ β, α / ∴ β) and Resolution (α ∨ β, ¬β ∨ γ / ∴ α ∨ γ) are fundamental inference rules
A in logic.
15. Unification finds substitutions that make two logical expressions identical, enabling generalized modus
T ponens in first-order logic.
16. Machine learning algorithms improve their performance on a task through experience, measured by a

I performance metric.
17. Supervised learning uses labeled training data {(xᵢ, yᵢ)} to learn mapping f: X → Y for classification or
regression.
O 18. Unsupervised learning discovers patterns in unlabeled data through clustering, dimensionality
reduction, or association rule learning.
N 19. Reinforcement learning agents learn optimal policies through interaction with environment to maximize
cumulative reward.
S 20. Overfitting occurs when a model learns training data noise, while underfitting happens when model is
too simple to capture patterns.
21. Bias-variance tradeoff: simple models have high bias (underfit), complex models have high variance
(overfit).
22. Cross-validation estimates model performance by partitioning data into training and validation sets
multiple times.
23. Linear regression models continuous outputs using y = wᵀx + b, optimized by minimizing mean squared
error.

P a g e 45 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following best defines complexity?
Artificial Intelligence? a) Depth-First Search
a) Programming computers to perform specific b) Breadth-First Search

6. Artificial Intelligence (AI)


tasks efficiently c) Hill Climbing
b) Creating systems that can perform tasks d) Simulated Annealing
requiring human intelligence Answer: b) Breadth-First Search
M c) Building expert systems for narrow
domains only
6. In A search, a heuristic function h(n) is
admissible if:*

K d) Simulating human brain neurons in


software
a) h(n) never underestimates the true cost to
reach the goal
Answer: b) Creating systems that can b) h(n) is always equal to the true cost to reach
perform tasks requiring human intelligence the goal
2. The Turing Test evaluates a machine's c) h(n) never overestimates the true cost to
P ability to:
a) Solve complex mathematical problems
reach the goal
d) h(n) is calculated using only local
R b) Exhibit intelligent behavior
indistinguishable from humans
information
Answer: c) h(n) never overestimates the
E c) Learn from experience without human
intervention 7.
true cost to reach the goal
Alpha-beta pruning improves minimax

P d) Process natural language with perfect


accuracy
algorithm by:
a) Expanding all possible game tree nodes
Answer: b) Exhibit intelligent behavior b) Eliminating branches that cannot affect
A indistinguishable from humans final decision
3. John Searle's Chinese Room Argument c) Using heuristic evaluation functions at all
R challenges:
a) The feasibility of machine learning
nodes
d) Searching deeper in promising branches
A algorithms
b) The possibility of computers achieving true
only
Answer: b) Eliminating branches that
T understanding
c) The ethical implications of AI development 8.
cannot affect final decision
In propositional logic, the resolution rule

I
d) The computational efficiency of neural states that from α ∨ β and ¬β ∨ γ, we can
networks infer:
Answer: b) The possibility of computers a) α ∧ γ
O achieving true understanding b) α ∨ γ
4. A rational agent in AI is defined as one c) β ⇒ γ
N that:
a) Always makes perfect decisions
d) ¬α ⇒ γ
Answer: b) α ∨ γ
S b) Has complete knowledge of its environment
c) Maximizes expected performance given
9. First-order logic extends propositional logic
by adding:
available information a) Probabilistic reasoning capabilities
d) Mimics human decision-making processes b) Quantifiers, predicates, and variables
exactly c) Temporal operators for time reasoning
Answer: c) Maximizes expected d) Fuzzy logic for handling uncertainty
performance given available information Answer: b) Quantifiers, predicates, and
5. Which search algorithm is complete and variables
optimal but has exponential space
P a g e 48 | 52
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 7
Theory of Automata
Introduction to Automata Theory

7. Theory of Automata
The Foundation: What is Computation?
At its heart, computer science seeks to understand what can and cannot be computed, and the resources
required to do so. Before the advent of physical computers, mathematicians and logicians like Alan
Turing, Alonzo Church, Emil Post, and others sought to define the very notion of an "effective
M procedure" or "algorithm." Automata theory provides the formal models for these procedures.
Conceptual Definition: An automaton (plural: automata) is an abstract, mathematical model of a
K machine that follows a predetermined sequence of operations to process information. It is a finite
representation of a system that receives input, changes its internal state according to a set of rules, and
may produce output.
Real-Life Analogy: Consider a simple vending machine. It has a finite number of
P states: Idle, Amount_Entered_Partial, Amount_Entered_Full. It receives input (coins of different
denominations). Based on the current state and the input coin, it transitions to a new state (e.g.,

R from Idle to Amount_Entered_Partial). When the state Amount_Entered_Full is reached, it delivers the
product (output) and returns to Idle. This is a finite automaton in the physical world.

E Key Objectives and Relevance


The study of automata theory serves several critical purposes:
P 1. To Formalize Computation: It provides precise, mathematical definitions for computing devices, from
the very simple to the very powerful.
A 2. To Classify Problems: It allows us to categorize computational problems based on the type of machine
(and hence resources like memory) needed to solve them.

R 3. To Understand Limitations: It leads to profound, provable statements about the limits of computation
(e.g., the Halting Problem).
4. Foundations for Practical Tools: The theories directly underpin the design of compilers (lexical
A analysis, parsing), text processors (regular expression search), hardware design (sequential circuits),
and protocol analysis.
T The Chomsky Hierarchy: A Roadmap
I The central organizing framework of automata theory is the Chomsky Hierarchy, proposed by linguist
Noam Chomsky. It establishes a containment hierarchy of formal grammars and their corresponding

O recognizing machines. This hierarchy will be our guide throughout these notes.
Grammar Language Recognizing Production Memory
N Type Class Automaton Rules (Example) Constraint

S Type 0 Recursively
Enumerable
Turing Machine
(TM)
α→β
(Unrestricted)
Unlimited

Type 1 Context- Linear-Bounded αAβ → αγβ Linear in


Sensitive Automaton (LBA) input size
Type 2 Context-Free Pushdown A→γ Unlimited
Automaton (PDA) Stack

P a g e 1 | 15
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Type 3 Regular Finite Automaton A → aB, A → a Finite
(FA) Memory
Table: The Chomsky Hierarchy showing the relationship between grammars, languages, and machines.
We will study these machines in ascending order of power: Finite Automata, Pushdown Automata,

7. Theory of Automata
and Turing Machines. Context-sensitive languages and LBAs are often covered at a more introductory
level in FPSC exams due to their complexity.

Finite Automata (FA)


M Finite Automata model systems with a finite amount of memory. The entire "history" of computation

K
that is relevant for future actions is summarized in the current state. They are the simplest model in our
hierarchy.

Basic Concepts and Definitions


Formal Definition (Deterministic Finite Automaton - DFA): A DFA is a 5-tuple, (Q, Σ, δ, q₀, F),
P 1.
where:
Q: A finite set of states.
R 2.
3.
Σ: A finite set of input symbols (the alphabet).
δ: The transition function, δ: Q × Σ → Q. It maps a state and an input symbol to the next state.
4. q₀: The start state, an element of Q.
E 5. F: A set of final (or accepting) states, a subset of Q.
Key Idea: A DFA is "deterministic" because for every state and every input symbol, there is exactly
P one specified next state. There is no ambiguity.
Graphical Representation (State Diagram): A directed graph where:
A •

Circles represent states.
Arrows represent transitions (labeled with an input symbol).
R •

An arrow with no source marks the start state.
Double circles denote final states.

A •
Example 2.1: Let's design a DFA that accepts all strings over Σ = {0, 1} that end with '01'.
Intuition: The machine must "remember" the last two symbols seen.
States:
T

o q₀: Start. Remembers nothing relevant or the last symbol was not '0'.
o q₁: Remembers that the last symbol was a '0'.
I o

q₂: Remembers that the last two symbols were '01' (ACCEPTING).
Transitions:
O o
o
In q₀, on input '0', go to q₁. On '1', stay in q₀.
In q₁, on input '0', stay in q₁. On '1', go to q₂.
N o

In q₂, on input '0', go to q₁. On '1', go to q₀.
**F = {q₂}`.

S Tabular Representation (Transition Table): Often used for algorithmic processing.


State Input 0 Input 1
→ q₀ q₁ q₀
q₁ q₁ q₂
q₂ q₁ q₀

P a g e 2 | 15
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One-Liners: Theory of Automata
1. DFA vs NFA: In DFA, δ: Q×Σ→Q; in NFA, δ: Q×Σ→P(Q) with possible ε-transitions.

7. Theory of Automata
2. Subset Construction: Converts NFA to DFA, where each DFA state represents a set of NFA states.
3. ε-closure: Set of all states reachable from a given state via ε-transitions alone.
4. Myhill-Nerode Theorem: Language L is regular iff it has finite number of equivalence classes under
M the indistinguishability relation.
K 5. Minimization Algorithm: Uses partition refinement to merge indistinguishable states in a DFA.
6. Arden's Theorem: If equation is X = AX + B, then smallest solution is X = A*B, provided ε∉A.
7. Left Linear Grammar: Productions of form A→Ba or A→a; Right Linear Grammar: A→aB or A→a.
P 8. Pumping Lemma Contrapositive: To prove L not regular, show ∀p ∃s∈L with |s|≥p such that ∀xyz=s
R with |xy|≤p & |y|>0, ∃i≥0 with xyⁱz∉L.

E 9. Regular Closure: Closed under all Boolean operations, concatenation, Kleene star, reversal,
homomorphisms.
P 10. CFG Ambiguity: Grammar ambiguous if ∃w∈L with ≥2 leftmost derivations or parse trees.
A 11. Inherent Ambiguity: Language where every CFG for it is ambiguous (e.g., {aⁿbⁿcᵐdᵐ} ∪ {aⁿbᵐcᵐdⁿ}).

R 12. CNF Conversion: Eliminates ε-productions, unit productions, then converts to A→BC or A→a.
13. Greibach Normal Form: All productions A→aα where α∈V* and a∈T.
A 14. PDA Acceptance Modes: Final state and empty stack are equivalent for nondeterministic PDA.
T 15. Deterministic PDA: At most one move for each (state, input, stack-top) combination.

I 16. DPDA Languages: DCFL properly contained in CFL; not closed under union, intersection.

O
17. CFL Pumping Lemma: For long strings z, can write z=uvwxy with vx non-empty, |vwx|≤p, and
uvⁱwxⁱy∈L ∀i≥0.
N 18. Ogden's Lemma: Strengthened pumping lemma where specific positions can be "marked."

S 19. CFL Closure: Closed under union, concatenation, Kleene star, homomorphism, reversal. Not closed
under intersection, complement.
20. CFL Intersection with Regular: Always a CFL (useful closure property).
21. CYK Algorithm: O(n³) dynamic programming algorithm for membership in a CFL given in CNF.
22. Turing Machine Configuration: Triple (state, tape contents, head position).
23. Multi-tape TM Simulation: k-tape TM can be simulated by 1-tape TM with O(T²(n)) time.
P a g e 9 | 15
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following statements about a) |xy| ≤ p
finite automata is FALSE? b) |y| > 0
a) Every NFA can be converted to an c) xyⁱz ∈ L for all i ≥ 0

7. Theory of Automata
equivalent DFA d) All conditions hold, so L is regular
b) Every DFA is also an NFA Answer: c) (Pumping y of 0s changes length
c) The language accepted by an NFA with n to not be multiple of 10)
M states may require a DFA with 2ⁿ states
d) An NFA with ε-transitions is more
7. A grammar with productions S → aS | bS
| a | b is:

K powerful than one without


Answer: d) (Both are equally powerful)
a) Type 3 (Regular)
b) Type 2 (Context-Free)
2. The minimum number of states required c) Type 1 (Context-Sensitive)
in a DFA that accepts all strings over {0,1} d) Type 0 (Unrestricted)
whose 5th symbol from the right end is 1 is: Answer: a) (Right-linear grammar)
P a) 32
b) 16
8. The language {aⁿbⁿcⁿ | n ≥ 0} is:
a) Regular
R c) 8
d) 6
b) Context-Free
c) Context-Sensitive but not CF
E Answer: a) (2⁵ = 32 states needed to
remember last 5 symbols)
d) Recursively Enumerable but not CS
Answer: c)

P 3. According to the Myhill-Nerode theorem,


a language is regular if and only if:
9. Which of the following is TRUE about
ambiguous CFGs?
a) It satisfies the pumping lemma a) Every ambiguous grammar can be
A b) It has a finite number of equivalence classes converted to an unambiguous one
under the indistinguishability relation b) Every language has an unambiguous
R c) It can be expressed by a regular expression
d) It is accepted by some NFA
grammar
c) Some languages are inherently ambiguous
A Answer: b)
4. Which of these languages is NOT
d) Ambiguity doesn't affect parsing
Answer: c)
T regular?
a) {w ∈ {0,1}* | w contains an equal number
10. In Chomsky Normal Form, the
maximum number of steps to derive a

I of 0s and 1s}
b) {w ∈ {0,1}* | w ends with 00}
string of length n is:
a) n
c) {w ∈ {0,1}* | w contains 010 as substring} b) 2n-1
O d) {0ⁿ | n is a prime number} c) n²
Answer: a) and d) are both not regular, but d) 2n
N if only one answer: a) is the classic example
**5. The regular expression
Answer: b) (2n-1 derivation steps)
11. The language {ww | w ∈ {0,1}*} is:
S (a+b)a(a+b)a(a+b)* generates:**
a) Strings with exactly two a's
a) Regular
b) Context-Free
b) Strings with at least two a's c) Context-Sensitive but not CF
c) Strings with at most two a's d) Recursive but not CS
d) Strings beginning and ending with a Answer: c) (Requires comparing arbitrary
Answer: b) positions, not possible with PDA alone)
6. Which pumping lemma condition is 12. A PDA with acceptance by empty stack
violated for L = {0¹⁰ⁿ | n ≥ 0} to prove it's and final state:
not regular? a) Are equivalent for deterministic PDAs
P a g e 12 | 15
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 8

Office Automation
Introduction to Office Automation
Office Automation refers to the use of computer software and systems to digitally create, collect, store,

8. Office Automation
manipulate, and relay office information to accomplish core tasks. The primary applications involved
are Word Processors, Spreadsheets, Database Management Systems, and Presentation Software. This
chapter provides a comprehensive guide to Word Processing and Spreadsheet software, their features,
M interfaces, and practical operations.

Word Processing
K What is a Word Processor?
A Word Processor is application software used for the composition, editing, formatting, and printing of
text-based documents. It goes beyond simple typing by allowing the manipulation of text, insertion of
P images, sounds, charts, graphics, and even video clips. Documents can be saved in various formats (.txt,
.rtf, .html, .doc, .docx) and published on the web with hyperlinks. Its greatest advantage over a typewriter

R is the ability to make changes without retyping the entire document.


Examples of Word Processing Software: MS Word, WordPerfect, OpenOffice Writer, Google Docs,
AbiWord, Apple iWork.
E Categories of Word Processors
P Text Editors (Simple Word Processors)
These support basic features only. Examples include WordPad and Notepad.
A Basic Features:
• Insert & Delete Text: Add or erase characters, words, lines, or pages.
R •

Cut, Copy & Paste: Move or duplicate sections of text.
Page Size & Margins: Define page layout; text readjusts automatically.
A •

Search & Replace: Find and optionally replace specific words/phrases.
Word Wrap: Text automatically moves to the next line.
T • Print: Send document to a printer.
Full-Featured Word Processors
I These support advanced features for sophisticated document manipulation (e.g., MS Word).
Advanced Features:
O •

File Management: Create, delete, move, and search for files.
Font Specifications: Change font type, size, style (bold, italic, underline), and color.
N •

Footnotes & Cross-references: Automate numbering and link to document sections.
Graphics: Embed illustrations, charts, and Clip Art.
S •

Headers, Footers & Page Numbers: Add consistent text at the top/bottom of every page.
Layout Control: Set varied margins, indents, and paragraph formatting.
• Macros: Record a series of keystrokes (text or commands) for automation.
• Mail Merge: Generate multiple personalized documents (e.g., mailing labels).
• Spell Checker & Thesaurus: Check spelling and find synonyms.
• Tables of Contents & Indexes: Generate automatically based on codes.
• Multiple Document Windows: Edit several documents simultaneously.
• WYSIWYG (What You See Is What You Get): On-screen display matches printed output.

P a g e 1 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• The file extension for an Outlook file is “.pst”
6. MS OneNote
• It was released on November 19, 2003
• It is a note-taking application

8. Office Automation
Microsoft Office Versions
• When introduced, it was a part of the Office suite only. Later, the developers made it free, standalone
and easily available at play store for android devices
The notes may include images, text, tables, etc.
M

• The extension for OneNote files is “.one”
• It can be used both online and offline and is a multi-user application
K Apart from the applications mentioned above, various other applications are included in the MS Office
suite but these are most commonly used ones and questions based on the same may be asked in the
upcoming exams as well.
Microsoft Office Versions
P When the Office suite was first released, it was entirely devoted for usage in computer systems but

R later with time the Office suite was modified for use in Laptops, Tablets and Mobile phones.
Given below are the various versions of Microsoft Office along with the years in which the version
E was released:

P Version name Release Date/ Year

A Microsoft Office for Windows October 1990


Microsoft Office 3.0 August 30, 1992
R Microsoft Office 4.x 1994

A Microsoft Office 1995 August 24, 1995


Microsoft Office 1997 1997
T Microsoft Office 2000 June 7, 1997
I Microsoft Office XP May 31, 2001

O Microsoft Office 2003


Microsoft Office 2007
October 21, 2003
January 30, 2007
N Microsoft Office 2010 June 15, 2010

S Microsoft Office 2013 January 30, 2012


Microsoft Office 2016 September 22, 2015

All the above-mentioned dates are for the Office suite released for Windows. Apart from these, the
versions Online, for Mac and for Mobile Phones were released separately

Working with Microsoft Word Interface


The interface is the user's gateway to interact with the software.
Key Components of the Word Window:
P a g e 3 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Office Automation
1. Office Automation uses computer software to digitally create, collect, store, manipulate, and relay
office information to accomplish core tasks.
2. Primary applications of office automation include Word Processors, Spreadsheets, Database

8. Office Automation
Management Systems, and Presentation Software.
3. A Word Processor is application software used for the composition, editing, formatting, and printing of
text-based documents.
M 4. A key advantage of a word processor over a typewriter is the ability to make changes without retyping
the entire document.
5. Text Editors (simple word processors) support only basic features like insert, delete, cut, copy, paste,
K and word wrap.
6. Full-Featured Word Processors support advanced capabilities like mail merge, macros, footnotes, and
table of contents generation.
7. The WYSIWYG (What You See Is What You Get) feature ensures the on-screen display matches the
P printed output.
8. The Title Bar in a word processor window displays the name of the active document and the
R application.
9. The Ribbon in modern word processors replaced menus and contains tabs grouping related commands.

E 10. The Quick Access Toolbar is a customizable bar for frequently used commands like Save, Undo, and
Redo.
11. The Ruler shows text positioning, tabs, margins, and indents both horizontally and vertically.
P 12. The Document Window is the main area for creating and editing, with a blinking cursor indicating the
insertion point.
A 13. The Status Bar shows document information such as page number, word count, and zoom level.
14. Ctrl+N is the keyboard shortcut to create a new document in most word processors.
R 15. Ctrl+S is the shortcut to save a document, while Ctrl+O is used to open an existing document.
16. Ctrl+P opens the Print dialog box for printing a document.
A 17. In Insert Mode (default), new text pushes existing text forward.
18. In Overtype Mode, new text overwrites existing text at the cursor position.

T 19. Ctrl+A selects the entire document's content.


20. The Backspace key deletes characters to the left of the cursor, while the Delete key deletes characters
to the right.
I 21. Cut (Ctrl+X), Copy (Ctrl+C), and Paste (Ctrl+V) are used to move or duplicate text via the Clipboard.
22. The Clipboard is a temporary memory space managed by the operating system for transferring data
O between applications.
23. Undo (Ctrl+Z) reverses the last action, and Redo (Ctrl+Y) reapplies it.
N 24. Font Formatting involves changing the appearance of characters, including type, size, style, and color.
25. Serif fonts have small decorative strokes at the ends (e.g., Times New Roman) and are good for
S printed body text.
26. Sans-serif fonts lack decorative strokes (e.g., Arial, Calibri) and are better for on-screen text.
27. Common font styles include Bold (Ctrl+B), Italic (Ctrl+I), and Underline (Ctrl+U).
28. Shift+F3 cycles through case options for selected text (Sentence case, lowercase, UPPERCASE).
29. Paragraph Formatting controls the alignment, indentation, and spacing of entire paragraphs.
30. Text alignment options include Align Left (Ctrl+L), Center (Ctrl+E), Align Right (Ctrl+R), and Justify
(Ctrl+J).
31. Justified alignment makes text align evenly to both the left and right margins.

P a g e 11 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the primary purpose of Office 6. What is the keyboard shortcut to select all
Automation? text in a document?
a) To replace human workers entirely a) Ctrl+C

8. Office Automation
b) To use computer software to digitally b) Ctrl+V
create, store, manipulate, and relay office c) Ctrl+A
information d) Ctrl+X
M c) To design hardware for office use
d) To provide entertainment in the workplace
Answer: c) Ctrl+A
7. Which typing mode causes new text to
Answer: b) To use computer software to overwrite existing text at the cursor position?
K digitally create, store, manipulate, and a) Insert Mode
relay office information b) Overtype Mode
2. Which of the following is NOT a primary c) Replace Mode
application of office automation? d) Typeover Mode
P a) Word Processor
b) Spreadsheet
Answer: b) Overtype Mode
8. The temporary memory space used by the
R c) Operating System
d) Database Management System
operating system to hold cut or copied data
for pasting is called the:

E Answer: c) Operating System


3. The greatest advantage of a word processor
a) Cache
b) Clipboard
over a traditional typewriter is: c) RAM
P a) It is more expensive d) Hard Drive
b) It makes a louder sound Answer: b) Clipboard
A c) It allows changes without retyping the
entire document
9. Which font type has small decorative
strokes at the ends of characters and is
R d) It uses more paper
Answer: c) It allows changes without
generally better for printed body text?
a) Sans-serif
A retyping the entire document
4. Which word processing feature ensures
b) Script
c) Serif

T that the on-screen display exactly matches the


printed output?
d) Monospace
Answer: c) Serif
a) AutoCorrect 10. What does the keyboard shortcut
I b) WYSIWYG (What You See Is What You Shift+F3 do when text is selected?
Get) a) Makes text bold
O c) Word Wrap
d) Mail Merge
b) Cycles through case options (Sentence
case, lowercase, UPPERCASE)
N Answer: b) WYSIWYG (What You See Is
What You Get)
c) Opens the Font dialog box
d) Increases font size
S 5. In a word processor window, which
component is a customizable bar for
Answer: b) Cycles through case options
(Sentence case, lowercase, UPPERCASE)
frequently used commands like Save and 11. Which text alignment makes text align
Undo? evenly to both the left and right margins?
a) Title Bar a) Align Left
b) Ribbon b) Center
c) Quick Access Toolbar c) Align Right
d) Status Bar d) Justify
Answer: c) Quick Access Toolbar Answer: d) Justify

P a g e 15 | 19
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 9
Microsoft Word (MS Word)
With Word you can:
 Create a document from scratch or from a template .
 Add text, images, art, and videos.

9. Microsoft Word
 Research a topic and find credible sources.
 Access your documents from a computer, tablet, or phone via OneDrive.
 Share your documents and collaborate with others.
 Track and review changes.
M Create a new document
1. On the File tab, select New.
K 2. Select Blank document, or double-click a template image or type the kind of document into the Search for
online templates box and press Enter.
Tip: For practice using Word features, try a learning guide like Welcome to Word or Insert your first table
of contents.
P Add and format text

R
E
P
A
R
A
T
I
1. Click on your new blank page and type some text.
O
2. Select text to format and choose font options on the Home tab: Bold , Italic , Bullets , Numbering , and
N more.

P a g e 0 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
2. On Shape Format or Drawing Tools Format, select Text Fill or Text Outline, and pick the color you
want.

8. MS Word
M
K

P 3. Click or tap outside of your text box to see the effect.

R
E
P
A Choose a text effect
1. Select the WordArt text to change.

R
A
T
I
O
N
S
2. Go to Shape Format or Drawing Tools Format > Text Effects >Transform.
Pick the effect you want.
3. Click outside of your text box to see the effect.

P a g e 5 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
2. Go to Layout, and open the Page Setup dialog box.

8. MS Word
M 3. Select Landscape, and in the Apply to box, choose Selected text.

K
Add a border to a page
1. Go to Design > Page Borders.
P
R
E
P
A 2. Make selections for how you want the border to look.

R
A
T
I
O
N
S

P a g e 11 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: MS Word

8. MS Word
1. Microsoft Word allows you to create documents from scratch or from an online template.
2. You can research topics and find credible sources directly within Microsoft Word.
3. Documents can be accessed from a computer, tablet, or phone via OneDrive.
4. Word facilitates document sharing and collaboration with others.
5. The Track and Review changes feature is available in Microsoft Word.
6. A new blank document is created from the File tab by selecting New and then Blank document.
7. To create a document from a template, you can double-click a template image or search in
the Search for online templates box.
M 8.
9.
Learning guides like Welcome to Word are available for practice with Word features.
Text is formatted using options on the Home tab such as Bold, Italic, Bullets, and Numbering.

K 10. The Insert tab is used to add elements like Tables, Pictures, Shapes, SmartArt, Charts, and
Screenshots.
11. A table is inserted by selecting Insert > Table and hovering over a grid to choose the number of
rows and columns.
12. For a larger or customized table, use Insert > Table > Insert Table.
P 13. Existing text separated by tabs can be converted to a table using Insert > Table > Convert Text to
Table.
R 14.
15.
You can draw a custom table using Insert > Table > Draw Table.
To add text, place the cursor at the desired location and start typing.
E 16.
17.
To replace text, select it and start typing; double-click selects a single word.
Clicking to the left of a line selects the entire line.

P 18.
19.
Text formatting can be applied from the pop-up toolbar or the Home tab's Font group.
The Format Painter tool copies formatting from one text selection to another.
20. Double-clicking the Format Painter allows copying formatting to multiple locations.
A 21. To save a document to OneDrive, use File > Save As or Save a Copy and select OneDrive.
22. Save personal files to OneDrive - Personal and work files to your company's OneDrive or
R 23.
SharePoint site.
You can also save a document to other locations like the Desktop by selecting Browse.
A 24.
25.
AutoSave automatically saves changes when a document is stored in OneDrive or SharePoint.
AutoSave can be toggled on or off from the Quick Access Toolbar.
T 26. The Quick Access Toolbar can be shown by right-clicking the ribbon and selecting Show Quick
Access Toolbar.

I 27. Pictures can be inserted from your PC (This Device), from Stock Images, or from the web (Online
Pictures).
28. In older Word versions, the option for online pictures may be labeled Online Pictures next
O to Pictures.
29. To resize a picture, select it and drag a corner handle.
N 30. Text wrapping options control how text flows around a picture; selecting any option other than In
Line with Text allows you to move the picture.
S 31. In Line with Text layout places a picture within a paragraph, causing it to move as text is added or
removed.
32. WordArt is inserted via Insert > WordArt; you can pick a style and type your text.
33. Existing text can be converted to WordArt by selecting the text first, then going to Insert >
WordArt.
34. The color of WordArt text is changed using Text Fill or Text Outline on the Shape
Format or Drawing Tools Format tab.

P a g e 13 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs

8. MS Word
1. In Microsoft Word, where do you go to
text paragraph, causing it to move as text is
create a brand new document from a blank
edited?
slate? a) Square
a) Home > New b) Tight
b) File > New > Blank document c) Behind Text
c) Insert > New Document d) In Line with Text
d) View > New Window Answer: d) In Line with Text
Answer: b) File > New > Blank document7. You want to start page numbering from

M 2. Which feature in Word allows you to


automatically save changes when your
"1" on the second page of your document. What
should you set the "Start at" value to in the
document is stored on OneDrive? Page Number Format dialog?
K a) AutoRecover a) 1
b) Quick Save b) 0
c) AutoSave c) 2
d) Background Save d) -1
P Answer: c) AutoSave
3.
Answer: b) 0
To quickly convert text separated by
8. To create a custom watermark using
R tabs into a structured table, which command
should you use?
your company logo, which sequence of
commands do you follow?

E
a) Insert > Table > Draw Table a) Design > Watermark > Custom Watermark >
b) Insert > Table > Excel Spreadsheet Picture watermark
c) Insert > Table > Convert Text to Table
b) Insert > Picture > Set as Watermark
P d) Layout > Convert > Text to Table c) Page Layout > Background > Custom
Answer: c) Insert > Table > Convert Text to
Watermark
A Table
4.
d) View > Watermark > Insert Picture
Answer: a) Design > Watermark > Custom
What is the primary function of the
R Format Painter tool in Word?
a) To change the page color
Watermark > Picture watermark
9. Which key must you hold down while
A b) To copy formatting from one text selection
to another
dragging a shape's rotation handle to constrain
the rotation to 15-degree increments?
c) To insert painterly art effects a) Ctrl
T d) To adjust paragraph spacing b) Alt
Answer: b) To copy formatting from one text
c) Shift
I selection to another d) Tab
5. Answer: c) Shift
How do you ensure that the header on
O the first page of your document is different
from the rest (e.g., blank)?
10. If the Quick Access Toolbar is not
visible, how can you display it?
N a) Delete the header on the first page manually.
a) Go to File > Options > Quick Access
b) Insert a section break after the first page.
Toolbar.

S c) Check the Different First Page box in the


Header & Footer Tools.
b) Right-click the ribbon and select Show
Quick Access Toolbar.
d) Use File > Options to disable the first page
c) It is always visible and cannot be hidden.
header. d) Go to View > Toolbars > Quick Access.
Answer: c) Check the Different First Answer: b) Right-click the ribbon and
Page box in the Header & Footer [Link] Show Quick Access Toolbar.
6. When inserting a picture, which text
11. To change only a specific section of
wrapping option places the picture within the
your document to landscape orientation while
P a g e 16 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 10
Microsoft Excel (MS Excel)
What is Excel?
Excel makes it easy to crunch numbers. With Excel, you can streamline data entry with AutoFill. Then,
get chart recommendations based on your data, and create them with one click. Or easily spot trends and

10. MS Excel
patterns with data bars, color coding, and icons.
Create a workbook
1. Open Excel.
M 2. Select Blank workbook. Or press Ctrl+N.

P
R
E
P
A Enter data
To manually enter data:
R 1. Select an empty cell, such as A1, and then type text or a number.
2. Press Enter or Tab to move to the next cell.
A To fill data in a series:
1. Enter the beginning of the series in two cells: such as Jan and Feb; or 2014 and 2015.
T 2. Select the two cells containing the series, and then drag the fill handle across or
down the cells.
I
O
N
S

P a g e 0 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
there is only one number reference in this formula. The Intellisense tag will appear for any
function.
AutoSum horizontally

9. MS Excel
M
K

P Avoid rewriting the same formula


After you create a formula, you can copy it to other cells — no need to rewrite the same formula.
R You can either copy the formula, or use the fill handle to copy the formula to adjacent cells.
For example, when you copy the formula in cell B6 to C6, the formula in that cell automatically
E changes to update to cell references in column C.
When you copy the formula, ensure that the cell references are correct. Cell references may
P
A
R
A
T
I
O
N
S

change if they have relative references.

P a g e 3 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
What can I use in a formula to mimic calculator keys?

Calculator key Excel method Description, example Result

+ (Plus key) + (plus) Use in a formula to add numbers. Example: 12

9. MS Excel
=4+6+2
- (Minus key) - (minus) Use in a formula to subtract numbers or to
signify a negative number. 6
Example: =18-12 -120
M Example: =24*-5 (24 times negative 5)

K x (Multiply key) * (asterisk; also


called "star")
Use in a formula to multiply numbers. Example: 24
=8*3
÷ (Divide key) / (forward slash) Use in a formula to divide one number by 9
another. Example: =45/5
P % (Percent key) % (percent) Use in a formula with * to multiply by a 3
R percent. Example: =15%*20
√ (square root) SQRT (function) Use the SQRT function in a formula to find the 8
E square root of a number. Example: =SQRT(64)

P 1/x (reciprocal) =1/n Use =1/n in a formula, where n is the number


you want to divide 1 by.
0.125

A Example: =1/8

Add a watermark in Excel


R You can use an image, such as a logo, to insert as a watermark that will appear on the
A spreadsheet along with the displayed data.
Create a watermark
T 1. Select Insert > Header & Footer.
2. Tap on the header and on the Header & Footer Elements tab on the ribbon, click Picture.
I 3. Select one of the available options to insert your image. In the header, you'll see &
[Picture].
O 4. Tap anywhere outside the header to see the watermark.
Format the watermark picture
N 1. Click the header in the spreadsheet.
2. On the Header & Footer Elements tab, click Format Picture.
S 3. In the Format Picture dialog box, select Picture tab > Color > select an option.
Merge and unmerge cells
You can't split an individual cell, but you can make it appear as if a cell has been split by
merging the cells above it.
Merge cells
1. Select the cells to merge.
P a g e 4 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Number formats
To see all available number formats, select the Dialog Box Launcher next to Number on

9. MS Excel
the Home tab in the Number group.
M Format Description
General The default number format that Excel applies when you type a number. For the most
K part, numbers that are formatted with the General format are displayed just the way
you type them. However, if the cell is not wide enough to show the entire number,
the General format rounds the numbers with decimals. The General number format
also uses scientific (exponential) notation for large numbers (12 or more digits).
P Number Used for the general display of numbers. You can specify the number of decimal
places that you want to use, whether you want to use a thousands separator, and how
R you want to display negative numbers.
Currency Used for general monetary values and displays the default currency symbol with
E numbers. You can specify the number of decimal places that you want to use,
whether you want to use a thousands separator, and how you want to display
P negative numbers.
Accounting Also used for monetary values, but it aligns the currency symbols and decimal
A points of numbers in a column.
Date Displays date and time serial numbers as date values, according to the type and
R locale (location) that you specify. Date formats that begin with an asterisk (*)
respond to changes in regional date and time settings that are specified in Control
A Panel. Formats without an asterisk are not affected by Control Panel settings.
Time Displays date and time serial numbers as time values, according to the type and
T locale (location) that you specify. Time formats that begin with an asterisk (*)
respond to changes in regional date and time settings that are specified in Control
I Panel. Formats without an asterisk are not affected by Control Panel settings.
Percentage Multiplies the cell value by 100 and displays the result with a percent (%) symbol.
O You can specify the number of decimal places that you want to use.
Fraction Displays a number as a fraction, according to the type of fraction that you specify.
N Scientific Displays a number in exponential notation, replacing part of the number with E+n,
where E (which stands for Exponent) multiplies the preceding number by 10 to the
S nth power. For example, a 2-decimal Scientific format displays 12345678901 as
1.23E+10, which is 1.23 times 10 to the 10th power. You can specify the number of
decimal places that you want to use.
Text Treats the content of a cell as text and displays the content exactly as you type it,
even when you type numbers.

P a g e 10 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
This unlocks all the cells on the worksheet when you protect the worksheet. Now, you can choose
the cells you specifically want to lock.
5. On the worksheet, select only the cells that you want to lock.
6. Bring up the Format Cells popup window again (Ctrl+Shift+F).
7. This time, on the Protection tab, check the Locked box and then select OK.

9. MS Excel
8. On the Review tab, select Protect Sheet.

M
K

P
9. In the Allow all users of this worksheet to list, choose the elements that you want users to
R be able to change.
More information about worksheet elements
E
Clear this check box To prevent users from
P Moving the pointer to cells for which the Locked check box is selected on
A Select locked cells the Protection tab of the Format Cells dialog box. By default, users are
allowed to select locked cells.
R Moving the pointer to cells for which the Locked check box is cleared on
the Protection tab of the Format Cells dialog box. By default, users can
Select unlocked cells
A select unlocked cells, and they can press the TAB key to move between the
unlocked cells on a protected worksheet.
T Changing any of the options in the Format Cells or Conditional
Formatting dialog boxes. If you applied conditional formats before you
Format cells
I protected the worksheet, the formatting continues to change when a user
enters a value that satisfies a different condition.
O Format columns
Using any of the column formatting commands, including changing
column width or hiding columns (Home > Format).
N Format rows
Using any of the row formatting commands, including changing row
height or hiding rows (Home > Format).
S Insert columns
Insert rows
Inserting columns.
Inserting rows.
Insert hyperlinks Inserting new hyperlinks, even in unlocked cells.
Deleting columns.
Delete columns If Delete columns is protected and Insert columns is not also protected, a
user can insert columns that they cannot delete.

P a g e 20 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: MS Excel
1. Excel simplifies numerical calculations and data entry with features like AutoFill.
2. Chart recommendations based on your data can be created with a single click in Excel.

9. MS Excel
3. Trends and patterns can be easily visualized using data bars, color coding, and icons in
Excel.
4. A new blank workbook is created by selecting Blank workbook or pressing Ctrl+N.
M 5. To enter data manually, select a cell, type, and press Enter or Tab to move to the next cell.
K 6. The AutoFill series is created by entering the start of the series in two cells and dragging
the fill handle.
7. Excel can perform calculations using simple formulas for addition, subtraction,
P multiplication, and division.
R 8. All Excel formulas must begin with an equal sign (=).

E 9. The basic arithmetic operators are: plus (+) for addition, minus (-) for subtraction, asterisk
(*) for multiplication, and forward slash (/) for division.
P 10. There is no dedicated SUBTRACT function in Excel; the minus operator (-) is used
A within a formula.

R 11. The SUM function can incorporate negative numbers using a minus sign, e.g.,
=SUM(12,5,-3,8,-4).
A 12. The AutoSum feature automatically senses a contiguous range and inserts a SUM
T formula.

I 13. AutoSum can be applied both vertically (above/below a range) and horizontally (left/right
of a range).
O 14. AutoSum does not work on non-contiguous ranges of cells.
N 15. The Intellisense guide for a function appears as a floating tag and provides a hyperlink to

S its Help topic.


16. After creating a formula, you can copy it to adjacent cells to avoid rewriting it.
17. When a formula with relative references is copied, the cell references update automatically
relative to their new position.
18. To mimic a calculator's square root function, use the SQRT function, e.g., =SQRT(64).
P a g e 26 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which keyboard shortcut is used to 6. When you copy a formula containing a
create a new blank workbook in Excel? relative cell reference like =A1 to the
a) Ctrl+B cell one column to the right, what does it
b) Ctrl+N become?

9. MS Excel
c) Ctrl+W a) =A1
d) Ctrl+T b) =$A$1
Answer: b) Ctrl+N c) =B1
2. To automatically fill a series like "Jan, d) =A2
M Feb, Mar..." what must you do first? Answer: c) =B1
a) Type the entire series once. 7. In Excel, which function is equivalent to
K b) Use the Fill Series dialog box. the calculator's square root (√) key?
c) Enter the beginning of the series in a) SQR
two cells and select them. b) ROOT
d) Select the cells and choose "Fill c) SQRT
P Series" from the Data tab. d) POWER(...,0.5)
Answer: c) Enter the beginning of the Answer: c) SQRT
R series in two cells and select them. 8. Where is a watermark picture inserted in
3. What is a fundamental requirement for an Excel worksheet to appear behind the
E every Excel formula? data?
a) It must contain a function. a) As a background from the Page
P b) It must reference another cell. Layout tab.
c) It must begin with an equal sign (=). b) Into the header or footer via Insert >
A d) It must be enclosed in parentheses. Header & Footer.
Answer: c) It must begin with an c) As an inline image on the worksheet.
R equal sign (=). d) Using the Watermark option on the
4. How does Excel handle subtraction Design tab.
A within a formula, given there is no Answer: b) Into the header or footer
SUBTRACT function? via Insert > Header & Footer.
T a) It uses the SUM function with 9. What happens to the contents of cells
negative numbers. B2, C2, and D2 when they are merged
I b) It uses the DIF function. into one cell?
c) It uses the minus (-) operator. a) All contents are concatenated.
O d) Both a and c are correct. b) Only the content of the upper-left cell
Answer: d) Both a and c are correct. (B2) is kept.
N 5. The AutoSum feature is designed to c) The contents are averaged.
work with which type of cell ranges? d) An error message appears.
S a) 3-D references Answer: b) Only the content of the
b) Non-contiguous ranges upper-left cell (B2) is kept.
c) Contiguous ranges 10. After inserting a new row, the "Insert
d) Array ranges Options" button allows you to:
Answer: c) Contiguous ranges a) Choose the data source for the new
row.

P a g e 33 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 11
Microsoft PowerPoint (MS PowerPoint)
What is PowerPoint?
Overview

11. Microsoft Power Point


With PowerPoint on your PC, Mac, or mobile device, you can:
 Create presentations from scratch or a template.
 Add text, images, art, and videos.
 Select a professional design with PowerPoint Designer.
 Add transitions, animations, and cinematic motion.
M  Save to OneDrive, to get to your presentations from your computer, tablet, or phone.
 Share your work and work with others, wherever they are.
K Create a presentation in PowerPoint
Create presentations from scratch or start with a professionally designed, fully customizable template
from Microsoft Create.
Tip: If you have Microsoft Copilot it can help you create a presentation, add slides or images, and more.
P To learn more see Create a new presentation with Copilot in PowerPoint.
Create a presentation
R 1. Open PowerPoint.
2. In the left pane, select New.
E 3. Select an option:
 To create a presentation from scratch, select Blank Presentation.
P  To use a prepared design, select one of the templates.
 To see tips for using PowerPoint, select Take a Tour, and then select Create.

A
R
A
T
I
O
N
Add a slide
S 1. In the thumbnails on the left pane, select the slide you want your new slide to follow.
2. In the Home tab, in the Slides section, select New Slide.

P a g e 1 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
 Browse for the picture you want, select it, and then select Insert.
3. To add illustrations:
 In the Illustrations section, select Shapes, Icons, 3D Models, SmartArt, or Chart.
 In the dialog box that opens when you click one of the illustration types, select the item you
want and follow the prompts to insert it.

11. Microsoft Power Point


M
K

P Save in PowerPoint
Save your presentation to OneDrive
R When you save your files to the cloud, you can share and collaborate with others, and get to your files
from anywhere - on your computer, tablet, or phone.
E 1. Select File > Save As.
2. Select OneDrive.
P Save personal files to OneDrive - Personal, and work files to your company OneDrive. You can
also save to another location, like your device.
A
R
A
T
I
O
N
S

P a g e 3 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
 To move to the previous or next slide, select Previous or Next.
 To view all the slides in your presentation, select See all slides.

11. Microsoft Power Point


M
K
Notes
During your presentation, the speaker notes are visible on your monitor, but aren't visible to the audience.
P  The Notes pane is a box that appears below each slide. Tap it to add notes.

R
E
P
A
R
A

 If you don’t see the Notes pane or it is completely minimized, click Notes on the task bar across the
bottom of the PowerPoint window
T Subtitles
You can choose which language the caption/subtitle text should be shown to your audience. This feature
I requires Windows 10 and an up-to-date version of PowerPoint.
1. Select Slide Show > Subtitle Settings.
O 2. Set your Spoken Language.
3. Select Subtitle Language to see which languages PowerPoint can display on-screen as captions or
N subtitles, and select the one you want.
4. In the Subtitle Settings menu, set the desired position of the captions or subtitles.

S 5. More appearance settings are available by selecting Subtitle Settings > More Settings (Windows).
What is a slide master?
When you want all your slides to contain the same fonts and images (such as logos), you can make those
changes in one place—the Slide Master, and they'll be applied to all your slides. To open Slide Master view,
on the View tab, select Slide Master:
The master slide is the top slide in the thumbnail pane on the left side of the window.

P a g e 6 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Rotate (mirror) text in a shape or text box
1. Insert a text box or shape in your document, and then type and format your text.
2. Right-click the box or shape and select Format Shape.
3. In the Format Shape pane, under Shape Options, select Effects.

11. Microsoft Power Point


M
K 4. Under 3-D Rotation , in the X Rotation or Y Rotation box, enter 180 .
5. (Optional) If your text box becomes filled with a color, you can remove the color in the Format
Shape pane. Under Shape Options , click the Fill & Line tab , expand Fill , and select No fill .

P
R
E
P
A 6. (Optional) To remove the text box outline, right-click the text box, click Outline in the mini toolbar
that appears, and choose No Outline .

R Position text horizontally in a shape or text box

A
T
I
O
To change the horizontal alignment of a single paragraph or line:
N 1. Click in the paragraph or line of text that you want to modify.
2. On the Home tab (or the Message tab in Outlook), click the horizontal alignment option that you
S want.

P a g e 17 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
 To view a detail in your slide up close, select Zoom into slide, and then point to the part you want to
see.

11. Microsoft Power Point


M  To point to or write on your slides as you present, select Pen and laser pointer tools.

P Press the Esc key when you want to turn off the pen, laser pointer, or highlighter.
 To hide or unhide the current slide in your presentation, select Black or unblack slide show.
R
E
P
You can use PowerPoint on your smartphone as a remote control to run your presentation and view your
A speaker notes. See Using a laser pointer on your smartphone when presenting in PowerPoint for more
information, including a brief video.
R Swap the Presenter view and Slide view monitors
To manually determine which screen shows your notes in Presenter view and which shows only the slides
A themselves, on the task bar at the top of Presenter view, select Display Settings, and then select Swap
Presenter View and Slide Show.
T
I
O
N
S

P a g e 29 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: MS Power Point
1. PowerPoint allows you to create presentations from scratch or from professionally designed
templates.

11. Microsoft Power Point


2. With Microsoft Copilot, you can get assistance creating presentations, adding slides, images, and
more.
3. To create a new presentation, open PowerPoint, select New in the left pane, and choose Blank
M Presentation or a template.

K 4. The Take a Tour option provides tips for using PowerPoint.


5. A new slide is added by selecting a slide in the thumbnail pane, then going to Home > Slides >
New Slide.
P 6. The layout for a new slide is chosen from the Layout menu in the Slides section on

R the Home tab.

E 7. Text is formatted using options like Font, Bold, Italic, Increase Font Size, and Decrease Font
Size in the Home tab's Font section.
P 8. Bulleted or numbered lists are created by selecting text and choosing Bullets or Numbering on

A the Home tab.

R 9. Pictures are inserted from the Insert tab, Images section, by selecting Pictures and choosing a
source.
A 10. Illustrations such as Shapes, Icons, 3D Models, SmartArt, and Charts are inserted from

T the Illustrations section of the Insert tab.

I 11. To save a presentation to the cloud for access and collaboration, use File > Save As and
select OneDrive.
O 12. Save personal files to OneDrive - Personal and work files to your company OneDrive.

N 13. AutoSave is always on when you're online and saves changes as you work; pending changes sync

S when you reconnect.


14. Themes and their Variants are applied from the Design tab.
15. PowerPoint Designer suggests design ideas when you insert pictures, a list, or dates; it opens
automatically.
16. You can also open Designer by selecting a picture and then choosing Design > Designer.
P a g e 37 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the primary purpose of Microsoft 6. What happens when you edit a layout
Copilot in PowerPoint as mentioned in the master in Slide Master view?
chapter? a) Only new slides based on that layout will
a) To design custom animations reflect the changes.

11. Microsoft Power Point


b) To help create presentations, add slides b) All existing slides immediately update.
or images, and more c) Only the title slide changes.
c) To automatically record narration d) You must manually update each slide.
d) To convert presentations to video Answer: a) Only new slides based on that
M Answer: b) To help create presentations,
add slides or images, and more
layout will reflect the changes.
7. Which of the following is NOT a standard

K 2. Where is the "Take a Tour" option located


when creating a new presentation?
method to delete a sequence of contiguous
slides?
a) On the Design tab a) Press Shift, select the first and last slides,
b) In the New pane after selecting Blank right-click, choose Delete Slide.
Presentation b) Press Ctrl, select each slide individually,
P c) Under File > Options
d) On the Slide Show tab
right-click, choose Delete Slide.
c) Go to Slide Sorter view, select the slides,
R Answer: b) In the New pane after
selecting Blank Presentation
and press Delete.
d) The chapter does not mention using the
E 3. To apply a professional design suggestion
automatically after inserting a picture,
Delete key.
Answer: b) Press Ctrl, select each slide

P which feature should you use?


a) Slide Master
individually, right-click, choose Delete
Slide. (This is for non-adjacent slides)
b) Transitions 8. When you duplicate a slide using the
A c) PowerPoint Designer "Duplicate Slide" option, where is the copy
d) Animation Painter placed?
R Answer: c) PowerPoint Designer
4. How do you access the Presenter
a) At the end of the presentation
b) At the beginning of the presentation
A View when running a slide show on a
single monitor?
c) Immediately after the original slide
d) In a new presentation file
T a) Press F5
b) Select Slide Show > Presenter View
Answer: c) Immediately after the
original slide

I c) Click the three dots (...) on the control


bar in Slide Show view
9. To change the entire presentation from
landscape to portrait orientation, which
d) It automatically appears if notes are menu sequence do you follow?
O added a) Design > Slide Size > Custom Slide Size
Answer: c) Click the three dots (...) on > Portrait
N the control bar in Slide Show view
5. If you want a company logo to appear on
b) File > Page Setup > Portrait
c) View > Slide Orientation > Portrait
S every slide in the same position, where
should you place it?
d) Design > Orientation > Portrait
Answer: a) Design > Slide Size > Custom
a) On the first slide only Slide Size > Portrait
b) On the Slide Master 10. What is the primary function of Sections in
c) As a watermark from the Design tab PowerPoint?
d) In the Header & Footer dialog a) To apply different animations to groups
Answer: b) On the Slide Master of slides
P a g e 45 | 50
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 10
Key-Board and Shortcut Keys
What is KEYBOARD?
• A panel/plate/board of keys that operates a computer or typewriters.
• A piece of computer hardware used to input text, characters, and other commands into a

10. Keyboard and Short Keys


computer or similar device
Types of Keys Setup on Keyboard:

M
K
Keyboard Shortcut keys:
P
R
E
P
A
R
A
T 1. Set of one or more keys that generates a particular command to be executed.
2. Generally executed by using Alt or Ctrl keys with some other keys
I 3. A plus (+) sign between two or more keys indicates that these keys should
pressed in combination. For example Ctrl+Shift+A means to press and hold Ctrl
O and Shift and then press A

N
S

P a g e 1 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Frequently used Keys:

Key Function

10. Keyboard and Short Keys


Alt Key • Key modifier that enables a different input

Escape (esc) key


• Cancel the current operation

M • Exit the currant window

K
Space bar • Move the curser one space forward

Tab Key
• Move the cursor several space foreword

• Move to next text box on a form or on a table


P • Modifer key
Control (ctrl) Key
R • Pressed in conjuction with another key performed a specific task

E Back Space Key Move the curser one space backward

P • Move the curser to the beginning of the next line

A Enter Key
• In a dialogue box enable the highlighted option


R
In some program start the next operation or
confirm the current operation

A In combination of another latter to type an uppercase latter


Shift Key In combination with another key to type the symbol shown on upper part
T of that key

I Basic Shortcut Keys


Shortcut Keys Operation
O Alt + F
Alt + E
File menu options on currant program
Edit option in current program
N Ctrl + A
Ctrl + x
Select all text
Cut selected item

S Shift + Del
F1
Delete selected item
Universal help (for all programs)
F2 Rename selected icon
F3 Start find from desktop
F5 Refresh contents or webpage
Alt + F4 Close currant open program
Ctrl + F4 Close window in program

P a g e 2 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Ctrl + H Open find and replace option Ctrl + Space Select entire column
Create formula to sum all
Ctrl + U Underline highlighted selection Alt + =
above cells
Ctrl + Y Underline highlighted text Ctrl + W Close document
Strike through highlighted Insert value of above cell into
Ctrl + 5 Ctrl + ‘

10. Keyboard and Short Keys


selection current cell
Format numbers in comma
Ctrl + O Open options Ctrl + Shift + !
format
Ctrl + N Open new workbook/document
Microsoft Power Point Shortcut Keys
M Shortcut Keys Operation
K 12
Alt + F4
Save As.
Close PowerPoint
Ctrl + M Insert a new slide.
Ctrl + D Duplicate the selected slide.
P Ctrl + Shift + D Duplicate the selected slide.
Page Up/Down Navigate to the previous/next slide
R Ctrl + G Group objects.

E Ctrl + Spacebar
Shift + F3
Reset manual character formatting
Change the case of selected text.

P Alt + Q
Ctrl + T
"Tell me what you want to do".
Open the Font window.
A Ctrl + K
Ctrl + Tab
Insert a hyperlink.
Switch between open presentations.
R Alt + F9
Alt + F10
Show/hide gridlines and guides
Show/hide selection pane.
A Alt + N Access the Insert tab.
Alt + H Access the Home tab.
T Esc End the slideshow.
Shift + F5 Start the slideshow from the current slide.
I F5 Start the slideshow from the beginning.

O Ctrl + Move Item with Mouse


Shift + Select Item with Mouse
Duplicate the item
Add to selection.

N Ctrl + Shift + G Ungroup objects.


Tip: Basic text editing and formatting shortcut keys for MS word is same for MS Excel and MS Power
S Point.
Outlook Shortcut Keys
Shortcut Keys Operation
Alt + S Send the E-mail
Ctrl + C Copy selected text
Ctrl + X Cut selected text

P a g e 5 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Win + Tab Cycle through open programs on task bar
Win + F Display the windows search / find feature
Win + Ctrl + F Display the search for computers window
Win + F1 Display the Microsoft windows help
Win + R Open the run window

10. Keyboard and Short Keys


Win + Pause/Brake Open the system properties window
Win + U Open utility manger
Mac Shortcut Keys:

M Shortcut Keys Operation

K Command + A
Command + C
Select all items.
Copy selected items.
Command + V Paste copied items.
Command + X Cut selected items.

P Command + Z Undo the last action.


Shift + Z Redo the last action.
Command + N Open a new window or document.
R Command + P Open the print dialog box.
Command + S: Save the current document.
E Command + Q Quit the current application.
Command + W Close the current window
P Command + Tab Switch between open applications.
Command + Space Open Spotlight search.
A Command + Shift + 3
Command + Shift + 4
Take a whole screenshot of everything on your screen.
Click a snap of just a part of your screen.
R Command + F
Command + T
Open the find dialog box.
Open a new tab in browsers.
A Command + L
Famous Abbreviations:
Highlight the address bar in browsers

T Abbreviation Meaning Abbreviation Meaning

I AI Artificial Indulgence .exe Executable


ASCII American slandered code for FAX Facsimile – Latin word
O information exchange meaning make similar
BINAC Binary automatic computer GIF Graphic Interchange
N BIOS Basic input output system GSM
Format
Global System for
S CD Compact Disk HTTP
Mobile Communication
Hyper Text Transfer
Protocol
DVD Digital versatile Disk HTML Hypertext Markup
Language
E-Commerce Electronic commerce JPEG Joint photographic
Experts Group

P a g e 7 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Keyboard and shortcut Keys
1. A keyboard is a panel of keys used to operate a computer or typewriter.
2. A keyboard is a piece of computer hardware used to input text, characters, and other commands.

10. Keyboard and Short Keys


3. Keyboard shortcut keys are a set of one or more keys that generate a particular command to be
executed.
4. Shortcut keys are generally executed by using the Alt or Ctrl keys in combination with other keys.
M 5. A plus (+) sign between keys indicates that those keys should be pressed in combination.
K 6. Ctrl+Shift+A means press and hold Ctrl and Shift, then press A.
7. The Alt key is a key modifier that enables a different input.
8. The Escape (Esc) key cancels the current operation or exits the current window.
P 9. The Spacebar moves the cursor one space forward.
R 10. The Tab key moves the cursor several spaces forward or to the next text box on a form.

E 11. The Control (Ctrl) key is a modifier key pressed in conjunction with another key to perform a specific
task.
P 12. The Backspace key moves the cursor one space backward.
A 13. The Enter key moves the cursor to the beginning of the next line.

R 14. The Enter key enables the highlighted option in a dialogue box.
15. The Enter key can start the next operation or confirm the current operation in some programs.
A 16. The Shift key, combined with another letter, types an uppercase letter.
T 17. The Shift key, combined with another key, types the symbol shown on the upper part of that key.

I 18. Alt + F opens the File menu options in the current program.
19. Alt + E opens the Edit options in the current program.
O 20. Ctrl + A selects all text.
N 21. Ctrl + X cuts the selected item.

S 22. Shift + Del deletes the selected item.


23. F1 provides universal help for all programs.
24. F2 renames a selected icon.
25. F3 starts the find function from the desktop.
26. F5 refreshes the contents or webpage.
P a g e 9 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the primary function of a keyboard? b) Ctrl + Alt + 2
a) Display visual output c) Ctrl + Alt + 3
b) Input text and commands d) Ctrl + Alt + H

10. Keyboard and Short Keys


c) Process data Answer: b) Ctrl + Alt + 2
d) Store files 8. In MS Word, Ctrl + Shift + < is used to:
Answer: b) Input text and commands a) Increase font size by +1
2. In the shortcut notation "Ctrl+Shift+A", the b) Decrease font size by -1
plus sign (+) indicates: c) Change text to heading
M a) Press keys one after the other
b) Press keys in sequence slowly
d) Open the find window
Answer: b) Decrease font size by -1
K c) Press and hold keys in combination
d) Press the keys only once
9. Which function key is used for universal
help in most programs?
Answer: c) Press and hold keys in a) F2
combination b) F1
3. Which key is used to cancel the current c) F3
P operation or exit a window? d) F5
a) Tab Answer: b) F1
R b) Alt
c) Escape (Esc)
10. In MS Word, what does the shortcut Alt +
Shift + T do?
E d) Spacebar
Answer: c) Escape (Esc)
a) Inserts the current date
b) Inserts the current time
P 4. The function of the Tab key is NOT to:
a) Move the cursor several spaces forward
c) Opens the table menu
d) Starts a new document

A b) Move to the next text box on a form


c) Move the cursor one space forward 11.
Answer: b) Inserts the current time
In MS Excel, which key combination enters
d) Navigate within a table the current time?
R Answer: c) Move the cursor one space a) Ctrl + ;
forward b) Ctrl + Shift + :
A 5. What is the role of the Ctrl key?
a) To type uppercase letters
c) Alt + =
d) Ctrl + '
T b) To move the cursor backward
c) As a modifier key pressed with another 12.
Answer: b) Ctrl + Shift + :
What is the result of pressing Alt + = in
I key for a task
d) To open the Start menu
Microsoft Excel?
a) Opens the formula window
Answer: c) As a modifier key pressed with
O
b) Creates a formula to sum all cells above
another key for a task c) Formats numbers as currency
6. Pressing Shift + F10 in Windows performs d) Inserts a new worksheet
N which action? Answer: b) Creates a formula to sum all
a) Opens the Run dialog cells above
S b) Saves the document
c) Simulates a right-click
13. In MS Excel, Ctrl + Shift + $ is used to:
a) Format numbers as date
d) Refreshes the page b) Format numbers as currency
Answer: c) Simulates a right-click c) Format numbers as percentage
7. In Microsoft Word, which shortcut changes d) Insert a dollar sign
text to Heading 2? Answer: b) Format numbers as currency
a) Ctrl + Alt + 1

P a g e 19 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 13

Data Communication and Computer Networking


Introduction to Data Communication Systems

13. Data Communication & Networking


We live in an era of an electronic global village, where computers, telephones, and wireless devices are
interconnected worldwide. This connectivity forms the backbone of modern life, enabling everything
from remote collaboration and e-commerce to global information sharing. At its core, this is made

M possible by data communication.


What is Data Communication?
K Data communication is defined as the electronic exchange of digital information (data) between two or
more devices via a transmission medium. This medium can be guided (wired/bounded), like a cable,
or unguided (wireless/unbounded), like radio waves.
For a system to perform this exchange, five fundamental components must be present:
P 1. Sender (Source/Transmitter): The device that originates and sends the data message (e.g., a
computer, mobile phone, or video camera). It converts the message into a signal suitable for
R transmission.
2. Receiver (Destination/Sink): The device that accepts the transmitted message (e.g., a server,
E printer, or another computer). It converts the received signal back into a usable form.

P 3. Message: The actual information or data to be communicated. This can be text, numbers,
pictures, sound, video, or any combination thereof.

A 4. Transmission Medium (Channel): The physical path through which the message travels from
sender to receiver (e.g., twisted-pair cable, fiber optics, or the atmosphere).

R 5. Protocol: A set of pre-defined rules and conventions that govern all aspects of communication. It
represents an agreement between devices on how data is formatted, transmitted, received, and
A acknowledged. Without a common protocol, effective communication is impossible. Protocols
handle error detection, synchronization, and signaling.
T Example: When you send an email, your laptop (Sender) uses the SMTP protocol to send the email text
(Message) over a Wi-Fi connection (Medium) to your email provider’s server (Receiver).
I In more detailed systems, we also consider Encoder and Decoder (Codec). An encoder converts digital
signals into a form suitable for the transmission medium (e.g., modulation), while a decoder performs the
O reverse process (demodulation) at the receiving end.
Key Characteristics of an Effective Network
N For a network to be functional and efficient, it must strive to meet three primary goals, often encapsulated

S in the delivery requirements:


• Delivery: The system must deliver data to the correct, intended destination.
• Accuracy: The system must deliver data accurately, without alteration. The data received must be
identical to the data sent.
• Timeliness: The system must deliver data in a timely manner. For real-time applications like
audio and video, low delay (latency) is more critical than perfect accuracy. A related concept
is Jitter, which refers to the variation in packet delay. High jitter in a video call causes choppy
audio and frozen video.

P a g e 1 | 41
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
o Characteristics: Centralized management, high security, scalable. Requires expensive
server hardware/admin.
o Example: Corporate email, web browsing.
• Peer-to-Peer (P2P):

13. Data Communication & Networking


o All computers (peers) have equal status; each can act as both client and server.
o Characteristics: Easy/inexpensive to set up, no central admin. Less secure, not scalable,
poor under heavy load.
o Example: Small office/home networks, BitTorrent.
M • Hybrid: Combines client-server and P2P models.
The OSI and TCP/IP Reference Models
K The Need for Layered Models
Before standardization, vendor-specific solutions couldn't interoperate. Layered models divide the
complex task of network communication into simpler, manageable layers, each with a specific function.
P The OSI (Open Systems Interconnection) Model
A 7-layer theoretical framework developed by ISO.
R Layer Name Key Function Protocols/Devices PDU

E
Provides interface
for user/apps to HTTP, FTP, SMTP, DNS,
7 Application Data
access network Telnet
P services.
Translation,
A 6 Presentation encryption,
compression.
SSL/TLS, JPEG, MPEG,
ASCII/EBCDIC
Data

R 5 Session
Establishes,
manages, terminates NetBIOS, RPC, SIP Data
A sessions/dialogues.
End-to-end process-

T 4 Transport
to-process
communication, TCP (reliable), UDP (fast) Segment/Datagram
reliability, flow
I control.
Logical addressing
O 3 Network (IP), routing across
multiple networks.
IP, ICMP, IGMP, Routers Packet

N Node-to-node
delivery on same
Ethernet, PPP, Switches,
S 2 Data Link link, framing,
physical addressing
Bridges, NICs
Frame

(MAC).
Transmits raw bit
stream over physical
RS-232, 100Base-TX, Hubs,
1 Physical medium. Defines Bit
Repeaters, Cables
electrical/mechanical
specs.

P a g e 6 | 41
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Data Communication & Networking
FOUNDATIONAL CONCEPTS
1. Data communication is the electronic exchange of digital information between two or more
devices via a transmission medium.

13. Data Communication & Networking


2. The five fundamental components of any data communication system are Message, Sender,
Receiver, Transmission Medium, and Protocol.
3. A protocol is a set of rules governing communication, handling aspects like error detection,

M synchronization, and authentication.


4. The encoder converts digital signals into a form suitable for transmission, while
K the decoder performs the reverse process at the receiver.
5. Delivery, Accuracy, and Timeliness are the three key properties of an effective data
communication system.
6. Jitter refers to the variation in packet delay and is particularly detrimental to real-time
P audio/video communication.
7. An analog signal is characterized by continuous variation in amplitude, frequency, and phase
R over time.
8. Frequency of an analog signal is measured in Hertz (Hz) and represents the number of cycles
E completed per second.
9. A digital signal represents data as discrete, distinct on-off electrical pulses, typically binary 1s
P and 0s.
10. ASCII is a 7-bit coding scheme capable of representing 128 characters, primarily for English
A text.
11. Unicode uses 16 or more bits to represent over 65,000 symbols, including characters from nearly
R all world languages.

A 12. UTF-8 is a variable-length Unicode encoding that maintains backward compatibility with ASCII.
13. Attenuation is the loss of signal strength as it travels through a medium, measured in decibels

T (dB).
14. Amplification is the process of strengthening an attenuated signal using devices like amplifiers
I or repeaters.
15. Distortion occurs when different frequency components of a signal arrive at different times,
O changing the signal's shape.
16. Noise is any unwanted external signal that mixes with and corrupts the original signal during
N transmission.
17. Crosstalk is a specific type of noise where signals leak from one cable or channel into an
S adjacent one.
18. In simplex mode, communication is unidirectional with one permanent sender and one permanent
receiver.
19. Half-duplex mode allows two-way communication but not simultaneously; devices must take
turns.
20. Full-duplex mode enables simultaneous two-way communication, requiring either two channels
or channel division.

P a g e 14 | 41
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. In data communication, which external signals
component is responsible for c) Involves change in signal shape due
converting a message into a signal to varying propagation speeds of its

13. Data Communication & Networking


suitable for the transmission components
medium? d) Can be completely eliminated by
a) Receiver using shielded cables

M b) Protocol
c) Encoder
Answer: c) Involves change in signal
shape due to varying propagation
K d) Transmission Medium
Answer: c) Encoder
speeds of its components
6. The metallic shield in a coaxial cable
2. The property of a communication serves the primary purpose of:
system that ensures data is delivered a) Providing structural rigidity
P as it is produced, without significant
delay or jitter, is called:
b) Acting as the primary data conductor
c) Shielding the central conductor from
R a) Delivery electromagnetic interference
b) Accuracy d) Reducing the cable's weight
E c) Timeliness Answer: c) Shielding the central
d) Synchronization conductor from electromagnetic
P Answer: c) Timeliness interference
3. Which characteristic of an analog 7. In fiber optic communication, total
A signal refers to the position of the internal reflection occurs because:
wave relative to a point in time?
R
a) The core has a higher refractive index
a) Amplitude than the cladding

A b) Frequency
c) Phase
b) The cladding has a higher refractive
index than the core

T d) Wavelength
Answer: c) Phase
c) Both core and cladding have identical
refractive indices

I 4. UTF-8 encoding is widely adopted on


the web primarily because:
d) Light signals are amplified at each
reflection point
O a) It uses the fewest bits per character
b) It is backward compatible with
Answer: a) The core has a higher
refractive index than the cladding
N existing ASCII text
c) It provides the strongest encryption
8. Which wireless communication
medium is characterized by
S d) It is mandated by IEEE standards omnidirectional propagation and
Answer: b) It is backward compatible ability to penetrate walls?
with existing ASCII text a) Microwaves
5. Distortion in a signal differs from b) Satellite waves
noise in that distortion: c) Radio waves
a) Is always caused by external sources d) Infrared waves
like motors Answer: c) Radio waves
b) Refers to unwanted addition of
P a g e 22 | 41
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 14

Computational Thinking and Algorithms


Introduction to Computational Thinking
Computational Thinking (CT) is a structured, problem-solving methodology that enables individuals

14. Computational Thinking and Algorithm


to tackle complex problems by applying techniques and processes inspired by computer science. It is a
universal skill, not limited to programming, applicable in fields such as mathematics, science,
engineering, business, healthcare, and everyday life tasks like planning a trip or organizing an event. CT
involves a mental framework for logical and creative problem-solving, using specific techniques to think
M clearly, logically, and systematically.
The primary goal is to design systematic, step-by-step solutions that can be executed by a human, a
K computer, or both. It prepares individuals to deconstruct complex challenges, identify patterns, focus on
essentials, and design effective solutions.

Core Components (Pillars) Of Computational Thinking


Computational thinking is built upon four fundamental, interconnected pillars.
P Decomposition
R Definition: The process of breaking a large, complex problem into smaller, more manageable sub-
problems or tasks.
E Purpose: Makes understanding, analyzing, and solving the problem significantly easier. It simplifies
the overall task and allows for focused work on individual parts.
Examples:
P • Everyday: Building a birdhouse can be decomposed into: designing, gathering materials, cutting
wood, assembling, painting, and installing. Preparing a meal involves steps like deciding the menu,
A gathering ingredients, cooking, and serving.
• Software: Building a mobile app is decomposed into designing the user interface, coding features
R •
(login, navigation), and implementing data storage.
Robotics: Solving a maze problem for a robot can be broken down into: determining the maze size,
A defining start/end points, identifying allowed moves, and recognizing dead ends.

Pattern Recognition
T Definition: Identifying similarities, trends, or regularities within data or across different problems.
Purpose: Allows for the reuse and adaptation of known solutions, increasing efficiency and helping in
I predicting or generalizing solutions.
Examples:
O • Mathematics: Observing that the area of squares (1, 4, 9, 16, 25…) follows the pattern of adding
consecutive odd numbers (1, 1+3, 1+3+5, etc.).
N • Behavioral: Noticing you often forget homework on Mondays establishes a pattern, leading to a
solution like setting a Sunday reminder.

S • Data Analysis: Analyzing website traffic to identify which pages users visit most frequently or
common navigation paths they follow.

Abstraction
Definition: The process of filtering out irrelevant details and focusing only on the essential
information needed to solve the problem. It involves creating a general model.
Purpose: Reduces complexity by hiding unnecessary details, allowing one to work with a simplified

P a g e 1 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
1 1 3 3 1 ≤ 3, no change.
2 4 3 4 4 > 3, update max.
... ... ... ... ...

14. Computational Thinking and Algorithm


End – – 9 Final result returned.
Algorithm Evaluation Parameters
1. Correctness: Must produce the right output for all valid inputs (verified via testing).
M 2. Clarity: How easily the logic can be understood (aided by descriptive names, structure, comments).
3. Efficiency: How well it uses time (Time Complexity) and memory (Space Complexity). Measured in
K Big O notation (O(n), O(log n), O(n²)).
o Example (Prime Check): Dividing by numbers up to √n is more efficient than up to n-1.
4. Reliability: Ability to consistently produce correct results across multiple executions.

Simulation and LARP


P • Simulation: Using a computer program to model a real-world process (e.g., weather forecasting,
traffic flow) for safe, cost-effective testing.
R • LARP (Logic of Algorithms for Resolution of Problems): Educational software that provides an
interactive environment to write, execute, and debug algorithms using simple syntax, helping visualize
E logic.

Standard Algorithms
P Sorting Algorithms
A Process of arranging data in order (ascending/descending).

R Algorithm Key Idea & Working When to Use / Note


Bubble Repeatedly compares adjacent elements Small datasets, educational.
A Sort and swaps them if in wrong order. Largest Simple but inefficient for large

T element "bubbles up" per pass. lists.


Insertion Builds sorted list one element at a time Small or nearly sorted datasets.
I Sort by inserting each new element into its Efficient for small lists.

O correct position in the sorted part.


Selection Divides list Small datasets, when
N Sort into sorted and unsorted parts. minimizing swaps (memory

S Repeatedly finds min/max from unsorted writes) is a concern.


part and swaps it with the first unsorted
element.

P a g e 8 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Computational Thinking and Algorithm
1. Computational Thinking is a structured problem-solving methodology inspired by computer science
but applicable to all fields.

14. Computational Thinking and Algorithm


2. The four fundamental pillars of Computational Thinking are Decomposition, Pattern Recognition,
Abstraction, and Algorithmic Design.

M 3. Decomposition is the process of breaking a large, complex problem into smaller, more manageable

K sub-problems.
4. Pattern Recognition involves identifying similarities, trends, or regularities within data or across
different problems.

P 5. Abstraction is the process of filtering out irrelevant details to focus only on the essential information

R needed to solve a problem.


6. Algorithmic Design is the creation of a finite, precise, step-by-step sequence of instructions to solve a
E specific problem.

P 7. A core guiding principle of CT is Problem Understanding, the thorough analysis of a problem to define

A requirements and constraints.


8. The Problem-Solving Process involves: Identify, Define, Analyze, Plan, Test, and Select the best
R solution.

A 9. The Input-Process-Output (IPO) model is the fundamental structure for any computational solution.

T 10. An IPO Chart is a simple tabular tool used to visually plan a solution based on Input, Process, and
Output.
I 11. A Simple Problem has a clear cause and straightforward solution, requiring fewer resources.

O 12. A Complex Problem has multiple interconnected causes, requires significant resources, and may have

N no guaranteed solution.
13. A Decision Problem is one where the solution is a binary "yes-or-no" (true/false) answer for a given
S input.
14. A Search Problem involves finding a specific item, path, or configuration that satisfies given criteria
from a set of possibilities.

P a g e 12 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
a) Input, Program, Outcome c) Feasibility
b) Instruction, Process, Output d) Generality
c) Input, Process, Output Answer: b) Finiteness
d) Initialize, Process, Operate 9. An algorithm that solves a problem by
Answer: c) Input, Process, Output dividing it into independent sub-problems,

14. Computational Thinking and Algorithm


4. A problem that asks, "Is this number a solving each, and combining their results is
prime?" is best categorized as a: using which approach?
a) Search Problem a) Brute Force
b) Counting Problem b) Recursive
M c) Decision Problem
d) Optimization Problem
c) Divide and Conquer
d) Randomized
K 5.
Answer: c) Decision Problem
If you have 5 different shirts and 4 different 10.
Answer: c) Divide and Conquer
In a flowchart, the symbol used to represent a
pairs of pants, and you want to find the total conditional branch in the logic flow is a:
number of possible outfits (one shirt + one a) Rectangle

P
pant), you must apply the: b) Parallelogram
a) Addition Principle c) Diamond
b) Subtraction Principle d) Oval
R c) Multiplication Principle Answer: c) Diamond
d) Division Principle 11. The primary advantage of using pseudocode
E 6.
Answer: c) Multiplication Principle
The formula nCr = n! / (r!(n-r)!) is used to
over a flowchart for algorithm design is:
a) It provides a visual representation.
P calculate:
a) The number of permutations of *r* items
b) It is easier to write and modify for
complex logic.
A from *n*
b) The number of combinations of *r* items
c) It uses standardized graphical symbols.
d) It can be directly executed by a computer.
from *n* Answer: b) It is easier to write and modify
R c) The number of ways to arrange *n* items for complex logic.
in a line 12. A manual, step-by-step execution of an
A d) The sum of all possible selections algorithm using sample data to check for
Answer: b) The number of combinations logical errors before coding is known as a:
T 7.
of *r* items from *n*
The Pigeonhole Principle guarantees that if
a) Simulation
b) Dry Run
I you have 15 students and only 12 lockers,
then:
c) Compilation
d) Validation
O a) Every locker will be used.
b) At least one locker will be empty. 13.
Answer: b) Dry Run
Which algorithm evaluation parameter is
c) At least one locker will contain more than concerned with how well an algorithm uses
N one item. time and memory resources?
d) The number of lockers must be increased. a) Correctness
S Answer: c) At least one locker will contain
more than one item.
b) Clarity
c) Efficiency
8. Which characteristic of a good algorithm d) Reliability
explicitly requires that it must stop after a Answer: c) Efficiency
finite number of steps? 14. The sorting algorithm that works by
a) Definiteness repeatedly comparing adjacent elements and
b) Finiteness swapping them if they are in the wrong order

P a g e 17 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 15

Programming Fundamentals
The Foundations of Computing & Programming
Introduction to Computing & Binary

15. Programing Fundamentals


Computers are universal machines that process information. At their most fundamental level, they
operate on two states: ON and OFF, represented by the numbers 1 and 0. This binary foundation
underpins all digital computing.
Information Representation: The Binary System
M Everything a computer processes—text, images, sound, and programs—is ultimately represented as
numbers using the binary number system, which has a base of 2 and uses only two digits: 0 and 1.
K •

Bit: The smallest unit of data, short for Binary Digit. A single bit holds a value of either 0 or 1.
Byte: A group of 8 bits. It is the standard unit for measuring data size.
• Larger Units: Data storage scales up using binary multiples (based on 1024, which is 2¹⁰):
o 1 Kilobyte (KB) = 1024 Bytes
P o
o
1 Megabyte (MB) = 1024 KB
1 Gigabyte (GB) = 1024 MB

R
o 1 Terabyte (TB) = 1024 GB
This system was formally refined by Gottfried Leibniz. Inside a computer, bits are represented by the
state of electronic switches (open/closed) or electrical signals (off/on) in components like the CPU and
E RAM.
Binary vs. Decimal Number Systems
P Base
Feature
10
Decimal System (Base-10)
2
Binary System (Base-2)

A Digits Used
Place Value
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Powers of 10 (..., 1000, 100, 10, 1)
0, 1
Powers of 2 (..., 8, 4, 2, 1)
R Smallest Unit
Example
Digit
1980 =
Bit (Binary Digit)
1010₂ = (1x8)+(0x4)+(1x2)+(0x1) =
A Notation
(1x1000)+(9x100)+(8x10)+(0x1)
Written as 45 or 45₁₀
10₁₀
Written with a subscript, e.g., 110₂

T In a binary number, the leftmost bit is the Most Significant Bit (MSB) and the rightmost bit is
the Least Significant Bit (LSB).
Number System Conversion
I Binary to Decimal Conversion: Use the positional notation method. Multiply each bit by 2 raised to
the power of its position (starting from 0 on the right) and sum the results.
O Example: 101101₂ = (1x2⁵)+(0x2⁴)+(1x2³)+(1x2²)+(0x2¹)+(1x2⁰) = 32+0+8+4+0+1 = 45₁₀.
Decimal to Binary Conversion: Use the repeated division-by-2 method.
N 1.
2.
Divide the decimal number by 2.
Write down the remainder (0 or 1).
S 3.
4.
Use the quotient as the new number.
Repeat steps 1-3 until the quotient is 0.
5. The binary number is the sequence of remainders read from the last to the first.
Example: Convert 172₁₀.
172 ÷ 2 = 86 R 0
86 ÷ 2 = 43 R 0
43 ÷ 2 = 21 R 1
21 ÷ 2 = 10 R 1
P a g e 1 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
<html lang="en">
<head>
<title>Page Title</title>
</head>
<body>
<!-- Visible content -->

15. Programing Fundamentals


</body>
</html>
Essential Tags:
Headings: <h1> to <h6>.
M

• Paragraph & Line Break: <p>, <br>.
• Text Formatting: <b>, <i>, <u>, <sup>, <sub>.
K •

Grouping: <div> (block), <span> (inline).
Image: <img src="[Link]" alt="Description">.
• Lists: <ul>, <ol> with <li>.
• Links: <a href="[Link] Text</a>.
P • Video: <video controls><source src="clip.mp4"></video>.
HTML Forms: Collect user input using <form>.

R
html
<form action="/submit" method="POST">
<label for="name">Name:</label>
E <input type="text" id="name" name="name"><br>
<input type="radio" id="male" name="gender" value="male">

P <label for="male">Male</label><br>
<input type="submit" value="Submit">
</form>
A HTML Tables: Organize data.
html

R <table>
<tr><th>Name</th><th>Class</th></tr>
<tr><td>Alia</td><td>9</td></tr>
A </table>
Cascading Style Sheets (CSS)
T Controls presentation, layout, and styling, separating content from design.
Ways to Use CSS:
I 1. Inline: Within an HTML tag using style.
2. Internal (Embedded): Within a <style> tag in the <head>.

O 3. External: In a separate .css file linked via <link rel="stylesheet" href="[Link]">.


Priority: Inline > Internal > External.
Common Properties:
N css
p{
S color: blue;
font-size: 16px;
text-align: center;
background-color: #f2f2f2;
padding: 10px;
margin: 20px;
border: 1px solid black;
}

P a g e 6 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Programing Fundamentals
1. At its core, a computer processes information using two states: ON (1) and OFF (0).
2. The binary number system has a base of 2 and uses only the digits 0 and 1.
3. A Bit (Binary Digit) is the smallest unit of data, holding a value of either 0 or 1.
4. A Byte is a group of 8 bits and is the standard unit for measuring data size.

15. Programing Fundamentals


5. Data storage scales using binary multiples: 1 Kilobyte (KB) = 1024 Bytes.
6. In a binary number, the leftmost bit is the Most Significant Bit (MSB) and the rightmost is the Least
Significant Bit (LSB).

M 7. To convert binary to decimal, use positional notation: multiply each bit by 2 raised to its position
power and sum the results.
8. To convert decimal to binary, use the repeated division-by-2 method and read the remainders from
K the last to the first.
9. ASCII is an 8-bit code representing 128 characters, where 'a' = 01100001₂ (97₁₀).
10. Unicode is an extended system capable of representing over 65,000 characters from many world
languages.
P 11. In the RGB color model, each color component (Red, Green, Blue) is represented by an 8-bit
number (0-255).
R 12.
13.
White in RGB is represented as (255,255,255) or (11111111, 11111111, 11111111)₂.
Sound is converted from analogue to digital using an Analogue-to-Digital Converter (ADC).

E 14. The quality of digital sound is determined by Sample Rate (samples per second) and Bit Depth (bits
per sample).
15. Problem analysis involves clearly defining the problem, identifying causes, and brainstorming
P solutions.
16. Solution planning techniques include Abstraction, Divide and Conquer, Analogy, Brainstorming,
A 17.
and Research.
The best solution is evaluated based on Speed/Time Efficiency, Cost (resources, memory), and
R 18.
Complexity (number of steps).
An algorithm is a well-defined, step-by-step procedure that takes input, processes it, and produces
A 19.
an output.
Algorithm efficiency is measured by Time Complexity (execution speed) and Space Complexity

T 20.
(memory usage).
A flowchart is a diagrammatic representation of an algorithm using standardized symbols.
21. In a flowchart, an Oval represents the Start or End terminal.
I 22. In a flowchart, a Parallelogram represents an Input or Output operation.
23. In a flowchart, a Rectangle represents a Process or calculation step.
O 24.
25.
In a flowchart, a Diamond represents a Decision point (Yes/No, True/False).
Before drawing a flowchart, determine the problem's inputs, processing, decisions, and outputs.
N 26.
27.
A Program is a set of ordered instructions telling a computer how to perform a specific task.
The concept of a stored program in memory was pioneered by John von Neumann.
S 28.
29.
Software is a collection of many programs bundled together for a larger task (e.g., Microsoft Paint).
Programming is the process of designing, writing, testing, and maintaining source code.
30. Machine Language is the computer's native language of 1s and 0s; it is machine-dependent and
difficult for humans.
31. Assembly Language uses simple abbreviations (mnemonics) and requires an assembler.
32. High-Level Languages (e.g., Python, C++) use English-like syntax and require a compiler or
interpreter.

P a g e 10 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following correctly defines the d) Decision or Conditional branch
relationship between a bit and a byte? Answer: d) Decision or Conditional
a) A bit is a group of 8 bytes. branch
b) A byte is a group of 8 bits. 7. The von Neumann architecture is most

15. Programing Fundamentals


c) A bit represents a decimal digit, while a famous for introducing the concept of:
byte represents a binary digit. a) Binary number system
d) A byte is always 1024 bits. b) Stored-program computers

M Answer: b) A byte is a group of 8 bits.


2. In the binary number 1101, the weight of the
c) Graphical user interfaces
d) Object-oriented programming
digit '1' in the leftmost position (assuming Answer: b) Stored-program computers
K positions start at 0 from the right) is: 8. A program that translates assembly language
a) 2^0 mnemonics into machine code is called a(n):
b) 2^1 a) Compiler
c) 2^2 b) Interpreter
P d) 2^3
Answer: d) 2^3
c) Assembler
d) Linker
R 3. Using the repeated division-by-2 method, the
binary representation of the decimal number 9.
Answer: c) Assembler
In programming, a construct that allows a

E 29 is:
a) 11100
block of code to be executed repeatedly as
long as a condition remains true is a:
b) 11101 a) Sequence
P c) 11011 b) Selection
d) 10111 c) Loop (Repetition)
A Answer: b) 11101
4. In the RGB color model, the binary
d) Event
Answer: c) Loop (Repetition)
R representation for the color Red (255, 0, 0)
would be:
10. In Scratch, a variable declared as "for this
sprite only" has what kind of scope?
A a) (11111111, 00000000, 00000000)
b) (00000000, 11111111, 00000000)
a) Global scope
b) Local scope

T c) (00000000, 00000000, 11111111)


d) (11111111, 11111111, 11111111)
c) Static scope
d) Dynamic scope
Answer: a) (11111111, 00000000, Answer: b) Local scope
I 00000000) 11. Which Python operator performs integer
5. When planning a software solution, the (floor) division?
O technique of creating a simplified model to
focus on essential details is known as:
a) /
b) //
N a) Decomposition
b) Pattern Recognition
c) %
d) **
S c) Abstraction
d) Algorithmic Design 12.
Answer: b) //
The Python code for i in range(5, 0, -1):
Answer: c) Abstraction print(i) will output:
6. The primary purpose of a flowchart's a) 0 1 2 3 4
diamond-shaped symbol is to represent a: b) 1 2 3 4 5
a) Start or End point c) 5 4 3 2 1
b) Input or Output operation d) 5 4 3 2 1 0
c) Calculation or Process step Answer: c) 5 4 3 2 1
P a g e 14 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 16

Programming Fundamentals & Core Concepts (C /C++)


Introduction to Computing and Binary Representation

16. Programing Fundamentals & Core


At the heart of all modern computing lies a simple yet profound idea: information can be represented and
manipulated using only two states—ON and OFF, symbolized by the digits 1 and 0. This binary system is the
fundamental language of computers.
Key Concepts:
M •

Bit (Binary Digit): The smallest unit of data. A single bit holds either a 0 or a 1.
Byte: A group of 8 bits. It is the standard unit for measuring data size (e.g., a single character
K often occupies one byte).
• Data Storage Units: Memory and storage scale using binary multiples (powers of 2):
o 1 Kilobyte (KB) = 1024 Bytes
o 1 Megabyte (MB) = 1024 KB
1 Gigabyte (GB) = 1024 MB
P
o
o 1 Terabyte (TB) = 1024 GB
Inside a computer, these bits are physically represented by the state of electronic components—such as
R transistors being open or closed, or capacitors being charged or discharged. This binary foundation, formalized
by Gottfried Leibniz, enables the representation of all forms of data: numbers, text, images, and sound.
E Binary vs. Decimal Number Systems
Feature Decimal System (Base-10) Binary System (Base-2)
P Base
Digits Used
10
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
2
0, 1
A Place Value
Smallest Unit
Powers of 10 (…, 1000, 100, 10, 1)
Digit
Powers of 2 (…, 8, 4, 2, 1)
Bit
R Example 1980 = (1×1000)+(9×100)+(8×10)+(0×1)
1010₂ = (1×8)+(0×4)+(1×2)+(0×1) =
10₁₀
A Notation Written as 45 or 45₁₀ Written with subscript, e.g., 110₂
In a binary number, the leftmost bit is the Most Significant Bit (MSB) (highest value), and the rightmost is

T the Least Significant Bit (LSB).


Number System Conversion
I Binary to Decimal:
Use the positional notation method. Multiply each bit by 2 raised to the power of its position (starting from 0
on the right) and sum the results.
O Example: 101101₂ = (1×2⁵)+(0×2⁴)+(1×2³)+(1×2²)+(0×2¹)+(1×2⁰) = 32+0+8+4+0+1 = 45₁₀.
Decimal to Binary:
N Use the repeated division-by-2 method.
1. Divide the decimal number by 2.
S 2.
3.
Write down the remainder (0 or 1).
Use the quotient as the new number.
4. Repeat until the quotient is 0.
5. The binary equivalent is the sequence of remainders read from the last to the first.
Example: Convert 172₁₀ to binary.
172 ÷ 2 = 86 R 0
86 ÷ 2 = 43 R 0
43 ÷ 2 = 21 R 1
21 ÷ 2 = 10 R 1
10 ÷ 2 = 5 R 0
5÷2=2R1
2÷2=1R0
1÷2=0R1
P a g e 1 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Warning: A very common error is using the assignment operator = instead of the equality operator == in
conditions. if (x = 5) assigns 5 to x and is always true (since 5 is non-zero), while if (x == 5) correctly
checks for equality.
Logical Operators
Used to combine or modify relational expressions (conditions). They operate on Boolean values (true/non-

16. Programing Fundamentals & Core


zero or false/zero).
Example (T=1,
Operator Name Description Result
F=0)
Logical (5<10) && 1 && 1 =
M &&
AND
True only if both conditions are true.
(2>1) 1
(5>10) ||
K || Logical OR True if at least one condition is true.
(2>1)
0 || 1 = 1
Logical Reverses the truth value (true becomes
! !(5>10) !0 = 1
NOT false).
Short-Circuit Evaluation: In expr1 && expr2, if expr1 is false, expr2 is not evaluated (the result is
P already false). In expr1 || expr2, if expr1 is true, expr2 is not evaluated. This can be used for efficiency
and safety (e.g., (ptr != NULL) && (ptr->data > 0)).
R Assignment Operator (=)
Stores the value of the right-hand expression into the variable on the left.
E •

Syntax: variable = expression;
Example: area = length * width;

P • The assignment operator returns the value assigned. This allows chained assignment: a = b
= c = 5; (all get the value 5).

A Increment (++) and Decrement (--) Operators


Unary operators that increase or decrease the value of a variable by 1. They can be used
in prefix or postfix form, which affects when the increment/decrement happens relative to the value being
R used in an expression.
• Prefix (e.g., ++x, --y): The increment/decrement happens first, and then the new value is
A used in the expression.
• Postfix (e.g., x++, y--): The current value is used in the expression first, and then the
T variable is incremented/decremented.
Operation Expression Value of i After Value of j After
I j = ++i
j = i++
Prefix
Postfix
i increments, then assigned to j. j gets the new value of i.
i assigned to j, then increments. j gets the old value of i.
O Example: If i = 5 initially:
• j = ++i; → i becomes 6, j becomes 6.
N • j = i++; → j is assigned 5, then i becomes 6.
Important: Avoid using the same variable multiple times in an expression with increment/decrement
S operators (e.g., x = x++ + ++x;). The behavior is undefined in C because the order of evaluation of side
effects is not specified.
Compound Assignment Operators
Combine an arithmetic or bitwise operation with assignment.
Operator Example Equivalent To
+= a += 5; a = a + 5;
-= a -= 3; a = a - 3;
*= a *= 2; a = a * 2;
/= a /= 4; a = a / 4;
%= a %= 3; a = a % 3;
These operators are concise and can sometimes lead to more efficient machine code.
Conditional (Ternary) Operator (? :)
A shorthand for a simple if-else statement. It is the only ternary operator in C (takes three operands).
P a g e 14 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• for (i = 1; ; i++) // Infinite loop if no break inside.
• for (;;) // Infinite loop.
Example: Sum of first N natural numbers.
c
int n, sum = 0;

16. Programing Fundamentals & Core


printf("Enter a positive integer: ");
scanf("%d", &n);

for (int i = 1; i <= n; ++i) {

M }
sum += i;

printf("Sum = %d\n", sum);


K Nested Loops
A loop placed inside the body of another loop. The inner loop completes all its iterations for each single
iteration of the outer loop.
Use Cases: Printing patterns (triangles, rectangles), working with 2D arrays/matrices, simulations (e.g.,
P generating combinations).
Example: Printing a right-angled triangle of stars.
R c
for (int row = 1; row <= 5; row++) { // Outer loop (controls rows)
for (int col = 1; col <= row; col++) { // Inner loop (controls stars per row)
E }
printf("*");

P }
printf("\n"); // New line after each row

A /* Output:
*
**
R ***
****
A *****
*/

T Example: Multiplication Table (1 to 5).


c
for (int i = 1; i <= 5; i++) {
I for (int j = 1; j <= 10; j++) {
printf("%d x %d = %d\n", i, j, i * j);
O }
printf("\n"); // Blank line between tables
}
N Sentinel-Controlled Loops
Used when the number of data items is unknown. A special sentinel value (an end marker that is not valid
S data) signals the termination of input.
General Pattern (using while):
c
get the first data item;
while (data item is not the sentinel value) {
process the data item;
get the next data item;
}
*Example: Calculating average marks. Sentinel = -1.*
c
int marks, sum = 0, count = 0;
printf("Enter marks (-1 to stop): ");
scanf("%d", &marks);

P a g e 21 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
c
#include <stdio.h>
#include <string.h>

int main() {

16. Programing Fundamentals & Core


char name[50];

// Unsafe method (doesn't limit input)


printf("Enter your name: ");
scanf("%s", name); // Stops at whitespace
M // Safer method
K printf("Enter your full name: ");
fgets(name, sizeof(name), stdin); // Reads entire line including spaces

// Output
printf("Hello, %s\n", name);
P return 0;
R }
Common String Functions (string.h):

E
c
#include <string.h>

P char
char
str1[20] = "Hello";
str2[20] = "World";

A char
char
str3[40];
str4[] = "Hello, World!";

R // strlen(): Get string length (excluding '\0')


int len = strlen(str1); // len = 5
A // strcpy(): Copy string

T strcpy(str3, str1); // str3 = "Hello"

// strcat(): Concatenate strings


I strcat(str1, " ");
strcat(str1, str2);
// str1 = "Hello "
// str1 = "Hello World"
O // strcmp(): Compare strings

N
int result = strcmp("apple", "banana"); // Negative (apple < banana)
result = strcmp("apple", "apple"); // 0 (equal)
result = strcmp("banana", "apple"); // Positive (banana > apple)
S // strncpy(), strncat(), strncmp(): Safer versions with length limit
char dest[10];
strncpy(dest, "Hello, World!", 9);
dest[9] = '\0'; // Ensure null-termination

// strstr(): Find substring


char *ptr = strstr(str4, "World"); // Returns pointer to "World" in str4
if (ptr != NULL) {
printf("Found at position: %ld\n", ptr - str4);
}

// strchr(): Find first occurrence of character


char *ch_ptr = strchr(str4, 'W'); // Returns pointer to 'W'

P a g e 33 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Programing Fundamentals & Coe Concepts
Programming Fundamentals & Binary System
1. The binary number system uses only two digits: 0 and 1, representing the OFF and ON states of a
computer.

16. Programing Fundamentals & Core


2. A bit (Binary Digit) is the smallest unit of data, storing either 0 or 1.
3. Eight bits form one byte, which is the standard unit for measuring data size.
4. Memory scales using binary multiples: 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB.
5. The leftmost bit in a binary number is the Most Significant Bit (MSB), and the rightmost is the Least

M 6.
Significant Bit (LSB).
Binary to decimal conversion uses positional notation: each bit is multiplied by 2 raised to its position
power.
K 7. Decimal to binary conversion uses the repeated division-by-2 method, reading remainders from last to
first.
8. ASCII is an 8-bit character encoding standard representing 128 characters, with 'A' = 65 and 'a' = 97.
9. Unicode extends ASCII to support over 65,000 characters from multiple writing systems worldwide.
P 10. In the RGB color model, each color component (Red, Green, Blue) is represented by an 8-bit value
from 0 to 255.
R 11.
12.
White in RGB is (255,255,255) or binary 11111111 for each component.
Digital sound conversion uses an Analogue-to-Digital Converter (ADC), with quality determined by

E
sample rate and bit depth.
13. Problem analysis involves defining the problem clearly, identifying causes, and brainstorming
solutions.
P 14. Abstraction in problem-solving means creating a simplified model focusing only on essential details.
15. Divide and conquer breaks complex problems into smaller, more manageable sub-problems.
A 16.
17.
An algorithm is a finite, step-by-step procedure that takes input, processes it, and produces output.
Algorithm efficiency is measured by time complexity (execution speed) and space complexity
R 18.
(memory usage).
A flowchart's diamond shape represents a decision point with yes/no or true/false branches.
A 19.
20.
The parallelogram in a flowchart denotes input/output operations.
John von Neumann pioneered the stored-program concept where both instructions and data reside in
memory.
T 21. Software is a collection of multiple programs bundled together for a comprehensive task.
22. Machine language (1GL) consists of binary code (0s and 1s) executed directly by the CPU.
I 23. Assembly language (2GL) uses mnemonics like ADD and MOV, requiring an assembler for
translation.
O 24.
25.
High-level languages (3GL) like C and Python use English-like syntax and are machine-independent.
Procedural languages design programs as sequences of procedures operating on data.
N 26.
27.
Object-oriented languages model programs as collections of interacting objects.
A compiler translates the entire source program into machine code in one go.

S 28.
29.
An interpreter translates and executes code line by line, stopping at errors.
The five fundamental programming constructs are sequence, selection, repetition, events, and
variables/constants.
30. Syntax errors violate language grammar rules and prevent program execution.
31. Logical errors allow programs to run but produce incorrect results due to flawed logic.
32. In Scratch, variables can be "for this sprite only" (local) or "for all sprites" (global).
33. Scratch's forever block creates an infinite loop, while repeat [n] executes a block n times.
34. Python uses dynamic typing where variable types are inferred from assigned values.
35. Python's input() function reads strings, requiring explicit conversion (e.g., int()) for numeric input.
36. The // operator in Python performs floor division, returning the integer quotient.
37. Python lists are ordered, mutable collections accessed via zero-based indexing.
38. The append() method adds an element to the end of a Python list.
39. A webpage is a single HTML document, while a website is a collection of related webpages.
40. A web server hosts websites and serves requested pages to client browsers.
P a g e 59 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. In the binary number 110101, what is c) Graphical user interface
the decimal value of the most significant bit? d) Object-oriented programming

16. Programing Fundamentals & Core


a) 1 Answer: b) Stored-program concept
b) 16 8. Which translator executes source code
c) 32 line by line and stops at the first error
d) 64 encountered?

M Answer: c) 32
2. When converting decimal 45 to binary
a) Compiler
b) Assembler
using repeated division-by-2, what is the c) Interpreter
K sequence of remainders read from last to d) Linker
first? Answer: c) Interpreter
a) 101101 9. A program runs but produces incorrect
b) 1011011 output. This is most likely a:
P c) 1011010
d) 101101
a) Syntax error
b) Semantic error
R Answer: a) 101101
3. Which statement about ASCII encoding
c) Logical error
d) Runtime error

E
is INCORRECT? Answer: c) Logical error
a) It uses 8 bits per character 10. In Scratch, a variable declared as "for
b) It represents 256 different characters this sprite only" has:
P c) 'a' has decimal value 97 a) Global scope
d) Uppercase letters come before lowercase in b) Local scope
A value
Answer: b) It represents 256 different
c) Static scope
d) Dynamic scope
R characters
4. In the RGB color model, what is the
Answer: b) Local scope
11. What will be the output of Python code:
A binary representation for pure green?
a) 00000000 11111111 00000000
print(7 // 2)?
a) 3.5
b) 11111111 00000000 00000000 b) 3
T c) 00000000 00000000 11111111 c) 4
d) 11111111 11111111 00000000 d) 3.0
I Answer: a) 00000000 11111111 00000000 Answer: b) 3
5. Which problem-solving technique 12. The Python range(5, 0, -2) generates:
O involves ignoring unnecessary details to
focus on the core model?
a) 5, 3, 1
b) 5, 4, 3, 2, 1
N a) Decomposition
b) Pattern Recognition
c) 0, 1, 2, 3, 4
d) 5, 4, 3, 2, 1, 0

S c) Abstraction
d) Algorithmic Design
Answer: a) 5, 3, 1
13. Which Python method correctly adds
Answer: c) Abstraction 'cherry' to the end of a list named fruits?
6. What is the primary purpose of a a) [Link]('cherry')
flowchart's diamond-shaped symbol? b) [Link]('cherry')
a) Start/End point c) [Link]('cherry')
b) Input/Output operation d) [Link]('cherry')
c) Process/Calculation step Answer: b) [Link]('cherry')
d) Decision/Conditional branch 14. A website that changes content based on
Answer: d) Decision/Conditional branch user input without reloading the page is best
7. The von Neumann architecture is described as:
revolutionary because it introduced: a) A static website
a) Binary number system b) A responsive website
b) Stored-program concept c) A dynamic website
P a g e 64 | 77
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 17

Web Development & Web Programming


Introduction to the World Wide Web and Web Development

17. Web Development & Web Programing


The World Wide Web (WWW)
The World Wide Web (WWW, W3, or Web) is a graphical information system introduced to the
public on August 6, 1991, by Tim Berners-Lee. It is built on the Internet and allows documents to be
connected via hypertext links, enabling users to navigate between them seamlessly. It is essential to
M distinguish the Web from the Internet:
• Internet: The global network of interconnected computers and devices.

K • Web: A collection of interconnected documents (web pages) accessed via web browsers.
The Web operates on a client-server model, where browsers (clients) request resources from web
servers, which respond with the requested content, typically in HTML format.
What is Web Development?
Web Development is the process of creating websites and web applications. It involves designing,
P building, and maintaining sites using a combination of programming languages, frameworks, and tools. Web
development is broadly categorized into:
R 1. Front-End Development: Concerned with what users see and interact with (user interface).
2. Back-End Development: Deals with server-side logic, databases, and application functionality.
E 3. Full-Stack Development: Combines both front-end and back-end expertise.
1.3 Why Learn Web Development?
P • Digital Literacy: Understanding how websites are built and how the Internet works.
• Career Opportunities: Opens roles such as Web Developer, UI/UX Designer, Front-End/Back-End

A Engineer, and Full-Stack Developer.


• Problem-Solving Skills: Enhances logical thinking and debugging abilities.
• Creativity: Allows the design of visually appealing and interactive interfaces.
R • Entrepreneurship: Enables the creation of online businesses, services, or digital products.
Core Web Terminology
A Fundamental Concepts
Web Page: A document written in HTML and viewed in a browser, identified by a unique URL. It
T

may contain text, images, audio, video, and hyperlinks.
• Website: A collection of related web pages hosted on a web server and accessible via a unique
I •
address (URL).
Web Browser: Software used to retrieve, interpret, and display web content (e.g., Chrome, Firefox,
O •
Edge).
Web Server: A computer that stores, processes, and delivers web pages to clients
N using HTTP/HTTPS. Any computer can act as a server by installing server software (e.g., Apache,
Nginx).

S • URL (Uniform Resource Locator): The unique address of a resource on the Internet.
Format: protocol://hostname/path. Example: [Link]
• Search Engine: A website that helps users find information by searching keywords (e.g., Google,
Bing).
• Home Page: The main or index page of a website, usually the first page accessed.
• Web Hosting: A service that stores website files on a server connected to the Internet, making them
accessible worldwide.
Types of Websites
1. Web Portals: Comprehensive sites offering multiple services (email, news, search) often requiring
login (e.g., university portals).
2. News Websites: Provide latest news, updates, videos, and archives (e.g., BBC, Tribune).
3. Informational Websites: Offer detailed information on various topics (e.g., Wikipedia).

P a g e 1 | 29
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
php
<!DOCTYPE html>
<html>
<body>
<h1>My PHP Page</h1>

17. Web Development & Web Programing


<?php
$name = "Ali";
echo "<p>Hello, $name!</p>";
?>
M </body>
</html>
K PHP Database Connection (MySQLi)
php
<?php
$servername = "localhost";
P $username = "root";
$password = "";

R $dbname = "myDB";

$conn = mysqli_connect($servername, $username, $password, $dbname);


E
if (!$conn) {
P die("Connection failed: " . mysqli_connect_error());
}
A $sql = "SELECT id, name FROM users";
R $result = mysqli_query($conn, $sql);

A while($row = mysqli_fetch_assoc($result)) {
echo "ID: " . $row["id"] . " - Name: " . $row["name"] . "<br>";

T }

mysqli_close($conn);
I ?>
Security Note: Always use prepared statements to prevent SQL injection.
O HTTP Protocol and Request-Response Cycle
HTTP is a stateless application-layer protocol.
N • HTTP Request: Sent from browser to server. Contains method (GET, POST), headers, and optional
body.
S • HTTP Response: Sent from server to browser. Contains status code (200 OK, 404 Not Found),
headers, and body (HTML, JSON, etc.).
Advanced Web Concepts
AJAX (Asynchronous JavaScript and XML)
AJAX allows web pages to communicate with a server asynchronously without reloading.
Example using fetch():
javascript
fetch('get_data.php')
.then(response => [Link]())
.then(data => {
[Link](data);
// Update DOM with data

P a g e 8 | 29
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: We Development & Web Programing
Web Fundamentals & Terminology (1-25)
1. Tim Berners-Lee introduced the World Wide Web to the public on August 6, 1991.
2. The Internet is the global network connecting computers, while the Web is the collection of

17. Web Development & Web Programing


interconnected documents accessed via browsers.
3. A web page is an HTML document viewed in a browser and identified by a unique URL.
4. A web server stores, processes, and delivers web pages using HTTP protocol.
5. Any computer can become a web server by installing server software like Apache or Nginx.

M 6. URL stands for Uniform Resource Locator and follows the format:
protocol://hostname/other_information.
7. The home page is the main or index page of a website that opens first when the site is accessed.
K 8. Web hosting is the service of storing website content on a server connected to the Internet.
9. Search engines like Google help users find information by searching keywords across the Web.
10. Web portals are comprehensive websites offering multiple services like email and news, often
requiring login.
P 11. Front-end development focuses on what users see and interact with, using HTML, CSS, and
JavaScript.
R 12. Back-end development manages behind-the-scenes functionality like servers, databases, and
application logic.

E
13. Full-stack development involves both front-end and back-end aspects of web application
development.
14. Digital literacy through web development helps understand how websites are built and how the
P Internet works.
15. Career opportunities in web development include roles like web developer, designer, and other IT
A industry positions.
16. Web development enhances problem-solving skills through logical thinking and troubleshooting.
R 17. Web development allows creativity by enabling the creation of visually appealing and interactive
websites.
A 18. Entrepreneurship skills are supported by web development through starting online businesses or web
services.
19. A web browser is software used to retrieve and display information from websites.
T 20. HTTP (Hypertext Transfer Protocol) is used by web servers to deliver web pages to users' browsers.
21. News websites provide the latest news, updates, and often include videos and archives.
I 22. Informational websites like Wikipedia provide detailed information on various topics.
23. Educational websites are created for learning, offering tutorials, courses, and organized educational
O content.
24. Personal websites are created by individuals for expression, portfolio, or social networking.
N 25. Business websites facilitate business activities like e-commerce, banking, and reservations.
HTML Fundamentals (26-75)

S 26. HTML (HyperText Markup Language) is the standard markup language for creating web pages.
27. HTML 1.0 was the first, simple version released in 1991.
28. HTML 2.0 introduced more tags for complex pages in 1995.
29. HTML 3.2 added tags for tables, scripts, and applets in 1997.
30. HTML 4.0/4.01 brought major improvements with support for multimedia in 1997/1999.
31. HTML5 is the latest version with new elements for better multimedia, graphics, and interactivity,
released in 2014.
32. HTML files are saved with a .html extension, such as [Link].
33. The basic structure of an HTML5 document starts with <!DOCTYPE html> declaration.
34. The <html> tag is the root element of an HTML page.
35. The <head> section contains meta-information like the page title and links to CSS/JavaScript.
36. The <title> tag sets the title shown in the browser tab.
37. The <body> tag contains the visible page content like headings, paragraphs, and images.

P a g e 10 | 29
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following correctly distinguishes 7. Which HTML version first introduced
between the Internet and the World Wide Web? support for tables and scripts?
A) The Internet is for emails, while the Web is for A) HTML 1.0

17. Web Development & Web Programing


browsing B) HTML 2.0
B) The Internet is the global network of C) HTML 3.2
computers, while the Web is the collection of D) HTML5
interconnected documents Answer: C

M C) The Internet uses HTTP, while the Web uses


FTP
8. The <!DOCTYPE html> declaration at the
beginning of an HTML document:
D) They are identical terms and can be used A) Is optional in modern browsers
K interchangeably B) Declares the document as HTML5
Answer: B C) Links an external CSS file
2. A web server's primary function is to: D) Embeds JavaScript code
A) Write HTML and CSS code for websites Answer: B
P B) Store, process, and deliver web pages using
HTTP
9. Which HTML tag pair is correctly used to
define the title that appears in the browser tab?
R C) Design user interfaces for web applications
D) Execute JavaScript code in the user's browser
A) <header> ... </header>
B) <title> ... </title>

E
Answer: B C) <h1> ... </h1>
3. What is the significance of August 6, 1991, in D) <caption> ... </caption>
the context of web development? Answer: B
P A) The day JavaScript was created by Brendan 10. What is the key difference between paired
Eich tags and unpaired tags in HTML?
A B) The day the first web browser was released
C) The day Tim Berners-Lee introduced the World
A) Paired tags have semantic meaning, while
unpaired tags don't
R Wide Web to the public
D) The day HTML5 specification was finalized
B) Paired tags require closing tags, while unpaired
tags are self-closing
A Answer: C
4. Which type of website typically requires user
C) Paired tags are for content, while unpaired tags
are for styling
login and offers multiple integrated services like D) Paired tags are HTML5 only, while unpaired
T email and news? tags are older HTML
A) News Website Answer: B
I B) Web Portal 11. Which heading tag represents the most
C) Personal Website important heading on a page?
O D) Entertainment Website
Answer: B
A) <h1>
B) <h3>
N 5. In the URL
"[Link]
C) <h6>
D) <header>

S ", what does "443" represent?


A) The page number in the website
Answer: A
12. What is the purpose of the alt attribute in
B) The version of HTTP being used an <img> tag?
C) The default port number for HTTPS A) To set the image alignment
D) An error code for secure connections B) To provide alternative text for accessibility
Answer: C C) To define the image source URL
6. What is the primary purpose of web hosting? D) To set the image border width
A) To write code for websites Answer: B
B) To design visual layouts 13. Which HTML entity would you use to insert
C) To store website content on a server connected a non-breaking space?
to the Internet A) &space;
D) To test websites across different browsers B)
Answer: C C) &break;

P a g e 17 | 29
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 18

Data Base and Data Management (DBMS)


Data and Database Fundamentals
Data, Information, and Knowledge
Data consists of raw facts and figures, such as numbers, words, measurements, observations, images, or

18. Data Base and Data Management (DBMS)


sounds (e.g., daily temperature readings, list of student names and marks). Information is processed,
organized, or structured data presented in a meaningful context (e.g., a weather forecast, student
percentage and grade). Information is derived from data and is useful for decision-making. Knowledge is
the actionable insight gained from understanding patterns in information. Data becomes information
M through processing, and information becomes knowledge through analysis and interpretation.
Aspect Data Information
K Nature Raw, unprocessed facts
Processed, organized, meaningful
data
Role in System Input to a computer system Output of data processing
Useful, valuable, supports
Usefulness May not be meaningful on its own
P decisions
Easier to reproduce (e.g.,
Reproducibility Difficult to reproduce if lost
R Dependence An independent entity
recalculated)
Depends on data

E The Need for Databases: Evolution from File Systems


Before databases, File Management Systems (FMS) were used. Data was stored in independent files,
each a collection of records made up of fields. This approach led to significant problems:
P • Data Redundancy: The same data duplicated across multiple files.
• Data Inconsistency: Changes in one file may not update others, leading to conflicting information.
A •

Data-Program Dependence: Changes in data structure required changes to all related programs.
Data Isolation: Data scattered in various formats made retrieval difficult.
R • Integrity Problems: Ensuring data accuracy (e.g., account balance > 0) had to be programmed
manually.
A •

Atomicity Problems: Difficulty ensuring transactions (e.g., a funds transfer) completed as a whole.
Poor Data Security: No centralized security control; files were vulnerable.

T • Intensive Coding & Difficult Data Access: Separate programs were needed for each task, and
retrieving information required extensive programming.
What is a Database?
I A database is a shared, integrated, and logically related collection of data, along with a description of
that data (metadata). It is designed to meet the information needs of multiple users in an organization. A
O key principle is that data in a database is independent of the application programs that use it.
Database Management System (DBMS)
N A DBMS is a set of software programs that enables users to create, maintain, manipulate, and
access a database. Manipulation includes adding, deleting, and changing data. Popular examples
S include Microsoft Access, Oracle, MySQL, Microsoft SQL Server, and IBM DB2.
Advantages of DBMS over FMS:
1. Controlled Data Redundancy: Data is stored logically only once.
2. Data Consistency: Minimal redundancy ensures uniform data.
3. Data Sharing: A centralized resource accessible by authorized users.
4. Enforcement of Standards: Centralized control enforces naming, format, and structure standards.
5. Enhanced Security: Permissions and access controls are centralized.
6. Reduced Program Maintenance: DBMS tools simplify development.
P a g e 1 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
93. Transitive Dependency is a functional dependency between two or more non-key attributes (e.g.,
CUSTNO → SALESMAN and SALESMAN → REGION).
94. An Insertion Anomaly is the inability to add data without other, unrelated data.
95. A Deletion Anomaly is the unintended loss of data when deleting a record.
96. An Update Anomaly is inconsistency from updating some, but not all, copies of redundant data.

18. Data Base and Data Management (DBMS)


97. Database personnel include End-Users, Data Administrators (DA), and Database Administrators
(DBA).
98. A Data Administrator (DA) is responsible for the organization's overall data resources, including
planning and logical design.
M 99. A Database Administrator (DBA) is the technical expert responsible for physical design,
implementation, security, and maintenance.
K 100.
101.
SQL (Structured Query Language) is the standard language for relational databases.
Data Definition Language (DDL) commands (CREATE, ALTER, DROP) define database
structure.
102. Data Manipulation Language (DML) commands (SELECT, INSERT, UPDATE, DELETE) access

P
and manipulate data.
103. Data Control Language (DCL) commands (GRANT, REVOKE) control access.
104. Views are virtual tables created using SQL (CREATE VIEW) that provide a customized, secure
R subset of data.
105. Data Analytics examines raw data to draw conclusions, answer specific questions, and identify
E 106.
trends.
Data Science is a broader, interdisciplinary field using mathematics, statistics, ML, and
P 107.
programming to extract knowledge from data.
Qualitative (Categorical) Data includes Nominal (no inherent order) and Ordinal (meaningful order)
A 108.
data.
Quantitative (Numerical) Data includes Discrete (countable) and Continuous (measurable within a
range) data.
R 109. Continuous data can be Interval (differences meaningful, no true zero) or Ratio (differences
meaningful, has a true zero).
A 110. Primary Data is collected firsthand (surveys, experiments, sensors).
111. Secondary Data is collected by others (published sources, online databases).
T 112.
113.
Relational (SQL) databases (e.g., MySQL, MS Access) are used for structured data.
Non-Relational (NoSQL) databases (e.g., MongoDB) are used for semi/unstructured data.
I 114. Artificial Intelligence (AI) refers to machines mimicking human intelligence (problem-solving,
language understanding).
O 115. Machine Learning (ML) is a subset of AI where systems learn from data without explicit
programming.
116. Supervised Learning uses labeled datasets (input-output pairs) for tasks like classification and
N regression.
117. Unsupervised Learning finds patterns in unlabeled datasets for tasks like clustering and association.
S 118. Reinforcement Learning involves an agent learning by interacting with an environment, receiving
rewards/penalties.
119. Feature Engineering is the process of selecting and transforming relevant data attributes for ML
models.
120. Training Data is used to teach an ML model; Test Data is used to evaluate it.
121. Overfitting occurs when a model learns training data too well, including noise, and performs poorly
on new data.

P a g e 13 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the primary difference between D) NULL Allowed
data and information? Answer: C) No Duplicate Rows
A) Data is processed; information is raw 7. What is a set of one or more attributes
B) Data is meaningful on its own; information that can uniquely identify all other

18. Data Base and Data Management (DBMS)


requires context attributes in a relation called?
C) Data is raw facts; information is processed A) Candidate Key
data in context B) Super Key
D) Data is output; information is input C) Primary Key
M Answer: C) Data is raw facts; information D) Foreign Key
is processed data in context Answer: B) Super Key
K 2. Which of the following was a major
problem with File Management Systems
8. Which key must be unique and cannot
contain NULL values?
(FMS)? A) Foreign Key
A) Program-Data Independence B) Alternate Key
P B) Controlled Data Redundancy
C) Data Inconsistency
C) Secondary Key
D) Primary Key

R D) Enhanced Security
Answer: C) Data Inconsistency
Answer: D) Primary Key
9. What does a Foreign Key (FK) enforce
3. What is the key principle that data in a between tables?
E database is independent of the application A) Entity Integrity
programs called? B) Referential Integrity
P A) Data Redundancy
B) Program-Data Dependence
C) Column Atomicity
D) Data Redundancy
A C) Data Isolation
D) Program-Data Independence
Answer: B) Referential Integrity
10. In an ER diagram, what does a diamond
R Answer: D) Program-Data Independence
4. Which database model allows a child
represent?
A) Entity

A record to have more than one parent?


A) Hierarchical Model
B) Attribute
C) Relationship
B) Network Model D) Key
T C) Relational Model Answer: C) Relationship
D) Object-Oriented Model 11. What is the degree of a relationship
I Answer: B) Network Model
5. In the relational model, what is a two-
called when it exists within the same entity?
A) Binary
O dimensional structure of rows and columns
called?
B) Ternary
C) Unary/Recursive
N A) Attribute
B) Tuple
D) Quaternary
Answer: C) Unary/Recursive

S 12. In a relationship, what does cardinality


C) Relation/Table
D) Key define?
Answer: C) Relation/Table A) Minimum number of instances
6. Which property of a relation states that B) Maximum number of instances
each row must be unique? C) Type of attributes
A) Column Atomicity D) Number of entities
B) Order Insignificance Answer: B) Maximum number of instances
C) No Duplicate Rows
P a g e 16 | 20
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 19

Visual Basic for Applications (VBA) & .NET


Framework

19. Visual Basic for Applications & .NET Framework


Introduction to Visual Basic
What is Visual Basic?
Definition and Conceptual Overview
M Visual Basic (VB) is a high-level, third-generation programming language created by Microsoft. It was
designed to simplify Windows application development by combining a visual, drag-and-drop interface

K builder with an intuitive programming language based on the original BASIC syntax. The name itself is
descriptive: “Visual” refers to the visual method of designing user interfaces, and “Basic” stands
for Beginner’s All-purpose Symbolic Instruction Code.
Visual Basic follows the event-driven programming paradigm, meaning programs are structured
around user actions such as mouse clicks, key presses, or system events. It also supports Rapid Application
P Development (RAD), allowing developers to quickly prototype and build applications using pre-built,
reusable components.
R Detailed Characteristics
1. High-Level Language
E VB uses English-like syntax, abstracting away low-level hardware details. This makes it accessible to
beginners while remaining powerful enough for complex applications.
P 2. Event-Driven Programming Model
Programs are composed of event handlers—blocks of code that execute in response to specific user or
system events.
A 3. RAD Environment
Developers can drag controls from a toolbox onto forms, set properties in a visual designer, and write
R code only for the events they need to handle.
4. Hybrid Execution Model
A VB6 used a P-code interpreter, while [Link] compiles to Microsoft Intermediate Language
(MSIL), which is then Just-In-Time (JIT) compiled to native code.
T Historical Evolution and Context
Visual Basic has evolved significantly since its introduction:

I • VB 1.0 (1991)
Introduced the revolutionary drag-and-drop interface builder, eliminating the need for complex
Windows API calls to create user interfaces.
O • VB 3.0 (1993)
Added built-in database access via the Jet Engine, transforming VB into a serious tool for business
N application development.
• VB 6.0 (1998)
S Became the most popular version, with enhanced web capabilities and widespread adoption in
enterprise environments. It remains in use in many legacy systems.
• [Link] (2002)
A complete rewrite for the .NET Framework, marking a shift from the COM-based architecture to the
managed, object-oriented .NET platform.
VB6 vs [Link]: The Fundamental Shift
Definition of the Shift
VB6 was the final version based on the Component Object Model (COM), while [Link] is the first .NET-
based version, built from the ground up to leverage the .NET Framework’s capabilities.
Why the Shift Was Necessary
1. Full Object-Oriented Support
VB6 offered limited OOP features; [Link] provides full inheritance, polymorphism, and
encapsulation.
P a g e 1 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Select Case Statement
An efficient alternative to long If-ElseIf chains when testing a single variable against multiple discrete
values.
vb
Select Case dayNumber

19. Visual Basic for Applications & .NET Framework


Case 1 : dayName = "Monday"
Case 2 : dayName = "Tuesday"
Case 3, 4, 5 : dayName = "Weekday"
Case 6 To 7 : dayName = "Weekend"
M Case Is < 1, Is > 7 : dayName = "Invalid"
Case Else : dayName = "Unknown"
K End Select
Looping Structures
For Loop (Counter-Controlled)
vb
P For i As Integer = 1 To 10
[Link](i)
R Next

E ' With step


For i As Integer = 10 To 1 Step -1

P
[Link](i) ' Counts down
Next

A ' Nested For loops


For row = 1 To 3
R For col = 1 To 3
[Link]($"[{row},{col}] ")
A Next
[Link]()
T Next
For Each Loop (Collection Iteration)
I vb
Dim fruits() As String = {"Apple", "Banana", "Cherry"}

O For Each fruit As String In fruits


[Link](fruit)
Next
N Limitation: Cannot modify the collection during iteration.
While Loop (Pre-Test)
S vb
Dim count As Integer = 1
While count <= 5
[Link](count)
count += 1
End While
Do Loop (Flexible Structures)
vb
' Pre-test (0 or more executions)
Do While x < 10
x += 1
Loop

P a g e 7 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Visual Basic for Applications & .NET Framework
1. Visual Basic is a third-generation, high-level programming language that follows the event-driven
paradigm and supports Rapid Application Development (RAD).
2. The "Visual" in Visual Basic refers to the visual method of creating user interfaces through drag-and-

19. Visual Basic for Applications & .NET Framework


drop controls.
3. The "Basic" in Visual Basic stands for Beginner's All-purpose Symbolic Instruction Code, indicating
its roots in the BASIC language.
4. Event-driven programming means programs respond to user actions like clicks, key presses, or system

M 5.
events rather than following a linear execution path.
Rapid Application Development (RAD) in VB enables quick prototyping through reusable
components and visual design tools.
K 6. VB6 used P-code interpretation, while [Link] uses full compilation to Microsoft Intermediate
Language (MSIL).
7. VB 1.0 (1991) revolutionized Windows programming by eliminating complex Windows API calls for
UI creation through drag-and-drop interface building.
P 8. VB 3.0 (1993) became a serious business application development tool after adding database access
through the Jet Engine.
R 9. VB 6.0 (1998) remains in use in legacy systems and represents the peak of COM-based Visual Basic
development.

E
10. [Link] (2002) was a complete rewrite for the .NET Framework, shifting from COM to managed
.NET architecture.
11. The fundamental shift from VB6 to [Link] was necessary because VB6 lacked full object-oriented
P programming support.
12. .NET Framework offers cross-language compatibility, allowing [Link] to interoperate seamlessly
A 13.
with C#, F#, and other .NET languages.
.NET provides code access security, a significant improvement over VB6's limited security model.
R 14. Automatic garbage collection in .NET eliminates manual memory management and prevents memory
leaks common in VB6.
A 15. VB6 uses Variant data type by default, allowing implicit type conversions that can cause runtime
errors.
16. [Link] with Option Strict On requires explicit type conversions, preventing type-related bugs at
T compile time.
17. VB6 uses unstructured error handling with On Error GoTo, which creates spaghetti code and makes
I 18.
program flow difficult to follow.
[Link] uses structured exception handling with Try-Catch-Finally blocks, providing readable error
O 19.
handling with specific exception types.
The Finally block in [Link] executes cleanup code regardless of whether an exception occurs or
N 20.
not.
.NET Framework is a software development platform that provides a controlled programming

S 21.
environment for [Link] applications.
The four-layer .NET architecture consists of: VB Application, VB Language, Common Language
Runtime (CLR), and Base Class Library (BCL).
22. Common Language Runtime (CLR) is the execution engine that manages running .NET applications
through services like JIT compilation and garbage collection.
23. Just-In-Time (JIT) compilation converts MSIL to native machine code at runtime for optimal
performance.
24. Base Class Library (BCL) provides pre-built classes for common functionality like file operations
([Link]) and database access ([Link]).
25. The complete flow in .NET is: VB Code → MSIL → CLR loading → JIT compilation → Native code
execution.
26. Integrated Development Environment (IDE) provides comprehensive facilities including code editor,
debugger, and design tools in a single application.

P a g e 17 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What fundamentally visual design tools
distinguishes [Link] from VB6 in C) Through built-in artificial intelligence

19. Visual Basic for Applications & .NET Framework


terms of architecture? D) Through automatic documentation
A) [Link] uses P-code interpretation generation
while VB6 uses full compilation Answer: B (Reusable controls and visual
B) [Link] is COM-based while VB6 is design enable rapid prototyping)

M .NET-based
C) [Link] is .NET-based while VB6 is
6. What execution model did VB6 use that
differed from [Link]'s approach?
COM-based A) VB6 used native compilation
K D) [Link] is interpreted while VB6 is while [Link] uses interpretation
compiled B) VB6 used P-code interpretation
Answer: C (The architectural shift from while [Link] compiles to MSIL
COM to .NET is the fundamental C) VB6 used JIT compilation
P difference)
2. Why was the shift from VB6
while [Link] uses ahead-of-time
compilation
R to [Link] considered necessary despite
VB6's popularity?
D) Both used identical execution models
Answer: B (P-code vs MSIL/JIT

E
A) VB6 lacked graphical interface compilation distinguishes the execution
capabilities models)
B) VB6 was incompatible with Windows 7. Which version of VB is still commonly
P operating systems found in legacy enterprise systems?
C) VB6 lacked full object-oriented A) VB 1.0
A programming support
D) VB6 couldn't connect to databases
B) VB 3.0
C) VB 6.0
R Answer: C (Limited OOP was a key
driver for the architectural rewrite)
D) [Link] 2002
Answer: C (VB6 remains in many legacy
A 3. Which feature introduced in VB 3.0
transformed it into a serious business 8.
systems despite being obsolete)
What was the revolutionary aspect of
application development tool? VB 1.0 that changed Windows
T A) Web capabilities through ActiveX programming?
B) Database access via Jet Engine A) It introduced object-oriented
I C) Drag-and-drop interface creation
D) Full OOP support
programming to Windows
B) It eliminated complex Windows API
O Answer: B (Jet Engine database access
made VB viable for business applications)
calls for UI creation
C) It was the first interpreted language for
N 4. What does the "Visual" in Visual Basic
specifically refer to?
Windows
D) It introduced database programming to

S A) The language's visual syntax


highlighting
the masses
Answer: B (Drag-and-drop UI building
B) The ability to create 3D graphics replaced complex API programming)
C) The visual method of creating user 9. Which .NET feature directly addresses
interfaces through drag-and-drop memory management issues common in
D) The visual representation of program VB6?
flow A) JIT compilation
Answer: C (The visual designer for UI B) Automatic garbage collection
creation is the key "Visual" aspect) C) Type safety enforcement
5. How does RAD (Rapid Application D) Cross-language interoperability
Development) manifest in Visual Basic? Answer: B (Garbage collection eliminates
A) Through automatic code optimization manual memory management and leaks)
B) Through reusable components and

P a g e 23 | 39
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 20
Oracle Database & PL/SQL
Introduction to Oracle Database
What is Oracle Database?

20. Oracle Database &


Oracle Database is a multi-model database management system (DBMS) developed by Oracle
Corporation. It is a Relational Database Management System (RDBMS) that stores data in structured tables
consisting of rows and columns. Oracle is widely adopted in enterprise environments due to its robustness,
scalability, and comprehensive feature set.
M •
Key Characteristics:
Follows ACID properties (Atomicity, Consistency, Isolation, Durability)
K •

Uses SQL (Structured Query Language) for data manipulation and definition
Provides data integrity through constraints (primary key, foreign key, unique, check)
• Supports concurrent access with locking mechanisms
• Includes built-in backup, recovery, and security features
• Implements client-server architecture
P Why Oracle is Preferred in Enterprises:
1. Scalability – Handles terabytes of data and thousands of concurrent users.
R 2.
3.
Reliability – High availability with failover and redundancy mechanisms.
Security – Advanced user authentication, authorization, auditing, and encryption.
E 4.
5.
Performance – Query optimization, indexing, caching, and partitioning.
Enterprise Features – Data warehousing, replication, partitioning, and advanced analytics.
P Real-World Example – Banking System:
Consider a bank’s database with a customers table storing account details. When a customer withdraws

A money:
1. System checks balance (SELECT query)
2. Deducts amount (UPDATE query)
R 3. Logs transaction (INSERT into transactions table)
4. All three steps succeed or fail together as a transaction – ensuring data consistency.
A Technical Illustration:
sql
T CREATE TABLE customers (
customer_id NUMBER PRIMARY KEY,
I name VARCHAR2(50),
account_number VARCHAR2(20) UNIQUE,
O );
balance NUMBER(10,2) CHECK(balance >= 0)

N INSERT INTO customers VALUES (101, 'Ali Khan', 'ACC001', 50000);

S Oracle Architecture
Oracle’s architecture is divided into two main components: the instance (memory and processes) and
the database (physical files). This separation allows efficient management of memory, processes, and storage.
Instance Components
An Oracle instance consists of memory structures (SGA) and background processes.
A. System Global Area (SGA) – Shared memory region:
• Database Buffer Cache: Caches data blocks read from datafiles.
• Redo Log Buffer: Stores changes before they are written to redo log files.
• Shared Pool: Caches SQL statements (library cache) and data dictionary information (row cache).
• Large Pool & Java Pool: Optional memory areas for specific operations.
B. Background Processes:
• PMON (Process Monitor): Cleans up failed user processes and releases resources.
• SMON (System Monitor): Performs crash recovery, cleans temporary segments.
P a g e 1 | 36
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
BEGIN
SELECT * INTO v_employee FROM employees WHERE employee_id = 9999;

v_salary := v_employee.salary / 0;

20. Oracle Database &


IF v_employee.department_id = 99 THEN
RAISE v_invalid_dept;
END IF;
EXCEPTION
M WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Employee not found');
K WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE('Cannot divide by zero');
v_salary := 0;
WHEN v_invalid_dept THEN
P DBMS_OUTPUT.PUT_LINE('Invalid department ID');
WHEN OTHERS THEN

R DBMS_OUTPUT.PUT_LINE('Error: ' || SQLCODE || ' - ' || SQLERRM);


RAISE; -- Re-raise to calling program
END;
E RAISE_APPLICATION_ERROR Procedure:
sql
P BEGIN
IF some_condition THEN
A RAISE_APPLICATION_ERROR(-20001, 'Custom error message');
END IF;
R END;
Exception Propagation:
A sql
DECLARE

T BEGIN
v_value NUMBER;

BEGIN -- Inner block


I v_value := 100 / 0; -- Raises ZERO_DIVIDE
EXCEPTION
O WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Inner: NO_DATA_FOUND');
N END;
-- No handler for ZERO_DIVIDE

S DBMS_OUTPUT.PUT_LINE('This line never executes');


EXCEPTION
WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE('Outer: ZERO_DIVIDE caught');
END;
ADVANCED FEATURES & ADMINISTRATION
1. Triggers
A trigger is a stored PL/SQL block that automatically executes when a specified database event
occurs.
Trigger Fundamentals
Trigger Characteristics:
P a g e 15 | 36
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: System analysis & Design
Volume I: Oracle Database Fundamentals
1. Oracle Database is a multi-model DBMS and a relational database management system (RDBMS).
2. ACID properties in Oracle ensure transaction reliability: Atomicity, Consistency, Isolation, Durability.

20. Oracle Database &


3. Oracle uses SQL for data manipulation and supports data integrity through constraints.
4. Oracle’s client-server architecture enables concurrent access with locking mechanisms.
5. Scalability in Oracle allows handling terabytes of data and thousands of concurrent users.
6. High availability in Oracle is achieved through failover and redundancy mechanisms.

M 7.
8.
Oracle provides advanced security via authentication, authorization, auditing, and encryption.
Performance features in Oracle include query optimization, indexing, caching, and partitioning.
9. Oracle supports enterprise features like data warehousing, replication, and advanced analytics.
K 10. A transaction in Oracle ensures all steps succeed or fail together, maintaining data consistency.
11. Oracle architecture comprises two main components: the instance (memory and processes) and the
database (physical files).
12. The System Global Area (SGA) is a shared memory region containing the buffer cache, redo log
P 13.
buffer, and shared pool.
The Database Buffer Cache stores data blocks read from datafiles.
R 14.
15.
The Redo Log Buffer holds changes before they are written to redo log files.
The Shared Pool caches SQL statements and data dictionary information.

E
16. Background processes in Oracle include PMON, SMON, DBWn, LGWR, and CKPT.
17. PMON (Process Monitor) cleans up failed user processes and releases resources.
18. SMON (System Monitor) performs crash recovery and cleans temporary segments.
P 19. DBWn (Database Writer) writes modified buffers from the buffer cache to datafiles.
20. LGWR (Log Writer) writes redo log buffer entries to redo log files.
A 21.
22.
CKPT (Checkpoint Process) updates control files and datafile headers with checkpoint information.
Physical files in Oracle include datafiles, control files, redo log files, and parameter files.
R 23. The flow of a SELECT query involves the shared pool check, buffer cache check, and possible disk
I/O.
A 24.
25.
Logical storage hierarchy in Oracle: Database → Tablespace → Segment → Extent → Block.
Physical storage hierarchy: Database → Datafile → OS Block → Disk Sector.
26. A tablespace is a logical storage unit containing segments like tables and indexes.
T 27. An extent is a contiguous set of database blocks allocated to a segment.
28. The smallest unit of I/O in Oracle is a database block (default 8KB).
I 29. CHAR(n) is fixed-length and padded with spaces; VARCHAR2(n) is variable-length with no padding.
30. NCHAR and NVARCHAR2 support Unicode for multilingual data.
O 31.
32.
NUMBER(p,s) stores numeric data with precision p and scale s.
DATE stores date and time to the second; TIMESTAMP includes fractional seconds.
N 33.
34.
LOB types include CLOB for text, BLOB for binary data, and BFILE for external files.
DDL commands (CREATE, ALTER, DROP, TRUNCATE, RENAME) auto-commit transactions.

S 35.
36.
DML commands (SELECT, INSERT, UPDATE, DELETE, MERGE) require explicit commit.
DCL commands (GRANT, REVOKE) manage privileges and roles.
37. TCL commands (COMMIT, ROLLBACK, SAVEPOINT) manage transaction boundaries.
38. Analytic functions perform calculations across a set of rows related to the current row.
39. Hierarchical queries retrieve tree-structured data using CONNECT BY and START WITH.
40. Flashback queries retrieve data as it existed at a previous point in time.
41. The MERGE statement performs conditional insert or update (UPSERT).
42. PIVOT transforms row data into columnar format; UNPIVOT does the reverse.
43. Oracle’s advanced SQL features support complex business scenarios like monthly comparisons and
ETL processes.
Volume II: PL/SQL Programming
44. PL/SQL is Oracle’s procedural extension to SQL, enabling complex logic within the database.
45. PL/SQL reduces network traffic by executing multiple SQL statements in a single block.

P a g e 20 | 36
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which of the following best describes c) Performing checkpoints
Oracle Database? d) Writing datafiles
a) A file-based storage system Answer: b) Cleaning up failed user

20. Oracle Database &


b) A multi-model DBMS and RDBMS processes
c) A NoSQL database only 8. LGWR writes from _____ to _____.
d) A programming language a) Buffer cache, datafiles
Answer: b) A multi-model DBMS and b) Redo log buffer, redo log files

M RDBMS
2. ACID properties in Oracle ensure:
c) Shared pool, buffer cache
d) Datafiles, control files
a) High availability and redundancy Answer: b) Redo log buffer, redo log
K b) Atomicity, Consistency, Isolation, files
Durability 9. The physical file that contains database
c) Fast backup and recovery structure metadata is:
d) Data encryption and compression a) Datafile
P Answer: b) Atomicity, Consistency,
Isolation, Durability
b) Control file
c) Redo log file
R 3. Oracle’s client-server architecture
enables:
d) Parameter file
Answer: b) Control file

E
a) Single-user access only 10. During a SELECT query, if parsed SQL
b) Concurrent access with locking is found in the shared pool, it results in:
mechanisms a) Hard parsing
P c) Only read operations b) Soft parsing
d) No network connectivity c) No parsing
A Answer: b) Concurrent access with
locking mechanisms
d) Recompilation
Answer: b) Soft parsing
R 4. Which feature allows Oracle to handle
terabytes of data?
11. The logical storage unit containing
segments is called:
A a) Scalability
b) Encryption
a) Database
b) Tablespace
c) Auditing c) Extent
T d) Graphical interface d) Block
Answer: a) Scalability Answer: b) Tablespace
I 5. High availability in Oracle is achieved 12. The smallest unit of I/O in Oracle is:
through: a) Extent
O a) Failover and redundancy mechanisms
b) Only backup files
b) Segment
c) Block
N c) Single server setup
d) Manual intervention
d) Tablespace
Answer: c) Block

S Answer: a) Failover and redundancy


mechanisms
13. Which data type is fixed-length and
space-padded?
6. The SGA component that caches data a) VARCHAR2
blocks is: b) CHAR
a) Shared Pool c) NCHAR
b) Redo Log Buffer d) CLOB
c) Database Buffer Cache Answer: b) CHAR
d) Large Pool 14. NUMBER(10,2) can store up to:
Answer: c) Database Buffer Cache a) 10 digits with 2 decimal places
7. PMON (Process Monitor) is responsible b) 12 digits total
for: c) 8 digits with 2 decimals
a) Writing redo logs d) Only integers
b) Cleaning up failed user processes

P a g e 23 | 36
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 21

System Development, Troubleshooting and


Maintenance

21. System Development Troubleshooting Maintenance


Introduction
Systems are created to solve problems. Modern systems are often large and complex, requiring
collaboration between teams of architects, analysts, programmers, testers, and users to produce the
software that drives organizations. To manage this complexity and ensure structured, high-quality
outcomes, a systematic process is essential. This process is known as the System Development Life
M Cycle (SDLC). This unit focuses on the SDLC, explaining its importance, objectives, key participants
(stakeholders), and the logical phases followed to develop a software product from conception to
K maintenance.
What is a System?
The term "system" originates from the Greek word "systema," meaning to "place together." A system
can be defined as a set of interrelated components with a clearly defined boundary that work together to
P achieve a common set of objectives. When these components are methods, procedures, and routines
applied in a proper sequence to build software, it is called a software system.
R System Development Life Cycle (SDLC) and Its Importance
The System Development Life Cycle (SDLC) is a conceptual model and a structured, stepwise
E process used in project management to guide the development of an information system. It
encompasses all stages from an initial feasibility study through to the maintenance of the completed
P application. It is also known as information system development or application development.
Importance of SDLC:

A
1. Phased Development: It breaks down the complex software development lifecycle into manageable
phases, making it easier for team members to evaluate each part.
2. Concurrent Work: It enables programmers and other specialists to work concurrently on different
R phases, improving efficiency.
3. Time Estimation: It provides a framework for estimating when the software will be available for use.
A 4. Quality Assurance: It ensures the delivery of quality software that meets or exceeds customer
expectations by providing a structured framework.
T 5. Project Management: It helps project managers establish a clear management structure to be
followed strictly during development.
I 6.
7.
Role Definition: It clearly defines and assigns the roles and responsibilities of all involved parties.
Requirement Clarity: It ensures that the requirements for the software system are well-defined and
subsequently satisfied.
O Objectives of SDLC
N •
The primary objectives of the SDLC are to:
Deliver high-quality software that meets customer expectations.
• Deliver cost-effective and easily maintainable software.
S • Maximize productivity in terms of software systems delivered.
• Establish an appropriate level of management authority to direct, coordinate, control, review, and
approve the project.
• Ensure project management accountability.
• Facilitate proper documentation of all development requirements.
• Ensure projects are developed within the current and planned IT infrastructure.
• Identify potential project risks in advance to allow for proper mitigation planning.

P a g e 1 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: System Development Troubleshooting and
Maintenance

21. System Development Troubleshooting Maintenance


1. System troubleshooting is a systematic process to identify problems and find quick solutions to
prevent costly downtime and system damage.
2. The primary goal of troubleshooting is to maintain system reliability, security, and efficiency
without always relying on professional help.
3. The first step in the systematic troubleshooting process is to identify and clearly define what is not
working as expected.
M 4. After identifying the problem, the troubleshooter must establish a theory of probable cause based
on the observed symptoms.
K 5. Testing the theory to determine the cause involves performing specific checks to confirm or rule
out the suspected issue.
6. Once the cause is confirmed, the next step is to establish a detailed plan of action to resolve the
problem.
7. The implementation phase involves carrying out the planned actions to fix the identified issue.
P 8. After implementing the solution, it is critical to verify full system functionality to ensure the
problem is resolved.
R 9. Documenting findings, actions, and outcomes creates a valuable knowledge base for future
reference.
E 10. Troubleshooting is crucial for preventing downtime, which can lead to lost productivity and
revenue for businesses.
P 11. Ensuring data integrity is a key reason for troubleshooting, as it helps identify and fix problems
that could corrupt information.

A 12. Effective troubleshooting can reveal security vulnerabilities and breaches, allowing for swift
protective action.
13. Troubleshooting enhances system performance by identifying causes of slowdowns, such as
R insufficient RAM or software conflicts.
14. Regular troubleshooting and fixing small issues early can extend equipment life by preventing
A 15.
major failures.
Mastering troubleshooting saves costs by reducing the need for expensive emergency repairs and
T 16.
prolonged downtime.
A reliable, well-performing system resulting from good troubleshooting enhances the overall user
I 17.
experience.
For an application freezing, a common solution is to use Task Manager (Ctrl+Alt+Delete) to end

O 18.
the unresponsive task.
If an application freezing persists, reinstalling the application or checking for updates is
recommended.
N 19. For unresponsive peripherals, the first steps are to check physical connections and unplug/replug
the device.
S 20.
21.
Updating device drivers is a standard solution for resolving issues with unresponsive peripherals.
Restarting a computer clears memory and stops conflicting processes, fixing a significant
percentage of software issues.
22. As a last resort for an unresponsive system, pressing and holding the power button forces a
shutdown but should be used cautiously to avoid data loss.
23. Loose or disconnected cables are a common hardware culprit, and securing all connections is a
primary solution.

P a g e 11 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What is the primary goal of system 6. An application becomes unresponsive.

21. System Development Troubleshooting Maintenance


troubleshooting? What is the most common immediate
a) To increase software licensing costs software-based solution?
b) To maintain system reliability, security, a) Reformat the hard drive
and efficiency b) Use Task Manager to end the task
c) To replace all hardware components c) Restart the web server
periodically d) Update the BIOS

M d) To reduce the need for user training


Answer: b) To maintain system reliability,
Answer: b) Use Task Manager to end the
task
security, and efficiency 7. For an unresponsive external mouse,
K 2. Which of the following is the FIRST step which sequence of actions is most
in the systematic troubleshooting process? appropriate initially?
a) Test the theory a) Update the OS, then replace the mouse
b) Establish a plan of action b) Check physical connections, then unplug
P c) Identify the problem
d) Document findings
and replug
c) Reinstall all device drivers, then restart
R Answer: c) Identify the problem
3. A laptop does not turn on. According to
d) Scan for viruses, then check the power
supply

E troubleshooting steps, what should you do


immediately after identifying this
Answer: b) Check physical connections,
then unplug and replug
problem? 8. What is the primary technical reason
P a) Replace the motherboard restarting a computer often resolves
b) Establish a theory of probable cause (e.g., software issues?
A dead battery)
c) Immediately document the failure
a) It upgrades the hardware firmware
b) It clears memory and stops conflicting
R d) Reinstall the operating system
Answer: b) Establish a theory of probable
processes
c) It redefines the system requirements
A cause (e.g., dead battery)
4. Why is documenting the troubleshooting
d) It performs a full disk defragmentation
Answer: b) It clears memory and stops

T process considered important?


a) It increases the complexity of the solution
conflicting processes
9. What is the most common cause of
b) It creates a bill for the client hardware connectivity issues?
I c) It creates a valuable knowledge base for a) Outdated antivirus software
future reference b) Lack of cloud storage
O d) It is only required for auditing purposes
Answer: c) It creates a valuable knowledge
c) Loose or disconnected cables
d) Insufficient pseudo code
N base for future reference
5. Which troubleshooting benefit directly
Answer: c) Loose or disconnected cables
10. System slowdowns and unexpected
S relates to minimizing financial loss for a
business?
shutdowns can be symptoms of what
hardware-related problem?
a) Extending equipment life a) Incorrect flowchart design
b) Preventing downtime b) Overheating
c) Enhancing user experience c) Lack of stakeholder feedback
d) Improving security d) Unvalidated requirements
Answer: b) Preventing downtime Answer: b) Overheating

P a g e 17 | 22
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 22
System Analysis and Design
Foundations of System Analysis & Design

22. System Analysis & Design


Introduction to Systems
What is a System?
Basic Idea: A system is a set of interconnected components that work together to achieve a common goal.
Concept: In computing, a system refers to an organized collection of hardware, software, data, people,
M procedures, and networks that process information and support organizational functions.

K Explanation:
• A system has boundaries separating it from its environment.
• It accepts inputs from outside, processes them through defined procedures, and
produces outputs.
P • It operates within an environment and interacts with it.
Example: A university admission system.
R • Inputs: Student applications, marks, fees.
• Processing: Eligibility checks, merit calculation, seat allocation.
E • Outputs: Admission lists, fee receipts, roll numbers.
• Environment: Educational policy, competition, technological infrastructure.
P Summary: A system is a goal-oriented collection of interrelated components working together.
Characteristics of a System
A 1. Organization: Structured arrangement of components.

R 2. Interaction: Components depend on and communicate with each other.


3. Interdependence: Parts cannot function in isolation.

A 4. Integration: Components unified to achieve objective.


5. Central Objective: Primary goal drives system existence.
T Example: A car as a system.
• Engine, wheels, brakes are organized.

I • Brakes interact with wheels.


• Engine depends on fuel system.
O • All integrated for transportation.
• Central objective: Mobility.
N Types of Systems
Type Description Example
S Physical Tangible, material components Computer hardware
Abstract Conceptual, non-physical Mathematical model
Open Interacts with environment Business organization
Closed Isolated, minimal interaction Thermostat (theoretical)
Natural Occur in nature Solar system
Manufactured Human-made Railway reservation system
Adaptive Changes with environment AI-based recommendation system
Non-adaptive Static, fixed behavior Basic calculator

P a g e 1 | 38
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: System Analysis and Design
1. System: A set of interrelated components working toward a common objective.
2. Information System: A formal system to collect, process, store, and distribute information.
3. SDLC: Framework of phases to develop systems systematically.

22. System Analysis & Design


4. Waterfall Model: Linear, sequential, non-iterative SDLC model.
5. Prototyping: Building a working model to clarify requirements.
6. Feasibility Study: Determines if project is technically, economically, operationally viable.

M 7.
8.
Technical Feasibility: Can the system be built with available technology?
Economic Feasibility: Cost-benefit analysis; ROI, payback period.
K 9.
10.
Operational Feasibility: Will the system be used effectively?
Functional Requirements: What the system must do.
11. Non-functional Requirements: How well the system performs (speed, security).
12. JAD: Joint Application Development – intensive workshop for requirements.
P 13.
14.
DFD: Data Flow Diagram – shows movement of data through processes.
Context Diagram: Highest-level DFD with single process.
R 15. Entity: A person, place, thing, or event about which data is stored.
16. Cardinality: Number of instances one entity can associate with another.
E 17. Normalization: Process of organizing data to minimize redundancy.
18. 1NF: Eliminate repeating groups; atomic values.
P 19. 2NF: In 1NF + no partial dependency (all non-key attributes depend on full primary key).
20. 3NF: In 2NF + no transitive dependency.
A 21. Cohesion: Measure of how closely operations in a module are related.
Coupling: Degree of interdependence between modules (low coupling desired).
R
22.
23. Black-box Testing: Tests functionality without knowing internal logic.

A 24.
25.
White-box Testing: Tests internal structures or workings.
Alpha Testing: By development team within organization.

T 26.
27.
Beta Testing: By actual users in real environment.
Regression Testing: Re-testing after modifications to ensure no new bugs.
I 28.
29.
System Maintenance: Modifying system after deployment.
Corrective Maintenance: Fixing defects.
O 30.
31.
Adaptive Maintenance: Adapting to new environment (OS, hardware).
Perfective Maintenance: Improving performance, adding minor features.
N 32.
33.
Preventive Maintenance: Preventing future problems.
Agile: Iterative, incremental, flexible development methodology.
S 34. Scrum: Agile framework with sprints, product owner, scrum master.
35. UML: Unified Modeling Language – standard for OO modeling.
36. Use Case Diagram: Shows actors and use cases (functionality).
37. Class Diagram: Static structure – classes, attributes, methods, relationships.
38. Sequence Diagram: Shows object interactions over time.
39. CASE Tools: Computer-Aided Software Engineering – automate SDLC activities.
40. Data Dictionary: Repository of data about data (metadata).
41. Gantt Chart: Bar chart for project scheduling.
P a g e 21 | 38
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. Which model is also known as linear- d) Preventive maintenance
sequential model? Answer: b
a) Prototyping 7. Which is NOT a UML diagram?

22. System Analysis & Design


b) Waterfall a) Class diagram
c) Spiral b) Flowchart
d) Agile c) Sequence diagram

M Answer: b
2. In DFD, a process is represented by:
d) Use case diagram
Answer: b
K a) Rectangle
b) Circle
8. Process of removing partial
dependency is part of:
c) Rounded rectangle a) 1NF
d) Diamond b) 2NF
P Answer: c c) 3NF
3. Which feasibility deals with "Can the d) BCNF
R system be built with available Answer: b
technology?" 9. In PERT, the most likely time is
E a) Economic weight multiplied by:
b) Technical a) 1
P c) Operational b) 4
d) Legal c) 6
A Answer: b d) 2
Answer: b (Formula: Expected time =
R
4. A many-to-many relationship in ERD
is represented as: (O+4M+P)/6)

A a) 1:1
b) 1:M
10. Which is a characteristic of good
system design?

T c) M:1
d) M:N
a) High coupling
b) Low cohesion
I Answer: d
5. Which testing is conducted by
c) High cohesion
d) Complex interfaces
O developers?
a) Alpha 11.
Answer: c
Which architectural style has all
N b) Beta
c) Acceptance
components tightly integrated?
a) Microservices
S d) Regression b) Client-Server
Answer: a c) Monolithic
6. Modifying system to work in a new d) SOA
environment is: Answer: c
a) Corrective maintenance 12. In structured design, the ideal
b) Adaptive maintenance coupling is:
c) Perfective maintenance a) Content coupling
b) Common coupling
P a g e 31 | 38
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 23

Emerging and Contemporary Technologies


Introduction to Emerging Technologies
Definition and Characteristics

23. Emerging and Contemporary Technologies


An Emerging Technology is a new technology or a significant advancement in an existing one, capable
of bringing about profound technical, institutional, and social changes. These technologies are poised to
replace current systems in the near future and will be integrated into every field, from education and IT
to medicine, transportation, and communication. They are distinguished by key characteristics:
M •• Innovation: Introduces novel ideas and methods.
Fast Growth: Develops and scales rapidly.
K •• Consistency: Provides reliable and repeatable performance.
Prominent Impact: Creates significant changes in how tasks are performed and problems are solved.
• Interdisciplinary Nature: Combines knowledge and methods from multiple fields like computer
science, engineering, and biology.
Convergence: Merges different technologies to create new, synergistic capabilities.
P

Detailed Exploration of Emerging Technologies
Artificial Intelligence (AI) and Machine Learning (ML)
R Artificial Intelligence (AI) is a broad field of computer science focused on building intelligent machines
and software capable of performing tasks that typically require human-like intelligence, such as
E reasoning, learning, problem-solving, and decision-making. The term was coined by John McCarthy in
1956. Key subfields include:
P • Machine Learning (ML): A subset of AI that gives computers the ability to learn from data and
experience without being explicitly programmed. ML algorithms build models by identifying patterns in
A o
large datasets.
Supervised Learning: The algorithm learns from a labeled dataset where the correct output is known,
R o
used for making predictions on new data (e.g., predicting prices).
Unsupervised Learning: The algorithm finds hidden patterns or intrinsic structures in unlabeled data,
often through clustering (e.g., grouping customers).
A • Deep Learning (DL): A specialized subset of ML that uses Neural Networks with many hidden layers
("deep" networks). Inspired by the human brain, a neural network consists of layers of interconnected
T o
nodes (neurons):
Input Layer: Receives raw data.
I o
o
Hidden Layers: Process data through weighted connections and activation functions.
Output Layer: Produces the final prediction or classification.
O Key concepts include Weights (connection importance), Biases (threshold adjusters), Activation
Functions, and Loss Functions. Training involves Feedforward

N Propagation and Backpropagation to minimize error. DL excels at autonomously extracting complex


patterns from vast amounts of unstructured data like images and text.
The hierarchical relationship is: AI ⊃ ML ⊃ Neural Networks ⊃ Deep Learning.
S Key Areas and Applications of AI
• Natural Language Processing (NLP): Enables computers to understand, interpret, and generate
human language. Applications include language translation (Google Translate), spam filtering,
sentiment analysis, chatbots, and voice assistants.
• Speech & Voice Recognition:
o Speech Recognition: Converts spoken words into text or commands (e.g., dictation software, Siri,
Alexa).
P a g e 1 | 17
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Emerging and Contemporary Technologies
1. An Emerging Technology is a new technology or a significant advancement in an existing one,
capable of bringing profound technical, institutional, and social changes.
2. Emerging technologies are poised to replace current systems in the near future and will be integrated

23. Emerging and Contemporary Technologies


into every field.
3. Key characteristics of emerging technologies include Innovation, Fast Growth, Consistency,
Prominent Impact, Interdisciplinary Nature, and Convergence.
4. The Interdisciplinary Nature of emerging technologies combines knowledge from fields like
M 5. computer science, engineering, and biology.
Convergence refers to the merging of different technologies to create new, synergistic capabilities.
K 6. Artificial Intelligence (AI) is a broad field of computer science focused on building intelligent
machines capable of human-like tasks such as reasoning, learning, and decision-making.
7. The term "Artificial Intelligence" was coined by John McCarthy in 1956.
8. Machine Learning (ML) is a subset of AI that gives computers the ability to learn from data and
experience without being explicitly programmed.
P 9. Supervised Learning involves algorithms learning from labeled datasets where the correct output is
known, used for making predictions.
R 10. Unsupervised Learning involves algorithms finding hidden patterns in unlabeled data, often through
clustering.
E 11. Deep Learning (DL) is a specialized subset of ML that uses Neural Networks with many hidden
layers.
P 12.
13.
A Neural Network is inspired by the human brain and consists of interconnected nodes (neurons).
The layers of a Neural Network are Input Layer, Hidden Layers, and Output Layer.

A 14.
15.
Weights in a neural network represent the importance of connections between neurons.
Biases are threshold adjusters in neural networks that help the model fit the data better.
16. Activation Functions in neural networks determine whether a neuron should be activated.
R 17. Loss Functions measure the difference between the predicted output and the actual target.
18. Training a neural network involves Feedforward Propagation and Backpropagation to minimize error.
A 19. Deep Learning excels at autonomously extracting complex patterns from vast amounts of
unstructured data like images and text.
T 20.
21.
The hierarchical relationship is: AI ⊃ ML ⊃ Neural Networks ⊃ Deep Learning.
Natural Language Processing (NLP) enables computers to understand, interpret, and generate human
I 22.
language.
NLP applications include language translation, spam filtering, sentiment analysis, chatbots, and voice

O 23.
assistants.
Speech Recognition converts spoken words into text or commands (e.g., dictation software, Siri).
24. Voice Recognition is a biometric technology that identifies a person based on unique vocal
N characteristics for security.
25. Computer Vision enables computers to derive meaningful information from digital images and
S 26.
videos.
Applications of Computer Vision include facial recognition, security surveillance, self-driving cars,
and medical image analysis.
27. Expert Systems are interactive AI programs that mimic human expert reasoning to solve complex
problems in a specific domain.
28. Expert Systems use a knowledge base and are applied in medical diagnosis, loan analysis, and
cybersecurity.

P a g e 7 | 17
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
C) Interdisciplinary nature 7. What is the key difference between
D) Prominent impact speech recognition and voice recognition?
Answer: B) Slow and steady growth A) Speech recognition identifies a person;
2. Who coined the term "Artificial voice recognition converts speech to text.
Intelligence"? B) Speech recognition converts speech to text;

23. Emerging and Contemporary Technologies


A) Alan Turing voice recognition identifies a person.
B) John McCarthy C) Both are the same.
C) Marvin Minsky D) Speech recognition is for commands; voice
D) Claude Shannon recognition is for transcription.
M Answer: B) John McCarthy
3. Which subset of AI gives computers the
Answer: B) Speech recognition converts
speech to text; voice recognition identifies a
K ability to learn from data without explicit
programming?
person.
8. Which technology creates a fully
A) Natural Language Processing immersive, artificial three-dimensional
B) Machine Learning environment?

P
C) Computer Vision A) Augmented Reality
D) Expert Systems B) Virtual Reality
Answer: B) Machine Learning C) Holographic Imaging
R 4. In machine learning, which type involves D) 3D Printing
algorithms learning from labeled datasets? Answer: B) Virtual Reality
E A) Unsupervised Learning
B) Reinforcement Learning
9. What does AR stand for, and what does it
do?
P C) Supervised Learning
D) Deep Learning
A) Augmented Reality; overlays digital
content onto the real world
A Answer: C) Supervised Learning
5. What is the hierarchical relationship
B) Artificial Reality; creates a completely
virtual world
between AI, ML, Neural Networks, and
R
C) Advanced Rendering; enhances image
Deep Learning? quality
A) AI ⊃ Neural Networks ⊃ ML ⊃ Deep D) Audio Recognition; identifies sounds
A Learning Answer: A) Augmented Reality; overlays
B) AI ⊃ ML ⊃ Neural Networks ⊃ Deep digital content onto the real world
T Learning
C) ML ⊃ AI ⊃ Deep Learning ⊃ Neural
10. Which technology creates a true three-
dimensional, free-standing image viewable
I Networks
D) Deep Learning ⊃ Neural Networks ⊃ ML
without special glasses?
A) 3D Imaging
O ⊃ AI
Answer: B) AI ⊃ ML ⊃ Neural Networks ⊃
B) Holographic Imaging
C) Virtual Reality
D) Augmented Reality
N Deep Learning
6. Which AI subfield enables computers to Answer: B) Holographic Imaging
understand, interpret, and generate human 11. What is another name for 3D printing?
S language? A) Subtractive Manufacturing
B) Additive Manufacturing
A) Computer Vision
B) Robotics C) Injection Molding
C) Natural Language Processing D) CNC Machining
D) Speech Recognition Answer: B) Additive Manufacturing
Answer: C) Natural Language Processing 12. Blockchain is best described as:
A) A type of computer virus

P a g e 12 | 17
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 24

Digital Citizenship, Literacy and Ethics


Introduction: Navigating the Modern Digital World
The digital landscape is the cornerstone of modern society, transforming how we communicate, learn,

24. Digital Citizenship, Literacy and Ethics


work, and access entertainment. This evolution from traditional methods to a connected, technology-
driven world brings immense power and convenience, but also introduces significant responsibilities,
risks, and ethical dilemmas. This Master Chapter provides a complete, unified, and self-contained guide
to becoming a competent, safe, responsible, and ethical participant in the digital world. It integrates
M foundational skills, security practices, ethical frameworks, societal impacts, and entrepreneurial
thinking into a seamless professional textbook.
K The Digital Foundation – Hardware, Software, and Systems
Understanding Software
A computer consists of hardware—the physical components—and software, the set of instructions,
P data, and programs that operate the computer to perform specific tasks.

R Types of Software
1. System Software: The essential set of programs that acts as the primary interface between hardware
and the user. Its purpose is to simplify hardware use, control operations, and optimize performance.
E o Examples: Operating Systems (OS), Device Drivers, Utility Programs, Language Translators.
2. Application Software: Programs written to carry out specific tasks for the user.
P o Examples: Word Processors (Microsoft Word), Spreadsheets (Excel), Presentation Software
(PowerPoint), Web Browsers (Chrome), Email Clients (Gmail), Image Editors (Paint).
A System Software Deep Dive
R The Operating System (OS)
The OS is the most critical system software that controls and manages all computer operations. A
A computer cannot function without it.

T •
Main Functions:
Booting: Loading itself into main memory upon startup.

I •

Security Management: Managing user accounts and access.
Application Management: Enabling installation and execution of application programs.
• Memory Management: Organizing memory and processing time between users and programs.
O • File Management: Enabling users to save, load, delete, rename, print, and copy files.
• Device Management: Controlling peripherals (disk drives, printers).
N •

User Interface: Providing a bridge between the user and the computer's hardware/software.
Common OS Examples: Microsoft Windows (10, 11), macOS, Linux, Android, iOS.
S Other Essential System Software
• Device Drivers: Specialized programs that enable hardware components (printers, sound cards) to
communicate with the OS.
• Utility Programs: Applications that perform management and maintenance tasks (e.g., Antivirus
software, disk cleanup, backup utilities, file management tools).
• Language Translators: Software that converts human-readable programming code (source code)
into machine-understandable code. Includes Assemblers, Compilers, and Interpreters.
P a g e 1 | 23
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Common Cybercrime Techniques & Prevention
Technique Description Preventive Measures
Inspect sender's address. Don't
Phishing / Email Fake emails from trusted

24. Digital Citizenship, Literacy and Ethics


click suspicious links. Use Two-
Spoofing sources to steal credentials.
Factor Authentication (2FA).
Use spam filters. Don't
M Spamming
Unsolicited bulk emails, often
reply/forward/click. Preview
with malware/scams.
K messages.
Email Account Unauthorized access to an Use strong, unique passwords.
Hacking email account. Enable 2FA. Update software.
P Manipulating people into Be skeptical of unsolicited

R Social Engineering divulging confidential info


(e.g., fake bank calls).
requests. Verify the source
independently.
E Cyber Using digital platforms to
Report and block bullies.

P Bullying/Trolling harass, intimidate, or demean.


Maintain privacy settings. Don't
engage; seek help.
A Use secure (HTTPS) websites.

R Online Transaction
Fraud
Illegal transfer using stolen
bank/credit card details.
Never share PIN, OTP, CVV.
Avoid public Wi-Fi for
A transactions. Review statements.

T Cybersecurity Fundamentals and Advanced Methods


Cybersecurity is the practice of protecting systems, networks, and data from digital attacks. Core
I goals:
• Confidentiality: Data accessible only to authorized parties (via encryption).

O • Integrity: Safeguarding data accuracy/completeness (via hashing, digital signatures).


• Availability: Ensuring reliable access for authorized users.
Advanced Security Methods:
N 1. Two-Factor/Multi-Factor Authentication (2FA/MFA): Requires two or more verification factors
(something you know, have, are).
S 2. Biometric Verification: Uses unique traits (fingerprint, facial recognition, iris scan). Convenient and
secure but raises privacy concerns.
3. Cryptography: Securing information by converting plaintext into ciphertext.
o Symmetric Cryptography: Single secret key for encryption/decryption (fast, but key distribution is a
challenge). Example: AES.
o Asymmetric Cryptography: Uses a public key (encrypt) and a private key (decrypt). Enables secure
communication without pre-shared secrets. Example: RSA.

P a g e 8 | 23
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Digital Citizenship, Ethics and Literacy
1. The digital landscape is the cornerstone of modern society, transforming communication, learning,
work, and entertainment.
2. A computer consists of hardware (physical components) and software (instructions, data, and

24. Digital Citizenship, Literacy and Ethics


programs).
3. System software acts as the primary interface between hardware and the user, simplifying
hardware use, controlling operations, and optimizing performance.
4. Application software carries out specific tasks for the user (e.g., word processors, spreadsheets).
M 5. The Operating System (OS) is the most critical system software that controls and manages all
computer operations; a computer cannot function without it.
K 6. OS functions include Booting, Security Management, Application Management, Memory
Management, File Management, Device Management, and providing a User Interface.
7. Common OS examples are Microsoft Windows, macOS, Linux, Android, and iOS.
8. Device Drivers are specialized programs enabling hardware components to communicate with the
OS.
P 9. Utility Programs perform management and maintenance tasks (e.g., antivirus, disk cleanup).
10. Language Translators convert human-readable programming code into machine-understandable
R 11.
code (Assemblers, Compilers, Interpreters).
The desktop is the main screen after startup, containing icons, taskbar, Start button/menu,
E 12.
notification area, and background/wallpaper.
A File is a common storage unit holding information; a Folder is a virtual container used to
P 13.
organize files.
A Shortcut is a link providing quick access to a file, folder, or program without moving the

A 14.
original item.
Essential file operations include Create, Rename, Cut/Copy/Paste, Delete & Restore, and Drag and
Drop.
R 15. Deleted files are sent to the Recycle Bin, from which they can be restored.
16. A word processor is an application used to create, edit, format, save, and print text-based
A 17.
documents.
Key word processor interface elements include the Quick Access Toolbar, Title Bar, Ribbon, and
T 18.
Document Workspace.
Character formatting in a word processor includes changing Font Style, Size, Color, and applying
I 19.
Bold, Italic, Underline, and Text Alignment.
Page Layout adjustments involve margins, orientation (Portrait/Landscape), and size.

O 20.
21.
Lists can be bulleted (unordered) or numbered (sequential).
Headers and Footers are areas at the top and bottom of every page for titles, page numbers, and
dates.
N 22. Spell & Grammar Check (F7) and Thesaurus are tools for error checking and finding synonyms.
23. Save (Ctrl+S) updates an existing file; Save As (F12) saves a new copy with a different
S 24.
name/location/format.
A multimedia presentation combines text, images, video, and audio (e.g., PowerPoint).
25. Slides can be added with various layouts; objects like text boxes, pictures, videos, audio, and
shapes can be inserted.
26. Speaker Notes are private notes for the presenter, accessible via the Notes pane.
27. Press F5 to start a slideshow; Slide Timings can be set for automatic advancement.
28. Email is a method of exchanging digital messages across computer networks.

P a g e 14 | 23
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Practice MCQs
1. What are the two main components of 7. In a word processor, which tab is used
a computer system? to adjust page margins and orientation?
A) CPU and RAM A) Home

24. Digital Citizenship, Literacy and Ethics


B) Hardware and Software B) Insert
C) Input and Output C) Layout
D) Operating System and Applications D) Review
Answer: B) Hardware and Software Answer: C) Layout
M 2. Which type of software acts as the
primary interface between hardware and
8. What does Bcc stand for in an email?
A) Basic Carbon Copy
K the user?
A) Application Software
B) Blind Carbon Copy
C) Broad Copy Control
B) System Software D) Binary Copy Code
C) Utility Software Answer: B) Blind Carbon Copy
D) Programming Software 9. Which email protocol downloads
P Answer: B) System Software emails from the server to a single device
3. Which of the following is NOT a and typically removes them from the
R function of an Operating System?
A) Booting
server?
A) SMTP
E B) Memory Management
C) Word Processing
B) IMAP
C) POP
P D) File Management
Answer: C) Word Processing
D) HTTP
Answer: C) POP

A 4. What is the purpose of a Device


Driver?
10. What is the ability to effectively find,
create, evaluate, communicate, and share
A) To perform disk cleanup content in a digital environment called?
R B) To enable hardware components to A) Digital Citizenship
communicate with the OS B) Digital Literacy
A C) To compile programming code
D) To create documents
C) Digital Ethics
D) Digital Security
T Answer: B) To enable hardware
components to communicate with the OS
Answer: B) Digital Literacy
11. Which of the following is a primary
I 5. Where are deleted files typically stored
before permanent deletion?
source of information?
A) A textbook summarizing historical

O A) Downloads folder
B) Recycle Bin
events
B) A documentary film about World War II
C) Temp folder C) A soldier's original diary from World
N D) Desktop War II
Answer: B) Recycle Bin D) An encyclopedia entry
S 6. Which keyboard shortcut is used to
copy selected text or files?
Answer: C) A soldier's original diary
from World War II
A) Ctrl+X 12. What does the 'A' in the CRAAP test
B) Ctrl+C for evaluating sources stand for?
C) Ctrl+V A) Authenticity
D) Ctrl+A B) Authority
Answer: B) Ctrl+C C) Accuracy

P a g e 20 | 23
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 25

Entrepreneurship in the Digital Age


Introduction
Entrepreneurship is the dynamic process of identifying a market opportunity, conceptualizing a solution,
and undertaking the risk of launching and managing a new business venture to bring new products,

25. Entrepreneurship in the Digital Age


services, or processes to life. It is the engine of innovation, job creation, and economic growth. In the
contemporary world, this traditional process has been fundamentally transformed by digital
technologies. The fusion of classic business acumen with tools like the internet, social media, cloud
M computing, and data analytics has created unprecedented opportunities while reshaping the
entrepreneurial landscape. This Master Chapter provides a comprehensive, unified guide to
K understanding the complete journey of entrepreneurship—from its core principles and initial idea
validation to building, launching, and scaling a venture in the digital era. It is designed to be a self-
contained, professional resource for students and aspiring entrepreneurs.

The Foundation of Entrepreneurship


P Definition and Core Concepts
R • Entrepreneur: An individual who organizes, manages, and assumes the financial risks of a new
business venture. An entrepreneur is commonly seen as an innovator, a source of new ideas, goods,
E •
services, and business procedures. The term originates from the French word meaning "to undertake."
Entrepreneurship: The process of designing, launching, and running this new business venture. It

P
involves identifying a market need, taking calculated risks under conditions of uncertainty, and making
strategic decisions to achieve business objectives and create value.

A Significance and Impact


Entrepreneurship is a vital catalyst for any economy due to its multi-faceted role:
R • Economic Growth: Creates new jobs and introduces new products and services, stimulating economic
activity.

A • Innovation and Progress: Drives groundbreaking ideas that transform lifestyles and industries (e.g.,
smartphones, digital platforms).
Job Creation: Generates employment opportunities directly and indirectly.
T

• Competition and Improvement: Introduces fresh ideas and competition into the market, leading to
better products, services, and prices for consumers.
I • Social and Environmental Solutions: Through social entrepreneurship, it addresses pressing societal
and environmental challenges.
O Characteristics of a Successful Entrepreneur
N •
Successful entrepreneurs typically exhibit a composite set of the following attributes and skills:
Innovation & Creativity: The ability to create something new or significantly improve existing
solutions through creative thinking.
S • Calculated Risk-Taking: A willingness to undertake financial and personal risks, with an
understanding that failure is possible but great rewards can follow. They are moderate risk-takers, not
gamblers.
• Persistence and Resilience: The determination and self-reliance to overcome inevitable challenges
and setbacks.
• Future Orientation & Opportunity Seeking: Constantly looking ahead for new opportunities and
focused on long-term potential.

P a g e 1 | 28
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Founded on the belief the company can
revolutionize an industry. Heavily reliant on Facebook,
2. Scalable Startup
venture capital, specialized employees, and Instagram, Uber.
targets rapid expansion & big profits.

25. Entrepreneurship in the Digital Age


Microsoft, Google,
Involves creating new services/products within
3. Large Company / Disney (internal
M Intrapreneurship
an established corporation to meet evolving
innovation
consumer demand and sustain innovation.
K divisions).
Non-profit
Aims to solve social problems and create
organizations,
4. Social positive change. The primary goal is social
P Entrepreneurship good, not maximizing profits. Often structured
companies
dedicated to social
R as non-profits or hybrid models.
impact.

E 5. Innovative
Driven by the continuous generation of new Steve Jobs (Apple),
ideas and inventions turned into ventures, Bill Gates
P Entrepreneurship
aiming to change lives and industries. (Microsoft).

A Relies on hard work, consistent effort, and self-


A salesperson
6. Hustler making extensive
R Entrepreneurship
developed skills rather than large capital. Starts
cold calls to build a
small and is highly motivated by aspirations.
A client base.
Improves upon existing business ideas of Businesses that
T 7. Imitator others. Combines traits of an innovator and a refine and enhance
I Entrepreneurship hustler, learning from others' mistakes to create existing
a better version. products/services.
O Believes success comes from complete Tech or science-
N 8. Researcher knowledge and preparation. Relies on facts, based startups with

S Entrepreneurship data, and detailed business plans, minimizing


risk through extensive research.
lengthy R&D
phases.
Investors or
Uses personal wealth to acquire and grow
9. Buyer acquirers of
existing, promising businesses. Involves less
Entrepreneurship businesses (e.g.,
risk as companies are already established.
private equity).
P a g e 3 | 28
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
7. Financial Projections: Provide realistic forecasts for revenue, expenses, and profitability.
8. The Team: Introduce key members and highlight their relevant expertise and passion.
9. The Ask: State clearly what you need (e.g., amount of investment, specific partnership).
The Elevator Pitch: A 30-60 second compelling summary.
• Hook: Engaging opening.
• Introduction: "We are [Company], and we..."

25. Entrepreneurship in the Digital Age


• USP: "Unlike [alternative], we [unique benefit]..."
• Call to Action (CTA): "I'd love to schedule a brief meeting to show you our demo."
Business Plan vs. Pitch Document:
M Feature Business Plan Pitch Document/Deck
K Comprehensive internal roadmap and Concise, persuasive presentation to
Purpose
detailed funding proposal. spark interest and secure a meeting.
Long (20-40 pages), detailed written Short (10-15 slides), highly visual,
P Format
document. minimal text.
R Detail In-depth market research, financial
High-level overview focusing on

E
problem, solution, opportunity, team,
Level models, operational plans.
and ask.
P Audience
Investors for due diligence, banks, Potential investors, partners,

A internal management. competition judges for first impression.

Developing a Comprehensive Business Plan


R A business plan is a formal written document describing the business's goals, strategies, market, and
financial forecasts.
A 1.
Key Sections:
Executive Summary: A one-page snapshot of the entire plan (written last).
T 2.
3.
Company Description: Vision, mission, legal structure, and company history (if any).
Market Analysis: Industry overview, target market profile, competitor analysis (SWOT: Strengths,

I 4.
Weaknesses, Opportunities, Threats), and trends.
Organization & Management: Company structure, biographies of key team members.
5. Products/Services Line: Detailed description of what you sell and its lifecycle.
O 6. Marketing & Sales Strategy: How you will reach customers and your sales process.
7. Funding Request (if applicable): How much capital is needed and how it will be used.
N 8.
o
Financial Projections: The critical section including:
Income Statement (Profit & Loss)
S o
o
Cash Flow Statement
Balance Sheet
o Break-Even Analysis
o Assumptions behind the projections.

Financial Calculations & Pricing


A sound financial foundation starts with understanding costs and setting prices.
Steps to Calculate Selling Price & Profit:
P a g e 8 | 28
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
One Liners: Entrepreneurship in Digital Age
1. Entrepreneurship is the dynamic process of identifying a market opportunity and undertaking the
risk of launching a new business venture.

25. Entrepreneurship in the Digital Age


2. An entrepreneur is an individual who organizes, manages, and assumes the financial risks of a new
business venture.
M 3. The term "entrepreneur" originates from the French word meaning "to undertake."

K 4. Entrepreneurship is commonly seen as a source of innovation, introducing new ideas, goods,


services, and business procedures.
5. The process of entrepreneurship involves identifying a market need, taking calculated risks, and
P making strategic decisions to create value.

R 6. Entrepreneurship acts as a vital catalyst for economic growth by creating new jobs.
7. It drives economic growth by introducing new products and services that stimulate economic
E activity.
P 8. Entrepreneurship is a primary driver of groundbreaking innovation that transforms lifestyles and

A industries.
9. A major impact of entrepreneurship is job creation, generating employment opportunities both
R directly and indirectly.
A 10. By introducing fresh ideas and competition, entrepreneurship leads to better products, services, and

T prices for consumers.


11. Social entrepreneurship specifically addresses pressing societal and environmental challenges.
I 12. A key characteristic of successful entrepreneurs is innovation and creativity.
O 13. Entrepreneurs exhibit calculated risk-taking, understanding that failure is possible but great rewards

N can follow.
14. Successful entrepreneurs are moderate risk-takers, not gamblers.
S 15. Persistence and resilience are essential attributes for overcoming inevitable challenges and setbacks.
16. Entrepreneurs are future-oriented and constantly seek new opportunities with long-term potential.
17. A deep desire for responsibility and control over the venture's outcomes is a common entrepreneurial
trait.

P a g e 13 | 28
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
215. Potential career paths from entrepreneurship skills include Founder, Product Manager, and Business
Analyst.
216. Other paths include UX/UI Designer, Digital Marketing Manager, and Project Manager.
217. Innovation Consultant and Software Developer are also potential career paths.

25. Entrepreneurship in the Digital Age


218. Neuro-Mat is a Pakistani e-health startup addressing continuous patient monitoring.

M 219. Neuro-Mat identified the problem that nurses cannot monitor every patient continuously, leading to

K risks like falls.


220. Their solution is a multi-sensory mat that monitors movement and alerts staff if a patient attempts to
leave the bed.

P 221. Neuro-Mat began with simple, low-fidelity prototypes like buzzer and switch circuits.

R 222. They iterated towards complex systems integrating pressure sensors and microcontrollers.
223. Their market validation Smoke Test showed double the preference over alternatives like baby
E monitors.

P 224. Key learning from feedback was that customers strongly preferred an outright purchase model over

A rental.
225. Customers also valued cash-on-delivery payment options.
R Practice MCQs
A 1. What is the core definition of an
entrepreneur?
d) German
Answer: c) French
T a) An employee who follows company
procedures
3. Which of the following is NOT a primary
impact of entrepreneurship on an
b) An individual who organizes, manages, economy?
I and assumes the financial risks of a new a) Job Creation
business venture b) Economic Stagnation
O c) A government official who regulates
markets
c) Innovation and Progress
d) Increased Competition
N d) A consumer who buys innovative products
Answer: b) An individual who organizes,
Answer: b) Economic Stagnation
4. A successful entrepreneur who takes
S manages, and assumes the financial risks
of a new business venture
financial risks with an understanding of
potential failure, but not recklessly, is best
2. The term "entrepreneur" originates from described as a:
which language? a) Gambler
a) Latin b) Calculated risk-taker
b) Greek c) Avoider of all risk
c) French d) Follower of trends
Answer: b) Calculated risk-taker
P a g e 23 | 28
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Chapter 26

Miscellaneous Information: Quick Revision Notes


1. Most Common Keyboard Shortcuts

26. Miscellaneous Information: Quick Revision Notes


Windows
• Ctrl + C → Copy selected item → Used to copy text/files.
• Ctrl + X → Cut selected item → Removes and copies text/files.

M
• Ctrl + V → Paste copied/cut item → Inserts clipboard content.
• Ctrl + Z → Undo last action → Reverses previous operation.
• Ctrl + Y / Ctrl + Shift + Z → Redo action → Reapplies undone action.
K • Ctrl + A → Select all items → Highlights all content in a window.
• Ctrl + S → Save current document → Saves file in active application.
• Ctrl + F → Open find/search box → Searches for text on a page.
• Ctrl + P → Print current page/document → Opens print dialog.
P •

Ctrl + N → Open new window/document → Creates new instance.
Ctrl + W → Close current window/tab → Shuts active tab/window.

R •

Ctrl + T → Open new browser tab → Creates tab in browsers.
Ctrl + Shift + T → Reopen closed tab → Restores recently closed tab.
Alt + Tab → Switch between open apps → Toggles running applications.
E

• Alt + F4 → Close active application → Quits current program.
• Windows Key + D → Show/hide desktop → Minimizes all windows.
P •

Windows Key + E → Open File Explorer → Launches file manager.
Windows Key + L → Lock computer → Locks screen quickly.
A •

Windows Key + R → Open Run dialog → Executes commands.
Windows Key + V → Open clipboard history → Shows copied items.
R •

Windows Key + . (period) → Open emoji panel → Inserts emojis.
Windows Key + Shift + S → Open Snipping Tool → Takes screenshot.

A •

Ctrl + Shift + Esc → Open Task Manager → Directly opens task manager.
F2 → Rename selected item → Renames file/folder.
F5 → Refresh active window → Reloads page/file explorer.
T

• Alt + Enter → Open properties → Displays selected item's properties.

I •
macOS
Cmd + C → Copy selected item → Equivalent to Ctrl+C.

O •

Cmd + X → Cut selected item → Cuts selected content.
Cmd + V → Paste copied/cut item → Pastes clipboard content.

N •

Cmd + Z → Undo last action → Reverses last change.
Cmd + Shift + Z → Redo action → Reapplies undone change.
Cmd + A → Select all items → Selects all content.
S

• Cmd + S → Save current document → Saves active file.
• Cmd + F → Find items in document → Opens find bar.
• Cmd + P → Print document → Opens print dialog.
• Cmd + N → Open new window/document → New window.
• Cmd + W → Close current window → Closes active window.
• Cmd + Q → Quit application → Exits program completely.
• Cmd + T → Open new browser tab → New tab in browser.

P a g e 1 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• Cmd + Shift + T → Reopen closed tab → Restores closed tab.
• Cmd + Tab → Switch between applications → App switcher.
• Cmd + Space → Open Spotlight search → System-wide search.
• Cmd + Shift + 4 → Take screenshot (area) → Screenshot selection.
• Cmd + Shift + 3 → Take screenshot (full screen) → Captures entire screen.

26. Miscellaneous Information: Quick Revision Notes


• Cmd + , (comma) → Open preferences → Opens app preferences.
• Cmd + Option + Esc → Force quit applications → Opens force quit window.
• Cmd + H → Hide current window → Hides active app window.
• Cmd + Option + H → Hide other windows → Hides all but active window.
• Ctrl + Cmd + Q → Lock screen → Immediately locks Mac.
M Linux (General/GNOME)
K •

Ctrl + C → Copy / Send SIGINT → Copies text or interrupts process.
Ctrl + X → Cut selected text → Cuts selected content.
• Ctrl + V → Paste copied text → Pastes clipboard content.
• Ctrl + Z → Undo / Suspend process → Undoes or sends SIGTSTP.
• Ctrl + Shift + Z → Redo action → Redoes undone action.
P •

Ctrl + A → Select all → Selects all text/items.
Ctrl + S → Save document → Saves current file.
R •

Ctrl + Q → Quit application → Exits program.
Ctrl + F → Find → Opens search box.
E •

Ctrl + Alt + T → Open terminal → Launches terminal emulator.
Alt + Tab → Switch between windows → Window switcher.

P •

Alt + F2 → Run command dialog → Opens run command box.
Super Key (Windows Key) → Open activities overview → Shows activities.
Ctrl + Alt + L → Lock screen → Locks the session.
A

• Ctrl + Alt + Delete → Open logout dialog → Shows logout options.
• Ctrl + Alt + Arrow Keys → Switch workspaces → Moves between workspaces.
R •

Ctrl + Shift + N → New folder in file manager → Creates folder.
Ctrl + H → Show hidden files → Toggles hidden files visibility.
A • Ctrl + Alt + F1/F7 → Switch to terminal/GUI → Toggles TTY and GUI.

2. Popular E-Commerce Platforms


T • Amazon
Founder: Jeff Bezos
I
o
o Country of Origin: USA
o Headquarters: Seattle, Washington, USA
O o Current CEO: Andy Jassy
o Major Services: Online retail, AWS cloud, Prime Video, Kindle, Alexa.
N o
o
Launch Year: 1994
Key Fact: World's largest online retailer and cloud service provider (AWS).
S •
o
eBay
Founder: Pierre Omidyar
o Country of Origin: USA
o Headquarters: San Jose, California, USA
o Current CEO: Jamie Iannone
o Major Services: Consumer-to-consumer & business-to-consumer sales, auctions.
o Launch Year: 1995
o Key Fact: Pioneer of online auctions and consumer-to-consumer (C2C) e-commerce.
P a g e 2 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
• Primary Key: Unique identifier for a record in a database table.
• Foreign Key: Field in a table that links to the primary key of another table.
• Normalization: Process of organizing data to reduce redundancy and improve integrity.
• Indexing: Database optimization technique to speed up data retrieval.
• Networking: Practice of connecting computers to share resources and information.

26. Miscellaneous Information: Quick Revision Notes


• IP Address: Numerical label assigned to each device on a network using IP.
• MAC Address: Unique hardware identifier assigned to a network interface controller.
• Protocol: Set of rules governing data communication between devices.
• Router: Networking device that forwards data packets between computer networks.
• Switch: Device that connects devices on a LAN and uses MAC addresses to forward data.
M •

Firewall: Security system that monitors and controls network traffic based on rules.
Cloud Computing: Delivery of computing services over the internet ("the cloud").
K •

IaaS: Infrastructure as a Service – provides virtualized computing resources.
PaaS: Platform as a Service – provides platform for developing and deploying apps.
• SaaS: Software as a Service – delivers software applications over the internet.
• Virtualization: Creating a virtual version of something (server, OS, storage, network).
Hypervisor: Software that creates and runs virtual machines.
P

• Artificial Intelligence (AI): Simulation of human intelligence in machines.
• Machine Learning (ML): Subset of AI where machines learn from data without explicit
R •
programming.
Deep Learning (DL): Subset of ML using neural networks with many layers.
E •

Neural Network: Computing system inspired by biological neural networks.
Supervised Learning: ML training using labeled data.
P •

Unsupervised Learning: ML training using unlabeled data to find patterns.
Reinforcement Learning: ML where an agent learns by receiving rewards/punishments.

A •

Algorithm: Step-by-step procedure for solving a problem or performing a computation.
Data Structure: Particular way of organizing data for efficient access and modification.
Array: Collection of items stored at contiguous memory locations.
R

• Linked List: Linear data structure where elements are linked using pointers.
• Stack: LIFO (Last In, First Out) linear data structure.
A •

Queue: FIFO (First In, First Out) linear data structure.
Tree: Hierarchical data structure with a root value and subtrees of children.
T •

Graph: Non-linear data structure of nodes (vertices) connected by edges.
Hash Table: Data structure that maps keys to values using a hash function.
I •

Time Complexity: Amount of time an algorithm takes relative to input size.
Space Complexity: Amount of memory an algorithm uses relative to input size.

O •

Big O Notation: Mathematical notation describing algorithm complexity's upper bound.
Compiler: Program that translates source code from a high-level language to machine code.
Interpreter: Program that directly executes instructions written in a programming language.
N

• Syntax: Set of rules defining the combinations of symbols in a programming language.
• Semantics: Meaning of the syntactically valid statements in a programming language.
S •

Object-Oriented Programming (OOP): Paradigm based on objects containing data and methods.
Class: Blueprint for creating objects in OOP.
• Object: Instance of a class.
• Inheritance: Mechanism where a class derives properties from another class.
• Polymorphism: Ability of an object to take on many forms, often through method
overriding/overloading.
• Encapsulation: Bundling of data with methods operating on that data, hiding internal state.

P a g e 7 | 18
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
Past Papers Questions
1. How many rows in MS Excel Sheet? 8. Gmail, Hotmail and Yahoo are:
A) 86340 A) Email Server

Past Papers Questions


B) 1048576 B) Client Server
C) 86400 C) Email Programmer
D) None of these D) None of these
Answer: B) 1048576 Answer: D) None of these
2. Which Pane is not available in 9. Windows 9 and Windows 10 are known as:
M PowerPoint?
A) WordArt
A) Operating system
B) System software
K B) Insert
C) Animation
C) Application software
D) None of these
D) None of these Answer: A) Operating system
Answer: A) WordArt 10. In PowerPoint the header and footer
3. Deleted Items in file directly go to the:
button can be found on the:
P A) Recycle Bin
B) Desktop
A) Home tab
B) Insert tab
R C) Windows Folder
D) None of these
C) Draw tab
D) None of these
E Answer: A) Recycle Bin
4. Crop function is used to crop:
Answer: B) Insert tab
11. Which of the following are word

P A) Videos
B) Images
processing software?
A) Browser
C) Files B) PowerPoint
A D) None of these C) MS Word
Answer: B) Images D) None of these
R Answer: C) MS Word
5. Which key is used to move the cursor to
end of the line? 12. The first computers were programmed
A A) End
B) Home
using:
A) Assembly language
T C) Shift+ tab
D) None of these
B) Machine language
C) Object code

I Answer: A) End
6. In MS-DOS, DOS stands for:
D) None of these
Answer: B) Machine language
A) Disk Operating System 13. The computer cannot boot if it cannot
O B) Device Operating System load the:
C) Driver Operating System A) Loader
N D) None of these
Answer: A) Disk Operating System
B) Operating system
C) Assembler
S 7. HTML stands for hypertext markup
language is used for creating:
D) None of these
Answer: B) Operating system
A) Web pages 14. BIOS stands for:
B) Web server A) Basic Input Output System
C) Client server B) Binary Input Output System
D) None of these C) Broad Input Output System
Answer: A) Web pages D) None of these
Answer: A) Basic Input Output System
P a g e 1 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091
MK PREPARATIONS
15. LCD stands for: 22. Which button do you click to add up a
A) Light Clear Display series of numbers?
B) Liquid Crystal Display A) Auto sum
C) Light Crystal Display B) Formula button
D) None of these C) Total Button

Past Papers Questions


Answer: B) Liquid Crystal Display D) None of these
16. Which function in Excel returns the Answer: A) Auto sum
remainder of division? 23. When you insert an Excel file into a Word
A) Divide document, the data are:
B) MOD A) Embedded
M C) ACOT
D) None of these
B) Linked
C) Hyperlink placed in word table
K Answer: B) MOD
17. Which template provides design concept,
D) None of these
Answer: B) Linked
fonts and color scheme? 24. A user interface that is easy to use is
A) Design template considered to be:
B) Color template A) User happy
P C) Animation template B) User friendly
D) None of these C) User simple
R Answer: A) Design template
18. Which key is used to minimize an Excel
D) None of these
Answer: B) User friendly
E Worksheet?
A) CTRL+F5
25. CAD stands for:
A) Computer aided design
P B) CTRL+F9
C) CTRL+F11
B) Computer algorithm design
C) Computer application design

A D) None of these
Answer: B) CTRL+F9
D) None of these
Answer: A) Computer aided design
19. Videos, documents and files can be shown 26. When you open a new presentation, a
R in: slide with the default layout appears?
A) WhatsApp A) Blank
A B) YouTube
C) Skype
B) Home
C) Title
T D) None of these
Answer: D) None of these
D) None of these
Answer: C) Title
I 20. The extension of a PowerPoint file is:
A) XLS
27. The capacity of a floppy disk is:
A) 1.22 MB

O B) PPT
C) TXT
B) 1.33 MB
C) 1.44 MB
D) All of these D) None of these
N Answer: B) PPT Answer: C) 1.44 MB
21. In MS Word, Header and Footer are 28. Which key is used to insert text in a cell?
S inserted in:
A) Front page
A) Enter
B) Space
B) Last page C) Tab
C) On every page D) None of these
D) None of these Answer: B) Space
Answer: C) On every page 29. What is the smallest width of a column in
Excel?

P a g e 2 | 21
MK PREPARATIONS: Let’s Make It Happen
+92 333 2605045, +92 342 4470091

Common questions

Powered by AI

System software primarily acts as an intermediary between computer hardware and application software, managing resources and providing a stable environment for applications to function . It is usually pre-installed and necessary for the basic operation of the computer, including the operating system and device drivers. Application software, on the other hand, is designed to perform specific user-directed tasks such as word processing or web browsing, which are optional and installed based on user needs .

Converting a decimal number to binary involves dividing the number by 2 repeatedly, recording the remainder at each step, and reading the remainders in reverse order as the binary equivalent. This method is important because all digital computing and processing rely on binary representation. This conversion is integral for programming as it allows easy manipulation of data by digital devices, establishing a common framework for processing and storage .

The Control Unit (CU) in the CPU is responsible for fetching, decoding, and executing instructions from software programs. It directs data transfer and controls the flow of data between the CPU and other components. Essentially, the CU acts as the brain within the CPU, interpreting program instructions and turning them into control signals that manage the operations of the arithmetic logic unit and other system components, ensuring that instructions are processed correctly and efficiently .

Utility software complements system software by offering specialized functions that support system maintenance, optimization, and security. While system software like the OS manages fundamental operations and resource allocation, utility software performs tasks such as virus protection, disk cleanup, and data backup. These utilities ensure the computer runs efficiently, prolongs hardware life, and protects against potential threats. The synergy between system software and utility programs provides a stable and reliable operating environment that enhances overall performance .

The binary system facilitates a computer's processing of data by representing all types of information—such as text, images, and sound—as binary code (0s and 1s). This system is integral because it uses a base of 2, allowing digital computing to operate on simple on-and-off states represented by 1 and 0. Binary is compact and adaptable for processing with electronic components like the CPU and RAM, where data can be easily manipulated as electrical signals. For example, a bit, the smallest unit, holds either a 0 or 1, and bytes group these bits for larger data measurements .

As a resource manager, the OS efficiently allocates hardware components, such as CPU time, memory space, and I/O devices, to various applications and processes. It also ensures that multiple tasks run smoothly by managing conflicts and prioritizing system resources, which optimizes performance and prevents bottlenecks . This role is crucial because it determines a system's ability to handle concurrent processes, maintain stability during multitasking, and recover from errors without affecting other operations. The OS's resource management capabilities directly affect the user experience and overall system efficiency.

The CLI offers powerful and flexible system management capabilities but demands detailed command knowledge and memorization, which makes it less user-friendly for beginners. It allows for direct and efficient control of system operations with a smaller memory footprint and is ideal for automation and scripting . In contrast, a GUI provides a more intuitive interaction with system resources through visual elements, enhancing usability for non-expert users but can be less efficient in handling complex tasks and scripts . The choice between CLI and GUI often affects the speed and efficiency of administrative tasks and user accessibility.

The "Quick Access Toolbar" in a word processor offers a customizable set of frequently used commands such as Save and Undo, providing users quick access without navigating through the main interface. In contrast, the "Ribbon" is a broader interface that organizes available tools and features into tabs, facilitating comprehensive access to functionalities ranging from text formatting to advanced document elements . While the Toolbar enhances efficiency for routine tasks, the Ribbon provides more depth for document management and editing.

HTML provides the foundational structure of web content by defining elements like headings, paragraphs, links, and images . CSS complements HTML by controlling the presentation, layout, and styling, such as colors, fonts, and spacing. This separation of structure and style allows for more flexible and maintainable web design, as the same HTML document can be presented differently through various CSS stylesheets, enhancing user experience and design consistency .

Digital computing has revolutionized communication, learning, work, and entertainment by enabling rapid information exchange, automation, and global connectivity. However, it has also introduced ethical challenges such as privacy concerns, cybersecurity risks, digital divide, and the ethical use of artificial intelligence. These challenges require users and developers to consider ethical frameworks and citizenship practices in a technology-driven world to ensure responsible and safe participation in the digital ecosystem .

You might also like