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

Sequential Systems and Computer Memory Essentials

Computer science2.56 KB

Sequential Systems Design

A systematic way of designing any machine that passes through different states. Examples include counters, traffic lights, and vending machines. Generally called Finite State Machines/Automatas.

Mealy Machine

Outputs are a function of both inputs and the current state.

Moore Machine

Outputs are a function of the current state only.

Computer Memory

Part of the computer that stores information: instructions and data.

Organization:

Address: Identifies memory position

Content: Stored information

Memory Cell

Minimum storing element: one bit.

Word

Group of bits implied in each memory operation (8, 16, 32, 64, ... bits). It defines data bus size.

Basic Operations

Read (R) and Write (W)

Capacity

Maximum quantity of information that a memory

...

Continue reading "Sequential Systems and Computer Memory Essentials" »

Fundamentals of Integers, Primes, and Factorization

Computer science8.67 KB

Chapter 1: Fundamentals of Numbers

Numbers and Notation

We begin by talking about numbers. This may seem rather elementary, but it does set the scene and introduce a lot of notation. In addition, much of what follows is important in computing.

1.0.1 Integers: Definition and Properties

We begin by assuming you are familiar with the integers:

Ecuacion

Sometimes called the whole numbers, these are just the numbers we use for counting. To these integers we add zero (0), defined as:

Ecuacion

Once we have the integers and zero, mathematicians create negative integers by defining (-n) as the number which, when added to n, gives zero. So, n + (-n) = (-n) + n = 0. Eventually, we simplify writing n + (-n) = 0 to n - n = 0. We now have the set of positive and negative integers:...

Continue reading "Fundamentals of Integers, Primes, and Factorization" »

Digital Modulation, Network Topologies and IP Addressing

Computer science2.87 KB

Digital Modulation Techniques

FSK Modulation: Each set of bits is represented by a discrete frequency. In the simplest case, two frequencies are used: F0 and F1.

ASK Modulation: Each set of bits is represented by a discrete amplitude. Information is transmitted based on the amplitude of the carrier. If the bit is 0, it is sent as amplitude A0; if the bit is 1, it is sent as amplitude A1. In the case of ASK2, it reduces to phase modulation, as it changes the sign of the carrier (a 180-degree phase jump), which is the basis of QPSK.

PSK Modulation: Each set of bits is represented by a discrete phase of the carrier. Signaling 0 and 1 by sending the reference carrier and a 180-degree phase jump is commonly called BPSK modulation.

Voice Digitization

...
Continue reading "Digital Modulation, Network Topologies and IP Addressing" »

C++ Algorithms: Frequency Counting, ISBN Validation, and Horner's Method

Computer science5.51 KB

Counting Frequencies Algorithm in C++

This C++ implementation demonstrates a method for counting the frequencies of input integers while maintaining a sorted list of unique values. It utilizes custom functions for insertion and shifting elements.

Data Structure Definition

#include <iostream>
#include <vector>
using namespace std;

struct lon{
    int dig, vez; // digit, count (vezes)
};

Helper Functions: Shifting and Positioning

The mover function shifts elements to make space for a new insertion, and donde_poner finds the correct sorted position for a new digit.

void mover(vector<lon>& a, const int& pos, const int& ini){
    for(int i = pos; i > ini; --i){
        a[i].dig = a[i-1].dig;
        a[i].vez = a[i-1]
...
Continue reading "C++ Algorithms: Frequency Counting, ISBN Validation, and Horner's Method" »

Data Persistence & Management in Extended MVC Architectures

Computer science2.46 KB

Data Management Function in Extended MVC

The Data Management (DM) component provides the basic infrastructure for the storage and retrieval of objects within a system. Its primary purpose is to isolate the impacts of underlying data management technologies on the overall software architecture.

Specifying Data Management: Common Approaches

The most direct approach for this persistence layer is to provide a shadow class within the Data Management (DM) component for each persistent class in the other architectural components, such as the Problem Domain (PD) components. The standard DAO (Data Access Object) pattern is widely used for this task.

Essential Features for Data Management Construction

Three important features for constructing the Data Management...

Continue reading "Data Persistence & Management in Extended MVC Architectures" »

Mastering TCP/IP Fundamentals: Key Networking Concepts

Computer science3.71 KB

Networking Essentials: TCP/IP Concepts

TCP Flow Control Purpose

Why is flow control used for TCP data transfer?

  • To synchronize the speed of data sent.
  • To synchronize and order sequence numbers so data is sent in complete numerical order.
  • To prevent the receiver from being overwhelmed by data.
  • To synchronize window size on the server.
  • To simplify data transfer to multiple hosts.

Analyzing Network Output: Key Information

Refer to the exhibit. What two pieces of information can be determined from the output shown? (Choose two.)

  • The local host is using well-known port numbers to identify the source ports.
  • A request for termination has been sent to 192.135.250.10.
  • Communication with 64.100.173.42 is using secure HTTP.
  • The local computer is accepting HTTP requests.
...
Continue reading "Mastering TCP/IP Fundamentals: Key Networking Concepts" »

Semaphores for Synchronization in Operating Systems

Computer science3.35 KB

Semaphores: Synchronization Tool

Semaphores are a synchronization tool designed to solve critical section and synchronization problems. A semaphore is an integer variable accessed only through two atomic operations: Wait and Signal. When a process modifies the semaphore's value, no other process can simultaneously modify that same semaphore value. The semaphore is initialized to a non-negative value.

Wait and Signal Operations

  • Wait (P): Decrements the semaphore's value. If the value becomes negative, the process is blocked.
  • Signal (V): Increments the semaphore's value. If the value is not positive, a blocked process waiting on this semaphore is unblocked.

The definitions are:

P(s):

while (s <= 0)
s--;

V(s):

s++;

Operating System Usage

Operating...

Continue reading "Semaphores for Synchronization in Operating Systems" »

Fundamentals of Operating Systems: Types, Functions, and History

Computer science3.85 KB

Definition of an Operating System (OS)

An Operating System (OS) is a program or set of computer programs designed to ensure the effective management of resources. It begins to work when you turn on the computer, managing the machine's hardware from the most basic levels, while also allowing essential user interaction.

Core Functions of Operating Systems

Operating systems perform several critical functions:

  • Provide comfort and ease in using a computer.
  • Efficiently manage computer resources and services running processes (programs).
  • Provide a user interface for executing instructions (commands).
  • Allow developmental changes in the OS itself to be made without interfering with services already provided (facilitating system evolution).

Key Features of an

...
Continue reading "Fundamentals of Operating Systems: Types, Functions, and History" »

Windows Server 2003 & Active Directory Questions and Notes

Computer science7.38 KB

Windows Server 2003 and Active Directory Questions

Corrected text, answers and notes

  1. 1) OS: A - Q-OS no.
  2. 2) Windows 2003: A - Preemptive.
  3. 3) Are as follows: A - Web Server.
  4. 4) Multithreaded is: C - use number.
  5. 5) The version of Windows:
  6. 6) Files: B - NTLDR, Boot.ini.
  7. 7) To load the OS:
  8. 8) An ARC name:
  9. 9) The BOOT.INI:
  10. 10) Windows Server 2003:
  11. 11) You can start:
  12. 12) Console:
  13. 13) To execute the console:
  14. 14) File System: NTFS.
  15. 15) All components: B - can be installed.
  16. 16) The best way to: B - be on the screen.
  17. 17) The best way to have: C - used domain because.
  18. 18) A Windows server: B - installed the service.
  19. 19) Controllers: A - stored data.
  20. 20) A forest: a collection of B - trees.
  21. 21) To promote: A - run DCPROMO.
  22. 22) A controller: B - DCPROMO.
  23. 23) Active: A - one directory.
...
Continue reading "Windows Server 2003 & Active Directory Questions and Notes" »

C Programming: Matrix Data Transfer and Calculations

Computer science4.45 KB

Matrix Data Transfer Example

This section presents C code intended to transfer data between matrices based on region identifiers.

#include <stdio.h>
#include <stdlib.h>

int main () {
    int a[64][4];
    int b[3][15];
    int i, region, sum_asup, sum_ahab, j;

    j = 0;
    region = 1;
    sum_asup = 0; // Initialize sums
    sum_ahab = 0; // Initialize sums

    // Assuming 'a' matrix is populated with data
    for (i = 0; i < 64; i++) { // Corrected loop condition
        if (a[i][0] == region) {
            sum_asup = sum_asup + a[i][2];
            sum_ahab = sum_ahab + a[i][3];
        }
        
        // Check if the next element belongs to a different region or if it's the end of the array
        if (i + 1 < 64
...
Continue reading "C Programming: Matrix Data Transfer and Calculations" »