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

Sort by
Subject
Level

Midterm Answers: Memory Protection, Power-On Self Test, Command Information, and More

Classified in Computers

Written on in English with a size of 1.96 KB

Midterm Answers

1. What is the main element of the Address Unit that allows memory protection of one application program from others? ATT/DATT


2. Which program runs first when the computer’s power is turned on? POST


3. a) Write COMD.EXE command that would provide information about DIR command:

help dir

b) Write UNIX/Linux shell (sh, ksh or bash) command that would provide information/help about ls command:

man ls


4. What is the space reserved on the RTS when a function is called? stack frame


5. What is the name of UNIX/Linux keyboard file? stdin


6. How many passwords may be used to control access to the systems firmware? 2


7. a) Upon process creation, does complete process image exist in memory? yes

b) Upon process terminations, does complete process

... Continue reading "Midterm Answers: Memory Protection, Power-On Self Test, Command Information, and More" »

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" »

HTML Basics: Elements, Attributes, Structure, Images, Headings, Paragraphs, and Links

Classified in Computers

Written on in English with a size of 1.58 KB

HTML Basics

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and </body>.

HTML Elements

Elements consist of a start tag and end tag, with the content inserted in between:

<tagname>Content goes here...</tagname>

HTML Attributes

All HTML elements can have attributes.

Attributes provide additional information about an element.

Attributes are always specified in the start tag.

Attributes usually come in name/value pairs like: name="value"

HTML Structure

<!DOCTYPE html>

<html>

<body>

My First Heading</h1>

My first paragraph.</p>

</body>... Continue reading "HTML Basics: Elements, Attributes, Structure, Images, Headings, Paragraphs, and Links" »