Notes, summaries, assignments, exams, and problems for Computer science

Essential C Programming: Arrays, printf, and scanf

Computer science3.23 KB

Understanding Arrays in Programming

An array is a fundamental data structure in computer programming used to store a collection of elements of the same data type. These elements are stored in contiguous memory locations, meaning they are placed right next to each other in memory. Each element in an array is accessed by its index, which represents its position in the array.

Core Concepts of Arrays

Arrays are widely used because they offer efficient access to elements, as accessing an element by index is a constant-time operation (O(1)). Additionally, arrays allow for storing multiple elements of the same type under a single variable name, making it easier to manage and manipulate collections of data.

C Programming: Array Declaration & Initialization

Declaring

...
Continue reading "Essential C Programming: Arrays, printf, and scanf" »

Advantages of E-Governance and PHP Features

Computer science2.72 KB

Advantages of E-Governance

  • Improves delivery and efficiency of government services.
  • Improved government interactions with business and industry.
  • Citizen empowerment through access to information.
  • More efficient government management

Features of PHP

  • Simple: It is very simple and easy to use, as compared to other scripting languages.
  • Interpreted: It is an interpreted language, i.e. there is no need for compilation.

Supported Datatypes in PHP

  • String: A string is a sequence of characters. A string can be any text inside quotes. You can use single or double-quotes.
  • Integer: An integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647.
  • Float (floating point numbers): A float (floating-point number) is a number with a decimal point or
...
Continue reading "Advantages of E-Governance and PHP Features" »

MIPS Architecture and Procedure Calls

Computer science3.74 KB

What is a Basic Block?

A basic block is a sequence of instructions with no embedded branches (except at the end) and no branch targets (except at the beginning). A compiler identifies basic blocks for optimization. An advanced processor can accelerate the execution of basic blocks.

Six Steps Involved in Procedure Calling

  1. Place parameters in registers.
  2. Transfer control to the procedure.
  3. Acquire storage resources.
  4. Perform the desired operation.
  5. Place the result in a register for the caller.
  6. Return to the point of origin.

Register Saving Responsibilities

Between the caller and callee, the responsibility for saving registers is as follows:

  • Temporary registers ($t*): Can be overwritten by the callee.
  • Saved temporary registers ($s*): Saved and restored by the
...
Continue reading "MIPS Architecture and Procedure Calls" »

Internal Transport and Storage Systems in Warehouses

Computer science3.96 KB

Internal transport

Refers to the physical movement of products inside loading/unloading areas, docks, order preparation zones, truck load and any other eventual activity that implies products movements inside the warehouse.

Horizontal transport:

On this type of transport merchandise do not need to be raised to locate in a determined place. (Pallet truck, roller conveyor, conveyor belt system, auto guide transport system).

Vertical transport:

This transport not just allows the product to be transported from one place to another, but also to be raised to locate in a specific place. (Conventional forklift, retractable forklift, trilateral forklift).

Conventional forklift/truck lift (“Toros”)

Could be fixed mast or counterbalance, they need from 3...

Continue reading "Internal Transport and Storage Systems in Warehouses" »

Operating Systems: Functions, Components, and Network Basics

Computer science3.51 KB

Functions of Operating Systems

Processor Management

The Operating System distributes the processor between different programs.

Random Access Memory Management

The Operating System coordinates the memory space that each application has. When physical memory is insufficient, the Operating System can create a "virtual memory" on the hard disk.

Input/Output Management

The Operating System allows the unification of program access to material resources through controllers.

Execution of Application Administration

The Operating System is responsible for ensuring that applications run smoothly.

Authorization Management

Guarantees that resources are only used by programs and users with the corresponding authorizations.

File Management

The Operating System manages...

Continue reading "Operating Systems: Functions, Components, and Network Basics" »

TCP vs UDP: Key Differences & Protocol Characteristics

Computer science3.24 KB

Here's a breakdown of key characteristics and differences between TCP and UDP protocols:

  • TCP and UDP sockets are created by the transport layer: False
  • Before any data exchange takes place between two UDP applications, a logical connection must be established between them: False
  • Both SMTP and POP3 are TCP based: True
  • The UDP segment contains a checksum: True
  • The TCP segment contains a checksum: True
  • UDP makes use of the Selective Repeat protocol: False
  • The Selective Repeat algorithm is used for congestion control: False
  • HTTP uses TCP as its underlying transport protocol: True
  • With POP3, the email message is always deleted from the mail server if the client downloads the email message to its local email client application: False
  • Only TCP uses port numbers,
...
Continue reading "TCP vs UDP: Key Differences & Protocol Characteristics" »

CPU Register Types and Functions

Computer science3.48 KB

CPU Internal Registers

Internal registers are a set of temporary storage units available to the Central Processing Unit (CPU) for its operation. They serve as high-speed storage locations within the CPU itself.

The size of these registers depends on the function to be performed and the type of CPU. They generally match the size of the Data Bus or the Address Bus.

Classification of CPU Registers

CPU registers are broadly classified into two main types:

  • Inaccessible Registers: Not directly controllable by the user.
  • Accessible Registers: Controllable by the user.

Inaccessible Registers

Inaccessible registers are those whose operation or content the user cannot directly control. They are for the exclusive and restricted use of the CPU. From the user's...

Continue reading "CPU Register Types and Functions" »

Client-Server Model, Peer-to-Peer, NFS, Samba, and SSL

Computer science3.39 KB

Client-Server Model

  • The client-server model defines the structure of communicating applications and their synchronization.
  • It consists of two interacting processes:
    • Server Process
    • Client Process
  • Client and server are inseparable; one cannot exist without the other.

Server

  • This process awaits hearing on a given server port. It continuously waits for remote client processes to connect.
  • Authentication
  • Security and information privacy in the system where they reside.
  • Must be able to handle requests from multiple clients simultaneously.
  • Important: All clients will be connected to the same server port.

In general, we say that a computer is a server when its operating system runs one or more server processes (FTP, HTTP, DNS, etc.).

Client

  • It is a process that sends
...
Continue reading "Client-Server Model, Peer-to-Peer, NFS, Samba, and SSL" »

E1 Primary Access and Multiplexing in PDH and SDH Networks

Computer science2.91 KB

E1 Primary Access and Multiplexing

Multiplexing and Quantization

True or False: Multiframes are sent 500 per second in E1 primary access.

Plesiochronous multiplexers cause a loss of original formatting information.

CMI code requires greater bandwidth.

Question: What is the step size of a uniform quantizer with 2048 levels and a dynamic signal range of ±1V?

Answer: 0.977 mV

Question: How many quantization levels are in the second segment of a non-uniform quantizer using the A-law approach?

Answer: 16 levels

E1 Primary Access Characteristics

False Statement: In E1 primary access, the word alignment multiframe is transmitted every 15 frames.

True Statement: In E1 primary access, the word alignment multiframe is transmitted every 2 ms.

NFAS: Offers a speed...

Continue reading "E1 Primary Access and Multiplexing in PDH and SDH Networks" »

Creating Engaging Multimedia Presentations

Computer science3.08 KB

Creating Engaging Multimedia Presentations

A presentation is a multimedia file that can contain text, graphics, photos, music, and video. Its organization is done by slides, which succeed one another under your control. Templates are presentations that have predefined design objects in the slides, such as the background, fonts, placement of text, and other objects that give the presentation a common appearance across all slides.

Interactivity: Establishing Hyperlinks

Interactivity is established by creating hyperlinks. Clicking on a button or text performs an action, such as opening a file or linking to a website. You can insert a hyperlink from the Insert menu, then selecting Hyperlink.

Interactivity in objects allows navigation to different slides...

Continue reading "Creating Engaging Multimedia Presentations" »