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

Sort by
Subject
Level

Jacobi Method Implementation in Fortran

Classified in Computers

Written on in English with a size of 3.12 KB

This section details the implementation of the Jacobi method in Fortran for solving a system of linear equations. The subroutine solucion_Jacobi takes a matrix A, a vector b, and an initial guess X as input, and returns the solution vector X.

Subroutine: solucion_Jacobi(A, b, X)

The subroutine begins with the following declarations and initializations:

  • use normas
  • integer, parameter :: Kx = 100
  • real(8), parameter :: tolerancia = 1E-6
  • real(8), allocatable :: X0(:), ERROR(:)
  • real(8), intent(in) :: A(:,:), b(:)
  • real(8), allocatable, intent(out) :: X(:)
  • integer :: i, j, k, n
  • real(8) :: sum, zero, ek

Where:

  • Kx is the maximum number of iterations.
  • tolerancia is the error tolerance.
  • X0 is the previous iteration's solution vector.
  • ERROR is the error vector.
  • A is the
... Continue reading "Jacobi Method Implementation in Fortran" »

Understanding Binary Conversion and Computer Performance

Classified in Computers

Written on in English with a size of 3.88 KB

Binary Conversion

Single-Precision Floating-Point

Format: 1 sign bit, 8 exponent bits, 23 fraction bits

Bias: +127 (decimal to binary), -127 (binary to decimal)

Double-Precision Floating-Point

Format: 1 sign bit, 11 exponent bits, 52 fraction bits

Bias: +1023 (decimal to binary), -1023 (binary to decimal)

Example: -17.6875 (Single-Precision)

  1. Sign Bit: + = 0, - = 1 (In this case, 1)
  2. Integer Part to Binary: Repeatedly divide the integer part by 2 and record the remainders.
  3. Fractional Part to Binary: Repeatedly multiply the fractional part by 2 and record the integer parts.
  4. Combine and Normalize: Combine the binary integer and fractional parts. Normalize to the form 1.xxx * 2^exponent.
  5. Calculate Exponent: Add the bias to the exponent.
DivideAnswerRemainder
17
... Continue reading "Understanding Binary Conversion and Computer Performance" »

Routing Protocols: RIP, OSPF, BGP, CSMA/CD, CSMA/CA

Classified in Computers

Written on in English with a size of 4.41 KB

Intra-AS Routing

RIP – Based on Distance-Vector (D-V), fewer messages, converges slower, smaller size.

OSPF – Based on Link-State (L-S), converges faster, more messages, larger networks.

Distance-Vector is distributed, and each router only knows the costs to its neighbors and their distance vectors.

Link state is global and requires that each router knows the network topology and link costs to all nodes.

OSPF: Used internally inside a network, an intra-network/domain protocol used in an AS.

BGP: An internetwork protocol used between two different ASs, used at the edge of your network to connect your network to the internet.

RIP: An intra-network protocol used in an AS, used for small networks (maximum number of hops is 16).

EBGP: Runs between two... Continue reading "Routing Protocols: RIP, OSPF, BGP, CSMA/CD, CSMA/CA" »

Essential Tech Terms Defined

Classified in Computers

Written on in English with a size of 4.8 KB

  • Accuracy

    Tells us how correct a GPS measurement is.
  • Array

    A group of disk drives that are connected and used as a single unit.
  • Assembler

    A program that translates low-level programming language into machine code.
  • Attachment

    A file sent as part of an email.
  • Avatar

    An image in a computer game that represents a person.
  • Barcode

    An arrangement of lines and spaces that represent data.
  • Bit

    The smallest unit of computer data.
  • Bitrate

    A measurement of the amount of data that is processed.
  • Broadband

    A system that allows computers to transfer large amounts of information.
  • Calibration

    The act of adjusting printers and scanners to display colors correctly.
  • Capacity

    The amount of space an MP3 player has to store files.
  • Catalog

    An inventory of books in a library.
  • Cell phone

    A wireless
... Continue reading "Essential Tech Terms Defined" »

Wireless Network Technology: Key Concepts and Security

Classified in Computers

Written on in English with a size of 3.85 KB

1. Why Can IEEE 802.11 Transmit Further Than Bluetooth?

IEEE 802.11 (Wi-Fi) has a higher power output than Bluetooth.

2. Three Advantages of Wireless Over Wired Technology

  • Anytime, anywhere connectivity
  • Easy and inexpensive to install
  • Ease of adding additional devices

3. Two Benefits of Wireless Networks Over Wired Networks

  • Mobility
  • Reduced installation time

4. Factors Affecting the Number of Access Points Needed

Three factors that affect the number of access points needed for wireless connectivity are:

  • The size of the building
  • The number of solid interior walls in the building
  • The presence of microwave ovens in various offices

5. Why is Security Important in Wireless Networks?

Security is crucial because wireless networks broadcast data over a medium that

... Continue reading "Wireless Network Technology: Key Concepts and Security" »

Prolog vs CLIPS: A Detailed Comparison with Examples

Classified in Computers

Written on in English with a size of 197.63 KB

Prolog vs. CLIPS: A Detailed Comparison

This document provides a comparison between Prolog and CLIPS, two popular languages used in artificial intelligence and expert systems development. We will explore their syntax, features, and applications through examples.

Facts and Rules

Prolog:

Facts:


father(tom, john).  % tom is father of john
mother(susan, john). % susan is mother of john
father(george, tom). % george is father of tom

Rules:


parent(X, Y) :- father(X, Y), mother(X, Y).
grandparent(X, Z) :- parent(X, Y), parent(Y, Z).
grandfather(X, Z) :- father(X, Y), parent(Y, Z).
grandmother(X, Z) :- mother(X, Y), parent(Y, Z).

CLIPS:

Facts:


(deffacts families
  (father tom john) ; tom is father of john
  (mother susan john) ; susan is mother of
... Continue reading "Prolog vs CLIPS: A Detailed Comparison with Examples" »

Operating System Core Functions and Digital Signature Essentials

Classified in Computers

Written on in English with a size of 3.12 KB

Operating System Core Functions

A program in execution requires resources for its tasks. The Operating System (OS) is responsible for managing these resources through various core functions.

Process Management

The OS is responsible for:

  • Creating and destroying processes.
  • Pausing and resuming processes.
  • Providing mechanisms to communicate and synchronize processes.

Memory Management

Memory is a table of words, each referenced using a unique address. The OS is accountable for:

  • Knowing which parts of memory are used and by whom.
  • Deciding which processes are loaded into memory when space is available.
  • Assigning and reclaiming memory space when needed.

Secondary Storage Management

Secondary storage is necessary because main memory is volatile and often too small... Continue reading "Operating System Core Functions and Digital Signature Essentials" »

Relational Database Concepts: Keys, Views, and SQL

Classified in Computers

Written on in English with a size of 14.08 KB

Relational Keys

Superkey: Set of attributes with all those needed to ID a particular row. Candidate key: Minimal superkey; removing any attribute means it is no longer a superkey; can be multiple per relation; "UNIQUE". Strict: Candidate key + at least 1 extra attribute. Primary: Default candidate key, reference for foreign keys; automatically unique; "PRIMARY KEY". Foreign: "Logical pointer" in a dependent relation that refers to the candidate key in the parent relation (not always primary). Natural: Represent conceptual uniqueness constraints external to the DB, e.g., name, address. Artificial: Introduced solely for the DB, no external meaning, e.g., auto-generated ID; single attribute, simple data type. Surrogate: If artificial is used as
... Continue reading "Relational Database Concepts: Keys, Views, and SQL" »

OSI Model and TCP/IP: Understanding Network Layers

Classified in Computers

Written on in English with a size of 3.85 KB

The Open Systems Interconnection Model

The Open Systems Interconnection (OSI) model is an abstract, layered representation created as a reference for network protocol design. The OSI model divides the process of networking into different logical layers, each of which has unique functionality and to which specific services and protocols are assigned.

Application Layer

The application layer, the seventh layer, is the top layer of both the OSI and TCP/IP models.

Presentation Layer

The presentation layer has three main functions:

  • Coding and data conversion of the application layer to ensure that data from the source device can be interpreted by the appropriate application on the target device.
  • Compression of the data in a way that can be decompressed
... Continue reading "OSI Model and TCP/IP: Understanding Network Layers" »

Network Protocol Fundamentals and Performance Analysis

Classified in Computers

Written on in English with a size of 10.64 KB

Layered Protocols: Advantages and Disadvantages

Layered protocols are a fundamental concept in network design. Understanding their benefits and drawbacks is crucial for efficient system development.

Reasons for Using Layered Protocols

Using layered protocols offers several benefits, including:

  • Breaking up the design problem into smaller, more manageable pieces.
  • Allowing protocols to be changed without affecting higher or lower layers, promoting modularity and flexibility.

Disadvantages of Layered Protocols

Potential drawbacks of using layered protocols include:

  • More overhead: This is due to added information or operations performed in each layer, which can increase processing and transmission costs.
  • Information hiding: Information useful for other layers
... Continue reading "Network Protocol Fundamentals and Performance Analysis" »