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

Understanding Fuzzy Logic and Backpropagation in Neural Networks

Computer science2.43 KB

Fuzzy Logic

Fuzzy logic extends Boolean logic, allowing intermediate values between TRUE (1) and FALSE (0), such as MAYBE (0.5). A fuzzy logic value can be any value within the range of 0 to 1. This logic incorporates statistical concepts, especially in inference. Fuzzy logic implementations enable control devices to handle indeterminate states, allowing for the evaluation of non-quantifiable concepts. Practical examples include evaluating temperature (hot, warm, medium), happiness (bright, happy, apathetic, sad), and the veracity of an argument (absolutely right, right, counter-argumentative, inconsistent, false, totally wrong).

Fuzzy logic is a research area focused on uncertainty treatment and a family of mathematical models dedicated to...

Continue reading "Understanding Fuzzy Logic and Backpropagation in Neural Networks" »

Cisco IOS Configuration Commands and Security Settings

Computer science4.53 KB

Cisco Device Access and Security Passwords

  • Console Password: Provides limited access for devices via the console connection.
  • Enable Password: Restricts access to the privileged EXEC mode.
  • Enable Secret Password: An encrypted password restricting access to the privileged EXEC mode.
  • VTY Password: Limits access to devices using Telnet.

Basic Configuration Command Examples

Console Access Configuration

Switch(config)# line console 0
Switch(config-line)# password password
Switch(config-line)# login

Virtual Terminal (VTY) Access

Router(config)# line vty 0 4
Router(config-line)# password password
Router(config-line)# login

Banner Message of the Day

Switch(config)# banner motd # message #

Interface IP Address Assignment

Router(config)# interface FastEthernet 0/0
Router(

...
Continue reading "Cisco IOS Configuration Commands and Security Settings" »

Session Layer Protocol: SPDU Exchange, Tokens and Dialogue

Computer science2.73 KB

Session Layer Protocol and SPDU Exchange

The session protocol establishes the rules for exchanging data and control information between peer entities using a session transport connection. The abstract session protocol machine communicates with the user through a SSAP (Session Service Access Point) via the exchange of session service primitives, and with the supplier via a TSAP (Transport Service Access Point).

The relationship between the exchange of primitives and the procedures of the protocol is as follows:

  • If the machine receives a Session Protocol Data Unit (SPDU) delivered by the supplier (transport layer), an indication or confirmation of the user service is generated (for example, an early indication or confirmation).
  • If the user sends
...
Continue reading "Session Layer Protocol: SPDU Exchange, Tokens and Dialogue" »

Common Gateway Interface (CGI) and Web Server Interaction

Computer science3.5 KB

What is a Common Gateway Interface (CGI)?

A CGI (Common Gateway Interface) is a program that runs in real time on a Web Server in response to a request from a browser. When this happens, the Web Server executes a child process to receive the data sent by the user (if it exists), makes some silky sheets of the same data available as environment variables, and captures the output of the program to send a response to the browser. The CGI's purpose is to provide intelligence and interactivity to a website.

Basic CGI Structure in C Language

The basic body of a CGI in C language is:

/* Hello World Program */
/* Compile in Linux: gcc hello.c -o hello.cgi */

#include <stdio.h>

int main() {
    printf("Content-Type: text/html\n\n");
    printf("
...
Continue reading "Common Gateway Interface (CGI) and Web Server Interaction" »

MFS File System Operations in C

Computer science3.59 KB

Code fragment likely from mfs_readdir:


int inodo_root_previo = get_inodo_previo(fs, dir->path); // obtain prior entry inode
inode_read(fs, &ino_previo, inodo_root_previo);
// Checking to see if what we are reading is a directory or not, and storing in variables
if (inodo_root_previo != -1) {
    if (inodo_root_previo > 0)
        root_is_dir = is_dir(fs, &ino_previo, name(fs, dir->num_inodo));
    else
        root_is_dir = is_dir(fs, &ino_previo, dir->path);
    if (root_is_dir == 0) {
        if (inodo_root_previo > 0) {
            strcpy(entry->d_name, name(fs, dir->num_inodo)); // assign the name of the entry
        } else {
            strcpy(entry->d_name, dir->path); // Assign the name of the
...
Continue reading "MFS File System Operations in C" »

8086 Microprocessor Interrupts: Hardware, Software, and Exceptions

Computer science3.1 KB

Types of Interrupts in the 8086 Microprocessor

The 8086 microprocessor utilizes various mechanisms to handle external events and internal errors. These mechanisms are categorized into three primary types of interrupts: Hardware, Software, and Internal (Exceptions).

1. Hardware Interrupts

Hardware interrupts are generated by external hardware devices to request service from the microprocessor. The 8086 supports two hardware interrupt pins:

  • INTR (Interrupt Request)

    This is a maskable interrupt, meaning it can be enabled or disabled using the IF (Interrupt Flag) in the flag register. When an external device wants to interrupt the microprocessor, it sends a signal on the INTR pin.

    The 8086 acknowledges the interrupt if the IF flag is set, and the INTA

...
Continue reading "8086 Microprocessor Interrupts: Hardware, Software, and Exceptions" »

8086 Microprocessor Execution Unit Architecture Explained

Computer science2.23 KB

Execution Unit (EU) of 8086 Architecture

The Execution Unit (EU) is a fundamental component of the 8086 microprocessor, responsible for the actual execution of instructions. It performs arithmetic and logical operations, manages data flow, and controls internal registers.

Key Components of the EU

  • Arithmetic Logic Unit (ALU): The heart of the EU, performing all arithmetic (addition, subtraction, multiplication, division) and logical (AND, OR, NOT, XOR) operations. It processes data from registers and returns the results.
  • Registers: High-speed storage locations directly accessible by the CPU:
    • General-purpose: AX, BX, CX, DX for data storage.
    • Segment: CS, DS, ES, SS for memory addressing.
    • Pointer and Index: SP, BP, SI, DI for memory management.
    • Instruction
...
Continue reading "8086 Microprocessor Execution Unit Architecture Explained" »

10 Usability Heuristics for User Interface Design

Computer science2.46 KB

1. Visibility of System Status

The system should always keep users informed about what is going on, through appropriate feedback within a reasonable time.

2. Match Between System and the Real World

The system should speak the user's language, with words, phrases, and concepts familiar to the user, rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.

3. User Control and Freedom

Users often choose system functions by mistake and will need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Support undo and redo.

4. Consistency and Standards

Users should not have to wonder whether different words, situations, or actions...

Continue reading "10 Usability Heuristics for User Interface Design" »

8051 Microcontroller: Memory Organization and ALU

Computer science3 KB

1.2. Organization of Memory

On Intel's 8051 family, program storage and data are physically separate. Both data and programs can be stored in internal or external memory devices. To identify external memory locations accessed during instruction execution, the microprocessor generates pulses on the ALE (Address Latch Enable) line and controls the PSEN (Program Store Enable) output state.

1.2.1. Program Memory

In 8051-based systems, the selection of program memory (internal and external) is determined by the hardware designer. The microprocessor accesses external memory only if the EA (External Access Enable) pin is connected to ground. If EA is high (connected to Vcc), the microprocessor uses its internal memory for low addresses and external memory...

Continue reading "8051 Microcontroller: Memory Organization and ALU" »