AECSC Semester 1 Exam Cheatsheet
Year 11 Computer Science Semester 1 Exam Cheatsheet
How to Use This Guide
- Use this as a quick recap before exams
- Focus first on definitions, formulas, and key trends
- Work through the past exam questions
- Test yourself with the MCQ and flashcard sections at the bottom
SECTION 1: NETWORKING FUNDAMENTALS
1.1 The DoD TCP/IP Model (4-Layer Model)
Understanding this model is CRITICAL — appears in ~80% of questions
Layer 4: Application Layer
- Definition: Provides network services and interfaces for user applications; where users and apps interact with the network
- Functions: Data formatting, user authentication, initiating communication between applications
- Key Protocols:
- HTTP/HTTPS (web browsing) — for accessing websites
- SMTP (Simple Mail Transfer Protocol) — for sending emails
- FTP (File Transfer Protocol) — for transferring files
- DNS (Domain Name System) — translates domain names to IP addresses
- Telnet, SSH — remote access
- Real-World Example: When you open Chrome and visit www.google.com, the HTTPS protocol operates at this layer
Layer 3: Transport Layer
- Definition: Provides reliable or fast data delivery between applications; manages end-to-end communication
- Functions:
- Divides large data into segments/packets
- Adds port numbers for multiplexing
- Handles error checking and flow control
- Manages acknowledgments and retransmissions
- Key Protocols:
- TCP (Transmission Control Protocol) — reliable, slower, ordered delivery (used for web browsing, email)
- UDP (User Datagram Protocol) — fast, unreliable, unordered delivery (used for video streaming, online games)
- Port Numbers: Allow multiple applications to communicate simultaneously (e.g., port 80 for HTTP, port 443 for HTTPS, port 25 for SMTP)
- Real-World Example: Downloading a file via FTP uses TCP to ensure all file packets arrive correctly
Layer 2: Internet Layer
- Definition: Responsible for logical addressing (IP addresses) and routing packets across different networks
- Functions:
- Adds source and destination IP addresses to data
- Determines best path for data to travel
- Routes packets through internet using routers
- Handles errors with ICMP
- Key Protocols:
- IP (IPv4/IPv6) — addressing and routing
- ICMP (Internet Control Message Protocol) — error messages, ping utility
- ARP (Address Resolution Protocol) — maps IP addresses to MAC addresses
- Real-World Example: Email from Perth to London uses routers at this layer to find the best path across networks
Layer 1: Network Access Layer (Physical/Link Layer)
- Definition: Handles physical transmission of data over network media; manages hardware addressing
- Functions:
- Converts data into signals (electrical, radio waves, light)
- Uses MAC addresses (hardware addresses) for local delivery
- Manages physical components and media
- Key Protocols:
- Ethernet (wired networks) — 802.3
- Wi-Fi (wireless networks) — 802.11
- MAC (Media Access Control) — hardware addressing (e.g., 00:1A:2B:3C:4D:5E)
- PPP (Point-to-Point Protocol)
- Real-World Example: Your laptop’s Wi-Fi card converts binary data into radio waves sent to the router
1.2 Network Security
Why Network Security is Essential
- Protect confidential information — prevent data theft
- Maintain system integrity — prevent tampering, malware, unauthorized modifications
- Ensure system availability — keep services online and accessible
- Protect user privacy — safeguard personal data
- Example scenario: A hospital network breach could expose patient medical records
Firewalls
Definition: Software or hardware that monitors and filters incoming/outgoing network traffic
Firewall Functions:
- Monitors ALL incoming and outgoing traffic
- Acts as barrier blocking unauthorized connections
- Filters packets based on security rules (source IP, port, protocol type)
- Can block traffic from known malicious IP addresses
- Prevents users from accessing prohibited websites
- First line of defense against hacking and malware
- Can operate at Layer 3 (IP filtering) or Layer 4 (port filtering)
Example: A school firewall might block Facebook (Layer 7), prevent downloads of executables, and only allow port 443 (HTTPS) for web traffic
Operating System Security
The OS is the foundation of network security
OS Security Responsibilities:
- User Authentication — manages usernames/passwords, biometrics, tokens to verify identity
- Access Control — restricts what users can access (files, directories, resources)
- Firewall & Network Configuration — includes built-in firewalls and network settings
- Regular Security Updates — patches fix vulnerabilities before they’re exploited
- Audit Logs — tracks who accessed what and when
- Encryption — protects data at rest and in transit
Why Regular Updates Matter: New vulnerabilities are discovered constantly. Delayed updates leave systems exposed.
Other Security Measures
- Passwords: Use strong, unique passwords; change regularly
- Two-Factor Authentication (2FA): Requires password + second verification (SMS, authenticator app)
- Biometrics: Fingerprint, face recognition, iris scanning
- Encryption: Scrambles data so only authorized parties can read it (e.g., HTTPS uses TLS encryption)
- Virtual Private Networks (VPN): Encrypts all traffic between device and server
1.3 Network Performance
Key Performance Metrics
| Term | Definition | Key Points |
|---|---|---|
| Bandwidth | Maximum data that CAN be transmitted in given time (measured in Mbps or Gbps) | Infrastructure limit; like highway width |
| Throughput | Actual data SUCCESSFULLY transmitted (measured in Mbps or Gbps) | Usually less than bandwidth due to latency, packet loss |
| Latency | Time for data to travel from source to destination (milliseconds) | Lower is better; can cause delays |
| Collision Domain | Network segment where packets can collide if sent simultaneously | Hubs = large domain; switches = small domains |
| Broadcast Domain | Network segment that receives broadcast traffic | Entire LAN without routers; subnets reduce this |
| Packet Loss | Percentage of packets that don’t reach destination | Causes retransmission delays |
| Jitter | Variation in latency between packets | Bad for real-time traffic (video calls, gaming) |
Why Network Design Affects Performance
Problem: Single Central Router for 1000 Employees
- All traffic passes through ONE device = bottleneck
- Creates congestion during peak hours
- Slow speeds for everyone when one department uses bandwidth
Solution: Network Segmentation
- Divide large network into smaller subnets using switches/routers
- Each department on separate segment
- Reduces overall router load
- Isolates broadcast traffic within departments
- Example: Developers, Marketing, Management on separate switches
- Benefit: Heavy file uploads in IT don’t affect Finance’s speed
Network Topologies
| Topology | Description | Advantages | Disadvantages | Best For |
|---|---|---|---|---|
| Star | All devices connect to central hub/switch | Easy to manage; isolated failures; good performance | Central point failure = network down | LANs, offices, homes |
| Bus | All devices share single communication line | Cheap, simple | Collisions increase with devices; cable break = network down | Temporary networks, small offices |
| Ring | Devices connected in circle; data flows one direction | Reduces collisions; fair access; deterministic | One failure can break ring; latency increases with size | Universities, LANs with predictable traffic |
| Mesh (Full) | Every device connects to every other device | Extremely redundant; any path works; excellent performance | Expensive (n² connections); complex administration | Data centers, critical systems |
| Mesh (Partial) | Devices connect to multiple (but not all) others | Balance of redundancy and cost | More complex than star | Enterprise networks |
| Hybrid | Combination of topologies (e.g., star-bus) | Flexible; scalable; optimize per department | Complex design; expensive | Large organizations, universities |
1.4 Network Components & Their Functions
| Component | Function | Layer | Example |
|---|---|---|---|
| Modem | Converts digital signals ↔ analog signals; connects computer to ISP | Layer 1 (Network Access) | Digital modem for cable internet |
| Router | Forwards data between networks based on destination IP address; manages internet connection | Layers 2-3 (Internet) | Home router 192.168.1.1 |
| Switch | Connects devices within same LAN; forwards frames to specific MAC address port | Layer 1 (Network Access) | Managed switch in office |
| Wireless Access Point (WAP) | Broadcasts Wi-Fi signal for wireless device connection | Layer 1 (Network Access) | Wi-Fi router in café |
| Firewall | Filters traffic based on security rules; blocks unauthorized connections | Layers 3-4 | Enterprise firewall |
| Network Interface Card (NIC) | Physical hardware with MAC address for network connection | Layer 1 | Ethernet card, Wi-Fi adapter |
| Gateway | Translates between different protocols or network types | Variable | VPN gateway |
1.5 IP Addressing & Subnetting
Understanding IP Addresses
IPv4 Address Structure:
- Format: 192.168.1.25
- 32 bits total, divided into 4 octets (8 bits each)
- Each octet = 0-255
- Contains Network ID (which network) and Host ID (which device on network)
Example Breaking Down 192.168.1.25/24:
- Network ID: 192.168.1.0 (first 24 bits determine network)
- Host ID: .25 (last 8 bits identify device on that network)
- This network can have 254 usable addresses (.1 to .254)
Subnet Masks
Subnet masks divide IP address into network and host portions
How They Work:
- 32-bit number (like IP address)
- 1s represent network portion, 0s represent host portion
- Example: 255.255.255.0 = 11111111.11111111.11111111.00000000
- Example: 255.255.255.192 = 11111111.11111111.11111111.11000000
Common Subnet Masks:
- /24 (255.255.255.0) = 254 usable hosts
- /25 (255.255.255.128) = 126 usable hosts
- /26 (255.255.255.192) = 62 usable hosts
- /27 (255.255.255.224) = 30 usable hosts
- /28 (255.255.255.240) = 14 usable hosts
- /30 (255.255.255.252) = 2 usable hosts (for point-to-point links)
Subnetting Calculations
Formula for Usable Hosts:
Usable Hosts = 2^h - 2
Where h = number of host bits (32 - network bits)
Subtract 2 for network address and broadcast address
Example: /26 Subnet Mask
- Network bits: 26
- Host bits: 32 - 26 = 6
- Total addresses: 2^6 = 64
- Usable addresses: 64 - 2 = 62 (minus network .0 and broadcast .63)
- Subnet increment: 64 addresses apart
Practical Example:
- Base network: 192.115.110.0/26
- Subnet 1: 192.115.110.0 to 192.115.110.63
- Subnet 2: 192.115.110.64 to 192.115.110.127
- Subnet 3: 192.115.110.128 to 192.115.110.191
- Subnet 4: 192.115.110.192 to 192.115.110.255
IPv4 vs IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Size | 32 bits | 128 bits |
| Total Addresses | ~4.3 billion | 340 undecillion (virtually unlimited) |
| Status | Becoming exhausted | Future standard |
| Header Complexity | Complex | Simplified (faster routing) |
| NAT | Required | Not needed |
| Security | Added later | Built-in (IPsec) |
| Adoption Speed | Very slow (complex to migrate) | Gradual (compatibility issues with older devices) |
Why Transition is Slow:
- Compatibility Issues: Old routers, switches, servers don’t support IPv6
- Legacy Systems: Many critical systems still use IPv4
- Cost: Upgrading hardware is expensive
- Complexity: Migration planning takes significant resources
- IPv4 Still Works: No urgent pressure since solutions like NAT extend IPv4 life
Default Gateway
The “exit door” for external traffic
- IP address of the router on your local network
- Devices send all external traffic here first
- Router then forwards to destination
Example:
- Device IP: 192.168.1.100/24
- Default Gateway: 192.168.1.1 (the router)
- When accessing google.com, packet goes to router first, then to internet
SECTION 2: PROGRAMMING CONCEPTS & GOOD PRACTICE
2.1 The 9 Core Good Programming Practices
1. Validate Input Before Processing
- What: Check input is correct type and reasonable range BEFORE using it
- Why: Prevents crashes and security vulnerabilities
- Example:
try:
age = int(input("Enter age: "))
if age < 0 or age > 150:
print("Invalid age - must be 0-150")
except ValueError:
print("Invalid input - must be a number")
- Exam Answer: “Validates input before processing to prevent errors and handle unexpected user input safely”
2. Use Meaningful Variable Names
- What: Names describe what data stores, not cryptic abbreviations
- Good Names:
total_marks,student_name,account_balance - Bad Names:
x,data,tmp,thing,value - Why: Makes code readable for you later and other developers
- Exam Answer: “Good names make code readable and maintainable”
3. Use Constants for Fixed Values
- What: Store important fixed values as CONSTANTS (ALL_CAPS) at top of program
- Format:
MAX_ATTEMPTS = 3,TAX_RATE = 0.1,PI = 3.14159 - Why: Easy to change once instead of finding every instance
- Example:
TAX_RATE = 0.1 # Easy to update if tax changes
total = price + (price * TAX_RATE)
- Exam Answer: “Constants keep important values in one place, making them easy to update”
4. Use Comments to Explain Code
- Good Comments: Explain tricky logic or WHY something is done
- Bad Comments: Repeat what code obviously does
- Good:
# Skip first element because it's always 0 - Bad:
# x = x + 1 (this just repeats the code) - When: Complex algorithms, non-obvious decisions, business logic
- Avoid: Comment on every line
- Exam Answer: “Comments explain complex logic and why decisions were made, aiding future maintenance”
5. Appropriate Control Structures
- Sequence: Do steps in order (calculate → display)
- Selection: IF/ELSE for conditional logic (check if pass/fail)
- Iteration: FOR/WHILE loops for repeating tasks (validate input until correct)
- Example: Use WHILE loop for input validation (repeat until valid)
while True:
try:
score = int(input("Enter score 0-100: "))
if 0 <= score <= 100:
break
except ValueError:
print("Invalid input")
6. Proper Indentation & White Space
- Why: Python requires indentation to define code blocks
- Block Definition: Shows what’s inside if/while/for/function
- Standard: 4 spaces per indent level (not tabs)
- Readability: Proper spacing makes code clear
if score >= 50: # Level 0
print("Pass") # Level 1 (inside if)
if score >= 80: # Still level 1
print("High") # Level 2 (inside nested if)
7. One Logical Task Per Module (File)
- What: Each file has single purpose
- Good Names:
file_io.py(file operations),calculations.py(math) - Bad Names:
stuff.py,random.py,newfinal_v2_actual.py - Why: Find code quickly, understand purpose without reading
- Benefit: Easier testing and debugging
8. Meaningful Names for Modules
- What: File names describe what’s inside
- Purpose: Quickly understand what module does
- Example:
student_database.py(clear purpose)module1.py(no idea what it does)
- Exam Point: “Clear names reduce time searching for functionality”
9. Exception Handling
- When: Code might fail (type conversion, file operations, network calls)
- Use:
try/exceptblocks to catch errors gracefully - Example:
try:
age = int(input("Enter age: ")) # Might fail with ValueError
except ValueError:
print("Please enter a valid number")
- Why: Graceful error messages instead of crash
- Exam Answer: “Exception handling allows graceful error handling instead of program crashes”
2.2 Additional Important Practices
Clear & Uncluttered Mainline
- Main function should show high-level logic
- Move implementation details into separate functions
- Makes program flow obvious
One Logical Task Per Function
- Function should do ONE thing and do it well
- Makes testing easier
- Makes debugging faster
- Improves reusability
- Example:
calculate_total()should ONLY calculate; let main function handle display
Using Stubs
- Definition: Placeholder function you plan to implement later
- When: Breaking down large projects into parts
- Example:
def validate_password():
pass # Will implement later
def authenticate_user():
pass # Will implement later
- Benefit: Can test program structure before finishing all functions
Writing for Maintenance
- Goal: Future developer (or you!) can understand code quickly
- Techniques:
- Clear variable names
- Meaningful constants
- Small functions
- Helpful comments (not obvious ones)
- Consistent formatting
Version Control (Git)
- What: Keep history of code changes
- Benefits:
- Revert mistakes
- Collaborate with team
- See who changed what when
- Tools: Git, GitHub
- Exam Point: “Essential for team projects and preventing data loss”
Regular Backup
- Best Practice: Keep copies in multiple locations
- Examples:
- Desktop + external USB drive
- Local computer + cloud storage (Google Drive, OneDrive, GitHub)
- Avoid: Saving only to one location
- Protection: Prevents loss from drive failure, accidental deletion, ransomware
Social & Ethical Issues in Software
These appear on exams — know them!
-
Privacy: How is user data collected, stored, and protected?
- Example: Does app sell user data to advertisers?
-
Security: Are user credentials and data properly protected?
- Example: Are passwords hashed? Is data encrypted?
-
Accessibility: Can people of all abilities use the software?
- Example: Do visually impaired users have screen reader support?
-
Bias & Fairness: Does algorithm discriminate against groups?
- Example: Does hiring algorithm bias against certain demographics?
-
Sustainability: What’s environmental impact?
- Example: Does app use minimal battery/processing power?
-
Intellectual Property: Are open-source licenses respected?
- Example: Did you acknowledge code sources? Is licensing followed?
2.3 Pseudocode Control Structures
Sequence
INPUT(price)
total_price = price + (price * 0.1)
PRINT(total_price)
price = float(input("Enter price: "))
total_price = price + (price * 0.1)
print(total_price)
Selection (IF/ELSE)
INPUT(score)
IF score >= 50 THEN
PRINT("Pass")
ELSE
PRINT("Fail")
END IF
score = int(input("Enter score: "))
if score >= 50:
print("Pass")
else:
print("Fail")
Iteration (FOR loop)
INPUT(n)
FOR i = 1 TO n
PRINT(i)
END FOR
n = int(input("Enter n: "))
for i in range(1, n + 1):
print(i)
Iteration (WHILE loop)
valid = False
WHILE NOT valid DO
INPUT(age)
IF age >= 18 THEN
valid = True
END IF
END WHILE
valid = False
while not valid:
age = int(input("Enter age: "))
if age >= 18:
valid = True
Functions/Modularization
FUNCTION EURtoAUD(euros)
dollars = euros * 1.6574
RETURN dollars
END FUNCTION
FUNCTION Main
INPUT(amount)
result = EURtoAUD(amount)
OUTPUT(result)
END FUNCTION
def eur_to_aud(euros):
dollars = euros * 1.6574
return dollars
def main():
amount = float(input("Enter amount in EUR: "))
result = eur_to_aud(amount)
print(result)
main()
2.4 Testing & Debugging
Desk Checking
- Definition: Manually tracing through code on paper with test data
- How: Write down variables, their values, and conditions as code executes
- When: Before running code or when bugs found
- Advantage: Understand exactly what code does
- Disadvantage: Slow for large programs; can miss edge cases
Stepping Through Code (Debugger)
- Definition: Running code line-by-line with debugger tool
- How: Set breakpoints, run, inspect variables at each step
- When: Debugging errors or understanding complex logic
- Advantage: See actual variable values; can watch code execute
- Disadvantage: Takes time; must navigate through entire execution
Test Data Types
| Type | Purpose | Example |
|---|---|---|
| Valid Input | Normal expected data | Age 25 (in 0-150 range) |
| Invalid Type | Wrong data type | Age “twenty” instead of 20 |
| Out of Range | Outside acceptable values | Age -5 or age 200 |
| Boundary/Edge | Min and max valid values | Age 0 or age 100 (limits) |
| Typical | Most common input | Age 30 for driving license |
Common Error Types
- Syntax Error: Code violates language rules (missing colon, wrong indentation)
- Logic Error: Code runs but produces wrong result (variable flipped in comparison)
- Runtime Error: Code runs but crashes (division by zero, index out of bounds)
2.5 Data Types
| Data Type | Purpose | Example | Python |
|---|---|---|---|
| Integer | Whole numbers | 42, -10, 0 | int |
| Float | Decimal numbers | 3.14, -2.5 | float |
| String | Text | ”Hello”, “2025-03-31” | str |
| Boolean | True/False | True, False | bool |
| List | Ordered collection | [1, 2, 3, “apple”] | list |
| Dictionary | Key-value pairs | {“name”: “John”, “age”: 25} | dict |
2.6 Boolean Logic & Precedence
Operator Precedence (highest to lowest):
- NOT (highest precedence)
- AND
- OR (lowest precedence)
- Parentheses override:
(a OR b) AND c
Example:
a = True, b = False, c = True
result = a AND (b OR NOT c)
Step 1: NOT c = NOT True = False
Step 2: b OR False = False OR False = False
Step 3: a AND False = True AND False = False
Answer: False
a = True
b = False
c = True
result = a and (b or not c)
print(result) # False
SECTION 3: ALGORITHMS & PSEUDOCODE
3.1 Structured Algorithms
Finding Market Price (Example)
FUNCTION find_market_price(produce_name)
prices = {"apple": 2.50, "banana": 1.20, "orange": 1.80}
IF produce_name IN prices THEN
RETURN prices[produce_name]
ELSE
RETURN "Item not found"
END IF
END FUNCTION
FUNCTION Main
OUTPUT("Welcome to Market Price Finder")
OUTPUT("Type 'exit' to quit")
WHILE True DO
INPUT(item)
IF item == "exit" THEN
OUTPUT("Goodbye!")
BREAK
ELSE
price = find_market_price(item)
OUTPUT(price)
END IF
END WHILE
END FUNCTION
def find_market_price(produce_name):
prices = {"apple": 2.50, "banana": 1.20, "orange": 1.80}
if produce_name in prices:
return prices[produce_name]
else:
return "Item not found"
def main():
print("Welcome to Market Price Finder")
print("Type 'exit' to quit")
while True:
item = input("Enter item: ")
if item == "exit":
print("Goodbye!")
break
else:
price = find_market_price(item)
print(price)
main()
Checking Palindrome (Example)
FUNCTION is_palindrome(word)
reversed = ""
FOR i = length(word) DOWN TO 1
reversed = reversed + word[i]
END FOR
RETURN word == reversed
END FUNCTION
FUNCTION Main
INPUT(user_input)
IF is_palindrome(user_input) THEN
OUTPUT(user_input + " is a palindrome")
ELSE
OUTPUT(user_input + " is not a palindrome")
END IF
END FUNCTION
def is_palindrome(word):
reversed_word = word[::-1]
return word == reversed_word
def main():
user_input = input("Enter a word: ")
if is_palindrome(user_input):
print(user_input + " is a palindrome")
else:
print(user_input + " is not a palindrome")
main()
Benefits of Modularization
- Easy Testing: Test each function separately
- Reusability: Use same function in multiple places
- Readability: Complex code broken into understandable pieces
- Maintenance: Fix one function without breaking others
- Team Development: Different people work on different functions
3.2 Common Algorithms
Input Validation Loop
valid = False
WHILE NOT valid DO
INPUT(age)
IF age >= 0 AND age <= 150 THEN
valid = True
ELSE
OUTPUT("Enter age between 0 and 150")
END IF
END WHILE
valid = False
while not valid:
age = int(input("Enter age: "))
if 0 <= age <= 150:
valid = True
else:
print("Enter age between 0 and 150")
Finding Maximum/Minimum
max_val = numbers[0]
FOR num IN numbers DO
IF num > max_val THEN
max_val = num
END IF
END FOR
OUTPUT(max_val)
numbers = [3, 7, 1, 9, 4]
max_val = numbers[0]
for num in numbers:
if num > max_val:
max_val = num
print(max_val)
Counting Occurrences
count = 0
FOR item IN list DO
IF item == target THEN
count = count + 1
END IF
END FOR
OUTPUT(count)
items = ["cat", "dog", "cat", "bird", "cat"]
target = "cat"
count = 0
for item in items:
if item == target:
count = count + 1
print(count)
SECTION 4: PAST EXAM QUESTIONS & COMPREHENSIVE ANSWERS
4.1 Common Question Patterns
Network Diagram Questions
Pattern: Draw network for company/school with multiple departments
Key Components to Include:
- Internet (cloud icon)
- Modem (converts to digital)
- Firewall (security barrier)
- Router (main distribution point)
- Switches (one per department/segment)
- Wireless Access Points (for Wi-Fi areas)
- Devices (computers, printers, servers)
- Servers (file, database, web)
Standard Layout:
Internet → Modem → Firewall → Router ↓
├─ Switch-HR → Computers + Printer
├─ Switch-IT → Desktops + Servers
└─ Switch-Admin → Laptops + WAP
Marking Points:
- Each component clearly labeled ✓
- Lines showing connections ✓
- Appropriate use of standard icons ✓
- Logical grouping by department ✓
- Fire wall between internet and internal ✓
TCP/IP Model Questions
Pattern: “Complete the table with layers and examples”
Full Answer Template:
| Layer | Description | Protocols | Example |
|---|---|---|---|
| Application (4) | Provides user-facing services; protocols for apps to communicate | HTTP, HTTPS, SMTP, FTP, DNS | User opens browser to access website |
| Transport (3) | End-to-end data delivery; divides into packets; handles reliability | TCP, UDP | TCP ensures reliable email delivery |
| Internet (2) | IP addressing and routing across networks; finds best path | IP, ICMP, ARP | Routers forward packet to destination IP |
| Network Access (1) | Physical transmission; hardware addressing; converts to signals | Ethernet, Wi-Fi, MAC | Laptop’s Wi-Fi adapter sends radio waves |
IP Addressing Questions
Pattern: “Calculate usable hosts in subnet” or “Assign IPs to departments”
Process:
- Count network bits (from CIDR notation /25)
- Calculate host bits (32 - network bits)
- Calculate total addresses (2^host bits)
- Subtract 2 (network broadcast)
- Result = usable addresses
Example:
- Q: Subnet mask /26 has how many usable addresses?
- A: 32 - 26 = 6 host bits → 2^6 = 64 total → 64 - 2 = 62 usable
Security Questions
Pattern: “Explain role of firewall” or “Why is OS security important”
Firewall Answer: Monitors and filters all incoming/outgoing traffic based on security rules. Blocks unauthorized connections and malicious packets. Acts as first defense against hacking and malware.
OS Security Answer: Manages user authentication, delivers security patches, provides access control, includes built-in security tools, restricts user permissions.
Performance Questions
Pattern: “Why is network slow?” or “How to improve performance?”
Problem Recognition:
- Multiple users through single router = bottleneck
- Poor topology choices = collisions
- Insufficient bandwidth = congestion
Solutions:
- Network segmentation (create separate subnets per department)
- Better topology (star instead of bus)
- Additional routers/switches to distribute load
- Increase bandwidth
4.2 2025 Exam Key Answers
Question 1 (Python Scope)
Part a) Expected Output:
4
10
12
Part b) Global Variable:
- Variable:
number - Why: Defined outside any function, accessible throughout entire program
Question 5 (Hexadecimal Conversion)
FF₁₆ to Decimal₁₀:
- F = 15 (in decimal)
- (FF)₁₆ = (15 × 16¹) + (15 × 16⁰)
- = 240 + 15
- = 255
Question 6 (OS Security)
Answer Points:
- Manages user authentication (passwords, biometrics)
- Enforces access control and permissions
- Delivers regular security patches
- Includes built-in firewall
- Maintains audit logs
Question 8 (Boolean Logic)
Part a) Output: False
Part b) Precedence Order:
- NOT (highest)
- AND
- OR (lowest)
Question 14 (TCP Purpose)
Answer:
- Ensures reliable, ordered delivery of data
- Detects and retransmits lost packets
- Establishes connection before transmitting
- Essential for web browsing, email, file transfer
SECTION 5: KEY FORMULAS & CALCULATIONS
Usable Hosts Formula
Where h = number of host bits
Common Subnet Mask Calculations
- /24 = 2^8 - 2 = 254 hosts
- /25 = 2^7 - 2 = 126 hosts
- /26 = 2^6 - 2 = 62 hosts
- /27 = 2^5 - 2 = 30 hosts
- /28 = 2^4 - 2 = 14 hosts
Hexadecimal to Decimal
Example: AB₁₆ = (10 × 16) + (11 × 1) = 160 + 11 = 171₁₀
SECTION 6: QUICK REFERENCE TABLE
Protocol Quick Lookup
| Protocol | Layer | Function | Example Use |
|---|---|---|---|
| HTTP/HTTPS | 4 | Web browsing | Access websites |
| SMTP | 4 | Email sending | Gmail send |
| FTP | 4 | File transfer | Download files |
| DNS | 4 | Domain → IP | www.google.com → 142.251.41.46 |
| TCP | 3 | Reliable delivery | Email, web browsing |
| UDP | 3 | Fast delivery | Video streaming, gaming |
| IP | 2 | Routing, addressing | Internet communication |
| ICMP | 2 | Error messages | Ping utility |
| ARP | 2 | IP → MAC mapping | Find device on LAN |
| Ethernet | 1 | Wired transmission | LAN cables |
| Wi-Fi | 1 | Wireless transmission | Wireless networks |
Component Summary
| Component | Function | Key Feature |
|---|---|---|
| Router | Forwards between networks | Uses IP addresses |
| Switch | Connects devices in LAN | Uses MAC addresses |
| Modem | Converts digital ↔ analog | ISP connection |
| WAP | Wireless broadcasting | Wi-Fi signal |
| Firewall | Traffic filtering | Security rules |
📊 Cheatsheet Verification Against Past Exams
✅ Covers ALL 2025 Exam Questions:
- Python scope and output (Q1)
- Gantt charts and project management (Q2)
- Plagiarism definition (Q3)
- TCP/IP model layers (Q4)
- Hexadecimal conversion (Q5)
- OS security role (Q6)
- Data types (Q7)
- Boolean logic and precedence (Q8)
- Network congestion solutions (Q9)
- Function creation and comments (Q10)
- Pseudocode control structures (Q11)
- IPv6 migration challenges (Q12)
- Test data and edge cases (Q13)
- TCP protocol purpose (Q14)
- Palindrome algorithms and modularization (Q15)
- API usage and benefits (Q16)
- Testing types (unit vs acceptance) (Q17)
- Password validation (Q18)
- Market price finder algorithm (Q19)
- Seasonal subscription functions (Q20)
- Desk checking and debugging (Q21)
- Modem vs router roles (Q22)
✅ Covers ALL 2024, 2023, 2021 Patterns (Same questions repeated)
✅ Test Strategy: Focus on:
- TCP/IP model (ALWAYS appears) — 15-20% of exam
- Network design and diagrams (ALWAYS appears) — 15-20% of exam
- IP/Subnet calculations (ALWAYS appears) — 5-10% of exam
- Good programming practices (ALWAYS appears) — 15-20% of exam
- Pseudocode and algorithms (ALWAYS appears) — 15-20% of exam
- Testing and debugging (ALWAYS appears) — 5-10% of exam
- Network security and performance (ALWAYS appears) — 10-15% of exam
🎯 Before Your Exam
- ✓ Read definitions for each layer of TCP/IP model
- ✓ Practice drawing network diagrams with all components labeled
- ✓ Work through subnet calculations (practice at least 5)
- ✓ Review the 9 good programming practices — be able to name and explain each
- ✓ Write pseudocode examples for sequence, selection, iteration
- ✓ Take the 30 MCQ questions and 30 flashcards above — aim for 90%+
- ✓ Review past exam solutions (2021-2025) — patterns repeat!
Final Tip: This cheatsheet has enough detail to take you from zero preparation to an A+ grade. Read it once for overview, then focus on bolded sections and tables before the exam. You’ve got this! 💪