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

Sort by
Subject
Level

Assembly Language Instructions and MS-DOS Functions

Classified in Computers

Written on in English with a size of 3.39 KB

Data Transfer Instruction:

LEA

Gets source effective address and stores it in the target. Source segment address is stored in DS. Example: LEA DX, OPERANDO1

Control Transfer Instructions

Loops

Operation (IP decrement) + Conditional jump on operation result.

Example:

MOV CX, 4
Bucle:
  INC BX
  ADD BX, CX
  LOOP Bucle

Compare Instruction:

CMP

Compares source and target operands and properly modifies the flag register. It internally works by subtracting the target from the source operand. Operands are equal if the result is zero. Source is greater than target if the result is negative. Target is greater than source otherwise. Example: CMP AX, DX; Compares AX and DX.

Interrupt Instructions:

INT

INT jumps to a specified interrupt address. i8086 interrupt addresses... Continue reading "Assembly Language Instructions and MS-DOS Functions" »

Key Concepts in IT: Client Facilities, XML, and Security

Classified in Computers

Written on in English with a size of 3.59 KB

Client Facilities

Client Facilities: Performance, ensure integrity, updates, risk confidential. Static pages, forms, active content, plugins, stand-alone applications.

XML

XML (Extensible Markup Language): Preferred form for B2B and internal documents with legal effect. Key benefits: non-proprietary, platform independent, HTTP compatibility, international support, extensible, self-defining, common tools, and transformation. Complementary techniques: UDDI (Universal Description, Discovery, and Integration), WSDL (Web Services Description Language) – web service design. Signatures have legal effect.

Components

Components: Good because turn-key systems tend to be too large and inflexible. Advantages: higher quality and design, maintenance shared,... Continue reading "Key Concepts in IT: Client Facilities, XML, and Security" »

Java Programs: Character Frequency, Inheritance, Palindrome, Matrix Multiplication & Polymorphism

Classified in Computers

Written on in English with a size of 5.03 KB

Character Frequency

FREQUENCY

import java.util.Scanner;
class Test2 {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
System.out.print("ENTER THE STRING:");
String abc = s.nextLine();
System.out.println("Enter The Character for checking:");
char ch = s.nextLine().charAt(0);
int count = 0;
for(int i = 0; i < abc.length(); i++) {
if(ch == abc.charAt(i)) {
count++;
}
}
System.out.println("The given character repeats " + count + " times");
} }

OUTPUT

ENTER THE STRING: MALAYALAM
Enter The Character for checking:
M
The given character repeats 2 times

Inheritance Example

import java.util.Scanner;
class Employee {
String name = "Name";
String address = "Address";
int age = 23, phn_no = 123456789, salary = 500000;
void printsalary() {
System.out.println(

... Continue reading "Java Programs: Character Frequency, Inheritance, Palindrome, Matrix Multiplication & Polymorphism" »

Computer Science: Algorithms, Complexity, and Pioneers

Classified in Computers

Written on in English with a size of 4.6 KB

Algorithm Complexity

  • O(1): Parity Check
  • O(log n): Binary Search
  • O(n): Sequential Search
  • O(n log n): QuickSort
  • O(n2): Bubble Sort

Computer Science Fields

Theoretical Computer Science

  • Mathematical Logic
  • Automata Theory
  • Computability
  • Computational Complexity
  • Cryptography
  • Combinatorial Optimization

Practical Computer Science

  • Artificial Intelligence
  • Computer Architecture
  • Computer Graphics
  • Databases
  • Software Engineering
  • Distributed Systems
  • Computer Security
  • Human-Computer Interaction

Turing Machine Elements

  • Possible States
  • Initial State
  • Final State
  • Current State
  • Finite Set of Symbols
  • Input Symbols

Abstract Machines

Theoretical models for analyzing computability and algorithm complexity. Includes Automata and State Machines.

Deterministic Turing Machine (DTM)

For each state, there... Continue reading "Computer Science: Algorithms, Complexity, and Pioneers" »

Python Functions and Errors: Time, Triangle, Bonus, and Digits

Classified in Computers

Written on in English with a size of 4.09 KB

TIME DIFFERENCE

def time_difference(time1, time2):
time1=time_to_seconds(time1)
time2=time_to_seconds(time2)
diffinsecond=time2-time1
hours=diffinsecond//3600
minutes=(diffinsecond-(hours*3600))//60
seconds=diffinsecond-(hours*3600)-(minutes*60)
return(make_time_string(hours,minutes,seconds))

# Predefined helper functions. Do not edit them.
def time_to_seconds(time):

x = list(map(int, time.split(":"))
return x[0] * 3600 + x[1]*60 + x[2]

def make_time_string(hours, mins, seconds):
return "{:02d}:{:02d}:{:02d}".format(hours, mins, seconds)

TYPE OF TRIANGLE

def triangle(side1, side2, side3):
if side1+side2<>
return "Not a triangle"
elif side1==side2 and side2==side3:
return "Equilateral"
elif... Continue reading "Python Functions and Errors: Time, Triangle, Bonus, and Digits" »

HTML Input Types, Sensors, Random Numbers, and Loops in JavaScript

Classified in Computers

Written on in English with a size of 3.49 KB

Radio Buttons

Radio buttons allow you to choose only one option among multiple. If an option wasn't previously selected, it can be automatically changed. Radio buttons with the same name are grouped together, ensuring that only one option within that group can be selected at a time.

Gender: Male Female

Checkboxes

Checkboxes allow you to choose one or more options from a list. Unlike radio buttons, a name attribute is not required for grouping.

Activities: Yoga Boxing

To check if a checkbox is selected in JavaScript, you can use the following code within a button's function:

if (document.getElementById("checkbox_id").checked == true)

To reset a checkbox, use:

document.getElementById("checkbox_id").checked = false;

Sensors

Senses allow us to collect information... Continue reading "HTML Input Types, Sensors, Random Numbers, and Loops in JavaScript" »

Web Security: Confidentiality, Authentication, and Protection Measures

Classified in Computers

Written on in English with a size of 3.48 KB

Web Security

Confidentiality: only authorized users should have access to the data

Authentication: each user must be confirmed to be who they say they are through their digital identity

Authorization: access to the different services must be conditioned by the identity and permissions attributed to each user

Integrity: the data sent must be the same as those received, avoiding manipulation or corruption

Availability: quality or condition of the information to be available to those who must access it.


Security Threats: the security of a network is exposed

Logical Causes:

This is the software that can attack the computer: malware, spam, viruses, programming errors…

Human Causes:

These are users who can damage the system: inexperienced users, hackers,... Continue reading "Web Security: Confidentiality, Authentication, and Protection Measures" »

Aircraft systems

Posted by and classified in Computers

Written on in English with a size of 10.6 KB

New jobs are admitted into the system
-- long-term or high-level scheduling

Once in the system, processes go through a number of state changes
-- short-term or low-level or CPU scheduling

A process is a "running program" or "program in execution"

Processes have a variety of states:


   RUNNING           READY                 WAITING (on I/O)
    STATE            STATE                  STATE

   +-----+                               +-----------------------+
   |     |     +--------------------+    |                 P2 P8 |
   | CPU | <== |="" p3="" |="" p6="" |="" p5="" |="" ...="">==><== i/o="" subsystem="" p13="" |="" |="" p11="" |="" +--------------------+="" |="" |="" +-----+="" +-----------------------+="" (a="" cpu=""
... Continue reading "Aircraft systems" »

Sorting Algorithms and Hash Tables: Explained and Compared

Classified in Computers

Written on in English with a size of 3.31 KB

Sorting Algorithms and Their Bounds

Results like the Ω(nlgn) lower bound on all sorting via binary comparisons are difficult to establish. On the other hand, results like the O(n2) upper bound on INSERTION-SORT are easier to achieve. Explain adequately the difference in the “ease” of arriving at these results.

One result applies to all sorting algorithms that are based on binary comparisons (and so is harder to establish) while the other result is simply for one specific sorting algorithm in the same category. A more complete answer would involve an argument that rightly recognizes that the lower bound result is one that also applies to algorithms that exist and also those yet to be devised (yes, even those that may be written a hundred... Continue reading "Sorting Algorithms and Hash Tables: Explained and Compared" »

Understanding Databases: Concepts and Key Components

Posted by aakankshajayant and classified in Computers

Written on in English with a size of 4.58 KB

What is a Database?

A database is an organized collection of data, visualized as a container of information. The data is typically organized to model relevant aspects of reality. A Database Management System (DBMS) is a software package with computer programs that controls the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications.

A database is an integrated collection of data records, files, and other objects. A DBMS allows different user application programs to concurrently access the same database. Typically, databases available on database servers are accessed through command-line or graphical user interface tools, referred to as front-ends; database servers are referred... Continue reading "Understanding Databases: Concepts and Key Components" »