Notes, summaries, assignments, exams, and exercises for Computer science for University

Essential PC Hardware Components and Form Factors

Computer science3.73 KB

PC Case Functions and Design

1. The PC case provides support and protection for all internal parts. It typically contains a reset button and provides a ventilated, spacious interior for airflow.

2. Case design is closely related to the specifications of motherboards and power supplies.

Common Case Form Factors

3. Standard form factors include:

  • PC/XT (early)
  • AT (obsolete)
  • BABY AT (rare)
  • LPX (slim)
  • ATX (normal)
  • NLX
  • WTX (for workstations and servers)

4. A famous consumer choice was the LPX, a low-profile cabinet developed by Western Digital. Its goal was to reduce size and cost; however, motherboards differed in riser card implementation, and the design was never fully finalized.

Case Modding and Customization

5. Case Modding involves modifying a chassis to...

Continue reading "Essential PC Hardware Components and Form Factors" »

Mastering Discrete Event Simulation: Concepts & Project Workflow

Computer science5.31 KB

Discrete Event Simulation: Core Concepts & Project Workflow

Key Components of a Simulation Model

  • Locations

    Fixed places where entities are processed, stored, decisions are made, or other activities occur.

  • Entities

    Whatever the model processes or tracks within the system.

  • Physical Road Network

    Networks where entities and resources move and interact.

  • Resources

    Any person, equipment (e.g., vehicles), or tools used to transport entities, develop operations, or perform tasks.

  • Process

    Defines the path of entities using the system's logic and operational experience at each location.

  • Arrivals

    New entities entering the system at specific times or rates.

  • Shifts

    Defined periods for breaks or specific assignments for locations or resources, affecting availability.

...

Continue reading "Mastering Discrete Event Simulation: Concepts & Project Workflow" »

Fundamentals of C Programming and Computer Concepts

Computer science4.69 KB

Computer and Program Concepts

Program: A set of instructions to the computer written in a language understood by it.

Computer: Electronic machine.

Byte: The amount of information used by a computer to represent a character; a byte is a string of 8 bits.

Machine code: Binary encoding of a set of instructions.

Languages and Translators

Assembly language: A language that uses mnemonic codes to specify hardware operations.

Mnemonic code: An easy-to-remember word that represents a task to be performed by the processor.

High-level language: Languages that use terminology closer to human language.

Compiler: A program that translates a program written in a high-level language into machine language.

Linker: A program tasked with incorporating the library functions...

Continue reading "Fundamentals of C Programming and Computer Concepts" »

Relational Database Fundamentals: Entities and Attributes

Computer science2.93 KB

Core Concepts: Domain, Attribute, and Entity

Domain: A set of values of any simple or elemental type which can represent the possible values a variable takes for a characteristic or property (attribute) of a representable object (entity).

Attribute: Anything capable of taking a value (data) within a domain (range of possible values). Attributes sharing the same domain are typically given the same or similar names to avoid confusion.

Entity: Anything that can hold a set of attributes with occurrences in the universe. Each occurrence is assigned values for each attribute. More formally, an entity is a set of attributes A1, A2, ..., An, taking values in their respective domains D1, D2, ..., Dn.

Understanding Relationships and Relations

A relationship...

Continue reading "Relational Database Fundamentals: Entities and Attributes" »

Pascal Complex Number Arithmetic Program

Computer science2.49 KB

NosComp Program;

uses crt;

Type
Record number =
Real: Real;
imag: Real;
End;

Var
n1, n2: number;
resp: char;

Procedure LeerDatos;
begin
writeln ('Real part of the first number');
readln (n1.real);
writeln ('Imaginary part of the first number');
readln (n1.imag);
writeln ('Real part of the second number');
readln (n2.real);
writeln ('Imaginary part of the second number');
readln (n2.imag);
end;

Procedure Sum;
Begin
write ('The result of adding them is:');
if (n1.imag + n2.imag) >= 0 then
writeln ( (n1.real + n2.real):2:2, '+', (n1.imag + n2.imag):2:2, 'i')
else
writeln ( (n1.real + n2.real):2:2, '-', abs (n1.imag + n2.imag):2:2, 'i')
end;

Procedure Subtraction;
begin
write ('The result of subtracting them is:');
if (n1.imag...

Continue reading "Pascal Complex Number Arithmetic Program" »

Core Concepts in Programming Logic and Algorithms

Computer science4 KB

Core Concepts in Logic and Programming

Logic

Logic is a formal science that studies the valid forms of inference. It is the study of methods and principles used to distinguish correct from incorrect reasoning.

Programming Paradigm

A programming paradigm represents a particular philosophy or approach for building software. No single paradigm is inherently better than another; each has its own advantages and disadvantages.

Types of Programming Paradigms

Imperative Programming

This paradigm uses a set of instructions that tell the computer how to perform a task by changing a program's state.

Modular Programming

In this approach, a program is divided into separate modules or subprograms to make it more readable and manageable.

Declarative Programming

This...

Continue reading "Core Concepts in Programming Logic and Algorithms" »

Database Management System Concepts and Functions

Computer science2.49 KB

Database Terminology and Structure

Tip: A set of characters with some meaning can be numeric, alphanumeric, or alphabetical.

Information: Ordered set of data that are managed according to user needs.

Field: It is the smallest unit to which we refer to in a program.

Record: Collection of equal fields or different types.

File: Collection of records stored homogeneously following a structure.

Database: Collection of interrelated files that typically contain information about a particular company.

DBMS: A computer-based system (software) that manages a database or a collection of databases or files.

Uses and Functions of a DBMS

  • Allow users to access and manipulate the database.
  • Provide administrators with the tools to perform maintenance and data management.
...
Continue reading "Database Management System Concepts and Functions" »

Core Concepts of Virtual Memory Management and Allocation Strategies

Computer science3.47 KB

Virtual Memory Management Fundamentals

What is Memory Management?

Memory Management is responsible for the efficient use of main memory in a multiprogramming environment where processes compete for memory resources.

Types of Address Space

  • Actual Addresses: Refer to the physical main memory (RAM) of the machine.
  • Logical or Virtual Addresses: The memory space perceived or known by the process. Each process maintains its own independent logical or virtual address space.

The central idea of virtual memory is to utilize the memory hierarchy: storing the most frequently accessed data in faster, lower-capacity storage tiers (RAM) and less frequently accessed data on less expensive, higher-capacity devices (disk).

Evolution of Memory Management Systems

  • Fixed
...
Continue reading "Core Concepts of Virtual Memory Management and Allocation Strategies" »

VHDL ALU Testbench Implementation and Simulation

Computer science2.33 KB

VHDL ALU Testbench Code

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use std.textio.all;
use ieee.std_logic_textio.all;

entity alu_tb is
end alu_tb;

architecture sim of alu_tb is
    component alu
        generic (N : positive);
        port (
            a, b : in std_logic_vector (4*N-1 downto 0);
            opr : in std_logic;
            ovfw_sign : out std_logic;
            resultado : out std_logic_vector (4*N-1 downto 0)
        );
    end component;

    constant N : positive := 4;
    signal a_i, b_i : std_logic_vector (4*N-1 downto 0);
    signal opr_i : std_logic;
    signal ovfw_sign_i : std_logic;
    signal resultado_i : std_logic_vector (4*N-1 downto 0);

begin
    DUT: alu
    generic map (N =>
...
Continue reading "VHDL ALU Testbench Implementation and Simulation" »

Relational Database Model Principles and Evolution

Computer science3.48 KB

2

The Relational Model

Relational Model: Defines a database in terms of objects, properties, and operations. Objects with the same structure and behavior belong to the same class, and classes are organized into hierarchies. Relational models have extended their models to incorporate object-oriented concepts. In 1970, Edward F. Codd published an article in which he argued that data should be inter-linked by natural and logical relationships inherent to the data, rather than through physical pointers.

Codd proposed a simple data model in which all data are represented in tables consisting of rows and columns. Codd also proposed two languages to manipulate data in tables:

  • Relational algebra
  • Relational calculus

The logical manipulation of data also makes...

Continue reading "Relational Database Model Principles and Evolution" »