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

Sort by
Subject
Level

Assembly Language Fundamentals: Registers, Operands, and Data Types

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.73 KB

Assembly Language Fundamentals: Key Concepts and Definitions

1. Clock Frequency and Cycle Time

A clock that oscillates 1 million times per second (1 MHz) produces a clock cycle duration of $10^{-6}$ seconds (1 microsecond).

2. General-Purpose Registers (8-bit, 16-bit, and 32-bit Access)

The general-purpose registers that can be accessed in 8 bits, 16 bits, and 32 bits are: EAX, EBX, ECX, and EDX.

3. Purpose of EAX and ECX Registers

These registers serve specific roles in CPU operations:

  • EAX – Accumulator: Automatically used by multiplication and division instructions. It is often referred to as the extended accumulator register.
  • ECX – Loop Counter: The CPU automatically uses ECX as a counter for loop instructions.

4. Reserved Words and Identifiers

... Continue reading "Assembly Language Fundamentals: Registers, Operands, and Data Types" »

JavaScript Evolution: JSONP and 3D Data Structures

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.27 KB

JavaScript: A Fast-Growing Language

JavaScript is a fast-growing language, with a lot of features being added to every release! These include:

  • JSONP
  • Arrow functions
  • Arguments and call arguments
  • Rest parameters
  • Blob and DOMString
  • A download button
  • apply() vs call()

Understanding JSONP (JSON with Padding)

JSONP (JSON with Padding) was a technique used before modern CORS support to get data from another website. JSONP (JavaScript Object Notation with Padding) is an older technique used to retrieve data from a server when normal AJAX requests using XMLHttpRequest (XHR) or fetch() are blocked by the browser's Same-Origin Policy.

Normally, when a client requests data from a server, the server returns plain JSON, such as { "value": 123 }, which is then parsed... Continue reading "JavaScript Evolution: JSONP and 3D Data Structures" »

Creating and Managing Coach and Activity Tables in SQL

Classified in Computers

Written on in English with a size of 4.29 KB

1. Create Table Coach

CoachID INT PRIMARY KEY,

CoachName VARCHAR(20) NOT NULL,

Sports VARCHAR(15) NOT NULL,

DOJ DATE NOT NULL,

Gender CHAR(1) NOT NULL,

Salary INT NOT NULL


INSERT INTO Coach (CoachID, CoachName, Sports, DOJ, Gender, Salary)

VALUES

(1001, 'Mulund Gogoi', 'Boxing', '2004-09-01', 'M', 40000),

(1002, 'Arnab Duwara', 'Karate', '1999-10-01', 'M', 60000),

(1003, 'Nayan Bora', 'Arm Wrestling', '2005-02-28', 'M', 50000),

(1004, 'Devesh Hazarika', 'Basketball', '2010-05-05', 'M', 25000),

(1005, 'Chetan Sharma', 'Swimming', '2010-03-31', 'M', 25000),

(1006, 'Lakshmi Devi', 'Boxing', '2012-01-01', 'F', 22000);


3. Queries for Questions:

a) Display the Maximum and Minimum Salary of the Coaches

SELECT MAX(Salary) AS Max_Salary, MIN(Salary) AS Min_Salary

... Continue reading "Creating and Managing Coach and Activity Tables in SQL" »

Core Python for Data Analysis and Scientific Computing

Posted by Anonymous and classified in Computers

Written on in English with a size of 11.79 KB

Key Concepts in Data Science & Scientific Computing

Visualization Techniques

  • Overlapping Histograms: Use semi-transparent alpha parameter for comparison.

Data Structures & Algorithms

  • BFS Implementation: collections.deque is ideal for Breadth-First Search.
  • Grid Representation: Obstacles often represented by a value like 1.

Jupyter Notebook & Markdown

  • Markdown Headings: Use # prefix for headings in Jupyter Markdown cells.

Optimization & Least Squares

  • Normal Equations: Direct matrix inversion for Least Squares: β = (XᵀX)⁻¹Xᵀy.

Numerical Integration & Simulation

  • Orbit Simulation: Runge–Kutta 4th order method is a common integration technique.

Search Algorithms

  • Brute-Force Search: Often implemented using nested loops.

Python Ecosystem

... Continue reading "Core Python for Data Analysis and Scientific Computing" »

Relational Database Design and Normalization Essentials

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.82 KB

Database Management Systems and SDLC

Chapter 1: Introduction to Databases

  • Data: Raw facts like numbers, names, and pictures.
  • TFPS (Traditional File Processing System): The biggest problem was when data changes in one file, it could cause inconsistencies.
  • Cons of TFPS: Data redundancy, limited sharing, long development times, and high maintenance.
  • DBMS (Database Management System): Software used to manage databases.
  • SDLC (Systems Development Life Cycle): Plan, analysis, design, implementation, and maintenance.
  • Prototype: Build a prototype, implement, and improve it over time.

Entity-Relationship (ER) Modeling Concepts

Chapter 2: Database Design and ER Diagrams

  • Entity: A noun, such as a person, place, or thing.
  • Attributes: Descriptions or properties of
... Continue reading "Relational Database Design and Normalization Essentials" »

Core Concepts in Computer Architecture and Assembly

Posted by Anonymous and classified in Computers

Written on in English with a size of 3.56 KB

CPU Fundamentals and Timing

Clock Cycles and Frequency

A clock that oscillates 1 million times per second (1 MHz) produces a clock cycle of 1 microsecond (1 μs), which equals 10-6 seconds per cycle.

Instruction Execution Pipeline

The steps for executing a machine instruction are:

  1. Fetch the instruction.
  2. Decode the instruction.
  3. Fetch the operand (if any).
  4. Execute the instruction.
  5. Store the result or output.

Cache Memory Operations

Cache memory is a small, fast memory used to temporarily store frequently accessed data or instructions to speed up CPU operations.

  • A cache hit occurs when the CPU finds the required data in cache memory.
  • A cache miss occurs when the data is not found and must be fetched from main memory.

Assembly Language Basics

General-Purpose

... Continue reading "Core Concepts in Computer Architecture and Assembly" »

Essential Web Development: JavaScript, jQuery, and CSS Tips

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.31 KB

Use of Alert Box

An alert box is a JavaScript popup dialog box used to display messages or warnings to the user.

Uses of Alert Box

  • To display information messages
  • To show warning messages
  • To show error messages in form validation
  • To notify users about system events
  • Used for debugging purposes

JavaScript Program using RegExp Object

Definition: A Regular Expression (RegExp) is an object used to define a search pattern and perform matching operations on strings.

let text = "My email is [email protected]";
let pattern = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/;
let result = text.match(pattern);
if(result) { alert("Email found: " + result); } else { alert("No email found"); }

HTML and JavaScript Prompt Demo

<!DOCTYPE html>
<html>
<head&
... Continue reading "Essential Web Development: JavaScript, jQuery, and CSS Tips" »

Essential Data Structure Operations and Java Implementations

Classified in Computers

Written on in English with a size of 3.95 KB

Inserting the First Element into a Tree Structure

Method to add the first element (root) to a Tree Structure:

public void insertFirstNode(Object item)
{
    // If the tree is empty, the new node becomes the root of the tree
    if (theRoot == null)
    {
        Node theNewNode = new Node(item);
        theRoot = theNewNode;
    }
}

Deleting an Element from a Linked List

Method to remove an element at a specific index in a Linked List:

public void remove(int index) {
    // Special case: removing at the head of the list
    if (index == 1) {
        head = head.getNext();
    } else {
        // Find the previous and current node
        setCurrent(index);
        prev.setNext(curr.getNext());
    }
    size = size - 1;
}

Steps for Inserting an Element

... Continue reading "Essential Data Structure Operations and Java Implementations" »

Java Backtracking Algorithms: Sudoku, Knapsack, and Tasks

Classified in Computers

Written on in English with a size of 2.25 KB

Sudoku Solver Implementation

private boolean isValid(int r, int c, int n) {
  boolean valid = true;
  int sr, sc, fr, fc;
  for (int i = 0; i < 9 && valid; i++) {
    if (i != r) if (grid[i][c] == n) valid = false;
    if (i != c) if (grid[r][i] == n) valid = false;
  }
  if (valid) {
    sr = (r / 3) * 3; fr = sr + 3; sc = (c / 3) * 3; fc = sc + 3;
    for (int i = sr; i < fr && valid; i++) {
      for (int j = sc; j < fc && valid; j++) {
        if (grid[i][j] == n) valid = false;
      }
    }
  }
  return valid;
}

private boolean solveRec(int row, int col) {
  boolean solved = false;
  if (row == 9) solved = true;
  else {
    if (grid[row][col] == 0) {
      for (int i = 1; i < 10; i++) {
        if
... Continue reading "Java Backtracking Algorithms: Sudoku, Knapsack, and Tasks" »

Essential CSS and HTML Techniques for Web Development

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.77 KB

Understanding CSS text-overflow

The text-overflow property in CSS specifies how overflowed content that is not displayed should be signaled to the user. It works only when text exceeds the container size.

Required Conditions

To use text-overflow, the following properties must be applied:

  • overflow: hidden;
  • white-space: nowrap;
  • Fixed width

Values of text-overflow

  • clip: Default behavior; cuts off text without showing any symbol.
  • ellipsis: Shows “...” at the end of truncated text.
<style>
.clipText { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: clip; border: 1px solid #000; }
.ellipsisText { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid red; }
</style>
<div class=
... Continue reading "Essential CSS and HTML Techniques for Web Development" »