Comp
Comp
UNIT 4 – Software
4.1 Types of Software & Interrupts
4.1.1 Software
Types of Software:
1. System Software – Controls hardware and runs application software.
o Examples:
▪ Operating System (OS) – Manages resources (e.g., Windows, Linux)
▪ Utility Programs – Tools like antivirus, backup, disk cleanup
▪ Device Drivers – Help OS communicate with hardware (e.g., printer drivers)
2. Application Software – Allows users to perform tasks.
o Examples:
▪ Word Processor – e.g., MS Word
▪ Spreadsheet – e.g., Excel
▪ Web Browser – e.g., Chrome
▪ Games Software – e.g., Minecraft
Utility Software (a type of system software):
Utility Definition Function
Antivirus Detects and removes viruses Compares files to virus database
Defragmentation Reorganizes files Speeds up file access on HDD
Backup Copies data for recovery Manual or automatic
Security Manages user access and protection Includes firewalls, encryption
Screensavers Prevents screen burn Locks screen on inactivity
Device Drivers Helps OS interact with hardware Provides ID and configuration info
4.1.2 Operating Systems
Definition: A program that controls hardware, provides HCI, and allows application software to
run.
Functions of an OS:
1. Human-Computer Interface (HCI) – CLI vs GUI
2. Memory Management – Allocates RAM and swap memory
3. Security Management – Passwords, firewalls, updates
4. Hardware Management – Uses drivers to control peripherals
5. File Management – Stores and organizes files
6. Interrupt Handling – Pauses and resumes tasks as needed
7. Platform for Applications – Allows apps to run on system
8. Multitasking – Runs multiple programs using CPU time-slicing
9. User Account Management – Separate files and settings for users
4.1.4 Interrupts
Definition: A signal to the processor that something urgent needs attention.
Causes:
• Input/output request
• Timer
• Hardware error (e.g. paper jam)
• Keypress (e.g. Ctrl + Alt + Del)
• Software error
Interrupt Handling Process:
1. Save current task (PC & registers)
2. Execute ISR (Interrupt Service Routine)
3. Resume original task
Buffers:
• Temporary storage areas
• Help match speed differences (e.g. CPU and printer)
4.2.3 Translators
Translator Translates Output Key Point
Compiler Whole HLL program at once Executable file Fast, independent
Interpreter One line at a time No executable Slower, good for testing
Assembler Assembly → Machine code Executable file One-to-one conversion
Web Browser
• Software to access, render and display web pages
• Translates HTML to a visual layout
• Features: bookmarks, cookies, ad blockers, tabs, search history
DNS (Domain Name System)
Function: Translates URL → IP Address
Steps:
1. Browser sends URL to DNS
2. DNS returns IP address
3. Browser requests web page from that IP
4. HTML is interpreted and displayed
Cookies
Definition: Small text files stored on user's computer
Used for: Tracking, autofill, saving preferences
Type Stored Where Example
Session Cookie RAM, temporary Shopping cart
Persistent Cookie Hard disk, long-term Remember login
5.2 Digital Currency
Digital Currency
• Exists only electronically (no physical form)
• Stored in digital wallets
• Used for online payments, transfers, investments
• Volatile in value (risky)
Cryptocurrency
• Type of digital currency using cryptography
• Operates on a decentralized network (no government control)
• Uses Blockchain for transparency and security
Examples: Bitcoin, Ethereum, Litecoin
Blockchain Network
Definition: Public digital ledger of transactions
Features:
• Tamper-proof
• Decentralized (shared across many computers)
• Verifies transactions with cryptographic hash
Each Block contains:
• Data: sender, receiver, amount
• Hash: Unique block ID
• Previous Hash: Links to previous block
First Block = Genesis Block
Other Protections
• Two-Step Verification: Needs 2 forms of ID (e.g. password + OTP)
• Auto Software Updates: Fix security bugs
• Firewall:
o Hardware/software that monitors network traffic
o Uses rules to allow/deny data
• Proxy Server:
o Between user & internet
o Hides IP, blocks sites, filters content
• Privacy Settings:
o Control who sees your data
o Reduce identity theft risks
UNIT 9 – Databases
Databases
What is a Database?
• A structured collection of data stored on a computer.
• Allows efficient storage, retrieval, and editing of data.
• Data can include text, numbers, images, etc.
Database Structure
Term Definition
Table Stores data of one type (e.g. PATIENT)
Record (Row) Data about one item/person/event
Field (Column) Specific detail about each record (e.g. DateOfBirth)
Primary Key
• A field that uniquely identifies each record in a table.
• Must contain unique, non-repeating values.
• Example: PatientID, ISBN, HospitalNumber
✅ Validation
Used to ensure correct data is entered.
Type Example
Automatic Date field accepts only valid dates
Custom/Manual Developer sets limits/rules (e.g. age must be > 0)
SQL Operators
Operator Meaning
= Equal to
<> Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
AND Both conditions must be true
OR At least one condition is true
UNIT 10 – Boolean Logic
Boolean Logic & Logic Gates
❗ Why use Boolean Logic?
• It is used to create decision-making circuits in computers.
• It helps determine output values based on input combinations using logic gates.
Truth Tables
Truth tables show all possible combinations of inputs and their matching output.
How to make a truth table:
• For three inputs (like A, B, C):
o First input alternates every 1 row: 0, 1, 0, 1…
o Second input alternates every 2 rows: 0, 0, 1, 1…
o Third input alternates every 4 rows: 0, 0, 0, 0, 1, 1, 1, 1
• Run each combination through the logic and write the output.
Example:
If the logic is A AND B, the output will be:
A B Output
000
010
100
111