AECSC Semester 1 Exam Cheatsheet

Year 11 Computer Science Semester 1 Exam Cheatsheet


How to Use This Guide

  1. Use this as a quick recap before exams
  2. Focus first on definitions, formulas, and key trends
  3. Work through the past exam questions
  4. 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
  • 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:

  1. User Authentication — manages usernames/passwords, biometrics, tokens to verify identity
  2. Access Control — restricts what users can access (files, directories, resources)
  3. Firewall & Network Configuration — includes built-in firewalls and network settings
  4. Regular Security Updates — patches fix vulnerabilities before they’re exploited
  5. Audit Logs — tracks who accessed what and when
  6. 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

TermDefinitionKey Points
BandwidthMaximum data that CAN be transmitted in given time (measured in Mbps or Gbps)Infrastructure limit; like highway width
ThroughputActual data SUCCESSFULLY transmitted (measured in Mbps or Gbps)Usually less than bandwidth due to latency, packet loss
LatencyTime for data to travel from source to destination (milliseconds)Lower is better; can cause delays
Collision DomainNetwork segment where packets can collide if sent simultaneouslyHubs = large domain; switches = small domains
Broadcast DomainNetwork segment that receives broadcast trafficEntire LAN without routers; subnets reduce this
Packet LossPercentage of packets that don’t reach destinationCauses retransmission delays
JitterVariation in latency between packetsBad 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

TopologyDescriptionAdvantagesDisadvantagesBest For
StarAll devices connect to central hub/switchEasy to manage; isolated failures; good performanceCentral point failure = network downLANs, offices, homes
BusAll devices share single communication lineCheap, simpleCollisions increase with devices; cable break = network downTemporary networks, small offices
RingDevices connected in circle; data flows one directionReduces collisions; fair access; deterministicOne failure can break ring; latency increases with sizeUniversities, LANs with predictable traffic
Mesh (Full)Every device connects to every other deviceExtremely redundant; any path works; excellent performanceExpensive (n² connections); complex administrationData centers, critical systems
Mesh (Partial)Devices connect to multiple (but not all) othersBalance of redundancy and costMore complex than starEnterprise networks
HybridCombination of topologies (e.g., star-bus)Flexible; scalable; optimize per departmentComplex design; expensiveLarge organizations, universities

1.4 Network Components & Their Functions

ComponentFunctionLayerExample
ModemConverts digital signals ↔ analog signals; connects computer to ISPLayer 1 (Network Access)Digital modem for cable internet
RouterForwards data between networks based on destination IP address; manages internet connectionLayers 2-3 (Internet)Home router 192.168.1.1
SwitchConnects devices within same LAN; forwards frames to specific MAC address portLayer 1 (Network Access)Managed switch in office
Wireless Access Point (WAP)Broadcasts Wi-Fi signal for wireless device connectionLayer 1 (Network Access)Wi-Fi router in café
FirewallFilters traffic based on security rules; blocks unauthorized connectionsLayers 3-4Enterprise firewall
Network Interface Card (NIC)Physical hardware with MAC address for network connectionLayer 1Ethernet card, Wi-Fi adapter
GatewayTranslates between different protocols or network typesVariableVPN 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

FeatureIPv4IPv6
Address Size32 bits128 bits
Total Addresses~4.3 billion340 undecillion (virtually unlimited)
StatusBecoming exhaustedFuture standard
Header ComplexityComplexSimplified (faster routing)
NATRequiredNot needed
SecurityAdded laterBuilt-in (IPsec)
Adoption SpeedVery slow (complex to migrate)Gradual (compatibility issues with older devices)

Why Transition is Slow:

  1. Compatibility Issues: Old routers, switches, servers don’t support IPv6
  2. Legacy Systems: Many critical systems still use IPv4
  3. Cost: Upgrading hardware is expensive
  4. Complexity: Migration planning takes significant resources
  5. 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/except blocks 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!

  1. Privacy: How is user data collected, stored, and protected?

    • Example: Does app sell user data to advertisers?
  2. Security: Are user credentials and data properly protected?

    • Example: Are passwords hashed? Is data encrypted?
  3. Accessibility: Can people of all abilities use the software?

    • Example: Do visually impaired users have screen reader support?
  4. Bias & Fairness: Does algorithm discriminate against groups?

    • Example: Does hiring algorithm bias against certain demographics?
  5. Sustainability: What’s environmental impact?

    • Example: Does app use minimal battery/processing power?
  6. 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

TypePurposeExample
Valid InputNormal expected dataAge 25 (in 0-150 range)
Invalid TypeWrong data typeAge “twenty” instead of 20
Out of RangeOutside acceptable valuesAge -5 or age 200
Boundary/EdgeMin and max valid valuesAge 0 or age 100 (limits)
TypicalMost common inputAge 30 for driving license

Common Error Types

  1. Syntax Error: Code violates language rules (missing colon, wrong indentation)
  2. Logic Error: Code runs but produces wrong result (variable flipped in comparison)
  3. Runtime Error: Code runs but crashes (division by zero, index out of bounds)

2.5 Data Types

Data TypePurposeExamplePython
IntegerWhole numbers42, -10, 0int
FloatDecimal numbers3.14, -2.5float
StringText”Hello”, “2025-03-31”str
BooleanTrue/FalseTrue, Falsebool
ListOrdered collection[1, 2, 3, “apple”]list
DictionaryKey-value pairs{“name”: “John”, “age”: 25}dict

2.6 Boolean Logic & Precedence

Operator Precedence (highest to lowest):

  1. NOT (highest precedence)
  2. AND
  3. OR (lowest precedence)
  4. 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

  1. Easy Testing: Test each function separately
  2. Reusability: Use same function in multiple places
  3. Readability: Complex code broken into understandable pieces
  4. Maintenance: Fix one function without breaking others
  5. 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:

  1. Internet (cloud icon)
  2. Modem (converts to digital)
  3. Firewall (security barrier)
  4. Router (main distribution point)
  5. Switches (one per department/segment)
  6. Wireless Access Points (for Wi-Fi areas)
  7. Devices (computers, printers, servers)
  8. 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:

LayerDescriptionProtocolsExample
Application (4)Provides user-facing services; protocols for apps to communicateHTTP, HTTPS, SMTP, FTP, DNSUser opens browser to access website
Transport (3)End-to-end data delivery; divides into packets; handles reliabilityTCP, UDPTCP ensures reliable email delivery
Internet (2)IP addressing and routing across networks; finds best pathIP, ICMP, ARPRouters forward packet to destination IP
Network Access (1)Physical transmission; hardware addressing; converts to signalsEthernet, Wi-Fi, MACLaptop’s Wi-Fi adapter sends radio waves

IP Addressing Questions

Pattern: “Calculate usable hosts in subnet” or “Assign IPs to departments”

Process:

  1. Count network bits (from CIDR notation /25)
  2. Calculate host bits (32 - network bits)
  3. Calculate total addresses (2^host bits)
  4. Subtract 2 (network broadcast)
  5. 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:

  1. NOT (highest)
  2. AND
  3. 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

Usable Hosts=2h2\text{Usable Hosts} = 2^h - 2 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

Value=idigiti×16i\text{Value} = \sum_{i} \text{digit}_i \times 16^i

Example: AB₁₆ = (10 × 16) + (11 × 1) = 160 + 11 = 171₁₀


SECTION 6: QUICK REFERENCE TABLE

Protocol Quick Lookup

ProtocolLayerFunctionExample Use
HTTP/HTTPS4Web browsingAccess websites
SMTP4Email sendingGmail send
FTP4File transferDownload files
DNS4Domain → IPwww.google.com → 142.251.41.46
TCP3Reliable deliveryEmail, web browsing
UDP3Fast deliveryVideo streaming, gaming
IP2Routing, addressingInternet communication
ICMP2Error messagesPing utility
ARP2IP → MAC mappingFind device on LAN
Ethernet1Wired transmissionLAN cables
Wi-Fi1Wireless transmissionWireless networks

Component Summary

ComponentFunctionKey Feature
RouterForwards between networksUses IP addresses
SwitchConnects devices in LANUses MAC addresses
ModemConverts digital ↔ analogISP connection
WAPWireless broadcastingWi-Fi signal
FirewallTraffic filteringSecurity 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:

  1. TCP/IP model (ALWAYS appears) — 15-20% of exam
  2. Network design and diagrams (ALWAYS appears) — 15-20% of exam
  3. IP/Subnet calculations (ALWAYS appears) — 5-10% of exam
  4. Good programming practices (ALWAYS appears) — 15-20% of exam
  5. Pseudocode and algorithms (ALWAYS appears) — 15-20% of exam
  6. Testing and debugging (ALWAYS appears) — 5-10% of exam
  7. Network security and performance (ALWAYS appears) — 10-15% of exam

🎯 Before Your Exam

  1. ✓ Read definitions for each layer of TCP/IP model
  2. ✓ Practice drawing network diagrams with all components labeled
  3. ✓ Work through subnet calculations (practice at least 5)
  4. ✓ Review the 9 good programming practices — be able to name and explain each
  5. ✓ Write pseudocode examples for sequence, selection, iteration
  6. ✓ Take the 30 MCQ questions and 30 flashcards above — aim for 90%+
  7. ✓ 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! 💪