Notes, summaries, assignments, exams, and problems for Computers

Sort by
Subject
Level

Data Structures and Algorithms Practice Problems

Posted by Anonymous and classified in Computers

Written on in English with a size of 338.98 KB

Q1. Array Address Calculation (Row & Column Major)

Problem: An array ARR[-5...15, 10...20] stores elements in Row Major with each element requiring 2 bytes. Base address is 2500. Find the address of ARR[10][15].

Answer:

  • Row range: -5 to 15, so Lr = -5, Ur = 15
  • Column range: 10 to 20, so Lc = 10, Uc = 20
  • Element size (w) = 2 bytes
  • Base Address (BA) = 2500

Step 1: Calculate dimensions

  • Number of rows (M) = Ur - Lr + 1 = 15 - (-5) + 1 = 21
  • Number of columns (N) = Uc - Lc + 1 = 20 - 10 + 1 = 11

Step 2: Row Major Order Formula

Address(A[i][j]) = BA + [(i - Lr) × N + (j - Lc)] × w
Address(ARR[10][15]) = 2500 + [(10 - (-5)) × 11 + (15 - 10)] × 2
= 2500 + [15 × 11 + 5] × 2
= 2500 + [165 + 5] × 2
= 2500 + 170 × 2 = 2840

Step 3: Column Major Order Formula

Address(... Continue reading "Data Structures and Algorithms Practice Problems" »

Digital Electronics CIE-1 Exam Preparation

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.49 KB

Here is a complete and concise answer sheet for your Digital Electronics CIE-1 preparation based on your questions:


1. Design Half and Full Subtractor with Truth Table

Half Subtractor

  • Inputs: A, B
  • Outputs: Difference (D), Borrow (Bo)
  • Logic Equations:
    • Difference (D) = A ⊕ B
    • Borrow (Bo) = A' · B

Full Subtractor

  • Inputs: A, B, Bin (Borrow In)
  • Outputs: Difference (D), Borrow Out (Bo)
  • Logic Equations:
    • D = A ⊕ B ⊕ Bin
    • Bo = B · Bin + B · A' + A' · Bin

2. Working of Adder and Subtractor

Adder Circuits

  • Half Adder: Adds two bits A and B.
    • Sum = A ⊕ B, Carry = A · B
  • Full Adder: Adds three bits A, B, and Cin.
    • Sum = A ⊕ B ⊕ Cin, Cout = AB + ACin + BCin

Subtractor Circuits

  • Half Subtractor: Subtracts B from A.
    • Difference = A ⊕ B, Borrow = A' · B
  • Full Subtractor:
... Continue reading "Digital Electronics CIE-1 Exam Preparation" »

Essential Python Recursion and Pandas Data Analysis

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.86 KB

Recursive Functions in Python

def range_sum(num_list, start, end):
    if start > end:          # Base case
        return 0
    else:                    # Recursive case
        return num_list[start] + range_sum(num_list, start + 1, end)

numbers = [2, 4, 6, 8, 10]
print(range_sum(numbers, 1, 3))  # Expected output: 18

Tower of Hanoi

def hanoi(n, from_peg, to_peg, temp_peg):
    if n > 0:
        # Step 1: Move n-1 discs to temp peg
        hanoi(n - 1, from_peg, temp_peg, to_peg)
        # Step 2: Move the bottom disc
        print(f"Move disc from peg {from_peg} to peg {to_peg}")
        # Step 3: Move n-1 discs from temp peg to target peg
        hanoi(n - 1, temp_peg, to_peg, from_peg)

Greatest Common Divisor

def gcd(x, y):
    if x
... Continue reading "Essential Python Recursion and Pandas Data Analysis" »

Mastering LVM: Dynamic Storage Management in Linux

Classified in Computers

Written on in English with a size of 3.44 KB

Logical Volume Management (LVM) in Linux Storage

F. The the vast realm of operating systems, Linux has emerged as a robust and versatile choice, powering everything from personal computers to enterprise-level servers. One of its standout features is Logical Volume Management (LVM), a powerful storage management system that offers enhanced flexibility, scalability, and reliability for handling storage devices in Linux environments. LVM revolutionizes how disk partitions and physical storage are managed, providing an abstract layer that simplifies storage administration and facilitates efficient utilization of available resources. By introducing logical volumes, volume groups, and physical volumes (PVs) (originally referred to as "physical books"... Continue reading "Mastering LVM: Dynamic Storage Management in Linux" »

Essential Software Design Patterns and Testing Techniques

Posted by Anonymous and classified in Computers

Written on in English with a size of 6.26 KB

Domain Model

  • Shows concepts only: classes, attributes, associations, and multiplicities.
  • No methods, no UI, and no controllers are included.
  • Purpose: To understand the real-world objects involved in the system.

Use Case Model (Module 6)

  • Focuses on Actor ↔ System interaction.
  • Uses the Verb + Noun naming convention.
  • Format: Defines Actor steps versus System steps.
  • Use cases serve as input for sequence diagrams, which inform class diagrams.

UML Class Diagram (Module 7)

  • Class Components: Name, attributes, and methods.
  • Association: Line connecting classes with multiplicity (1, 0..1, *, 1..*).
  • Inheritance: Represented by an open triangle arrow symbol.
  • Interface: Indicated by the «interface» stereotype.
  • DCD (Design Class Diagram): Explicitly includes methods
... Continue reading "Essential Software Design Patterns and Testing Techniques" »

Python Classes, Objects, and Inheritance Fundamentals

Classified in Computers

Written on in English with a size of 4.11 KB

Understanding Objects in Programming

An object is a software entity that contains data (attributes) and methods. It represents a real-world entity that can be distinctly identified.

Every object has a unique:

  • Identity: The name of the object (e.g., the variable name).
  • State: The data stored in the object, which defines its properties.
  • Behavior: The actions an object can perform, defined by its methods.

Can an object be passed as an argument to a function?

Yes. In Python, objects are passed by reference. This means any changes made to the object's attributes within the function will permanently alter the original object. This behavior is similar to how lists and dictionaries are handled. Think of it as sharing a key to a single locker rather than getting... Continue reading "Python Classes, Objects, and Inheritance Fundamentals" »

Mastering Topic Modeling, Anomaly Detection, and PageRank

Posted by Anonymous and classified in Computers

Written on in English with a size of 12.48 KB

Topic Modeling: LSI vs LDA

Latent Semantic Indexing (LSI)

Use LSI for semantic similarity, retrieval, short/sparse documents, and synonymy problems. It uses Singular Value Decomposition (SVD) to find latent concept axes from term-document co-occurrence. Concepts are mathematical directions, not clean probability-based topics. It is better when the goal is to “find similar documents.”

Latent Dirichlet Allocation (LDA)

Use LDA for discovering hidden themes and topic percentages. In this model, each document is a mixture of topics, and each topic is a distribution over words. It is better when the goal is to determine “what themes exist in this corpus?”

Key Distinction

  • LSI finds latent concept dimensions.
  • LDA explicitly models probabilistic topics.
... Continue reading "Mastering Topic Modeling, Anomaly Detection, and PageRank" »

ICT Exam Solutions and Technical Concepts

Posted by Anonymous and classified in Computers

Written on in English with a size of 3.53 KB

1. Hardware and Spreadsheet Fundamentals

1(a) Input and Output Devices

  • 1(a)(i) Output
  • 1(a)(ii) Input
  • 1(a)(iii) Input
  • 1(a)(iv) Output
  • 1(a)(v) Input

1(b) Network Types and Components

  • 1(b)(i) LAN
  • 1(b)(ii) MAN
  • 1(b)(iii) WAN

Wireless Networking

  • Component: Wireless NIC, Wi-Fi adapter
  • Reason: Connects device to wireless network without cables

1(c) Spreadsheet Operations

  • 1(c)(i) =C2*D2
  • 1(c)(ii) Average item cost: C8; Grand total: E8
  • 1(c)(iii) =AVERAGE(C2:C7)
  • 1(c)(iv) Stock ID: Text; Total Value: Currency
  • 1(c)(v) Dinghy, Fender

2. Data Processing and Validation

2(a) Data Entry Devices

  • 2(a)(i) MICR
  • 2(a)(ii) Sensor
  • 2(a)(iii) OMR
  • 2(a)(iv) OCR

2(b) Validation Checks

  • 2(b)(i) Presence check
  • 2(b)(ii) Range check
  • 2(b)(iii) Format check

2(c) Database Concepts

  • 2(c)(i) Boolean: Stores only
... Continue reading "ICT Exam Solutions and Technical Concepts" »

Computer Systems Fundamentals Cheat Sheet

Classified in Computers

Written on in English with a size of 3.88 KB

Execute Logic Gates | Bedrock Wiki Boolean Algebra Simplification with Examples

Computer Systems Fundamentals Cheat Sheet

Number Systems

  • Binary (Base 2): Digits 0 and 1.
  • Hexadecimal (Base 16): Digits 0–9 and A–F.
  • Decimal (Base 10): Digits 0–9.

Conversions

  • Binary to Decimal: Multiply each bit by 2^n from the right.
  • Decimal to Binary: Divide by 2 and record the remainders.
  • Hex to Binary: Replace each hex digit with its 4-bit binary equivalent.

Two's Complement (Signed Numbers)

  • Positive numbers: Same as unsigned.
  • Negative numbers: Invert all bits and add 1.
  • Range (n bits): -2^(n-1) to 2^(n-1) - 1.
  • Overflow: Occurs if carry into the sign bit ≠ carry out.

Boolean Algebra Rules

  • Identity: A + 0 = A, A * 1 = A
  • Null: A + 1 = 1, A * 0 = 0
  • Idempotent: A + A = A, A * A = A
  • Inverse: A + NOT A = 1, A * NOT A = 0
  • Distributive: A(B + C) = AB +
... Continue reading "Computer Systems Fundamentals Cheat Sheet" »

Essential OPAC Functions for Modern Libraries

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.77 KB

Features of an OPAC

OPAC (Online Public Access Catalogue):

Core Features of an OPAC

1. Advanced Search Capabilities

  • Multi-Field Searching: Allows retrieval using specific metadata like Author, Title, ISBN, Subject, and Call Number.
  • Boolean & Query Refinement: Supports Boolean operators (AND, OR, NOT), wildcard truncation, and phrase searching to narrow down results.

2. Real-Time Status & Location Tracking

  • Circulation Status: Displays live item availability (e.g., Available, Checked Out, On Hold, Lost).
  • Dynamic Location: Pinpoints the exact physical location, including the specific collection (e.g., Reference, Stack) and the Call Number/Shelf Mark.

3. Patron Self-Service (My Account)

  • Circulation Control: Enables users to log in to renew issued
... Continue reading "Essential OPAC Functions for Modern Libraries" »