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

Understanding Merkle Trees, Blockchain, and Digital Signatures

Computer science2.43 KB

Merkle Trees and Data Verification

A Merkle Tree is a method of structuring data that allows a large body of information to be verified for accuracy extremely quickly and efficiently. Every Merkle tree results in a single string of data, known as the Merkle root. With the Merkle root, plus a few other pieces of data, any computer can efficiently validate all of the other entries in the Merkle tree. Merkle trees are used in distributed systems for efficient data verification. They are efficient because they use hashes instead of full files. Hashes are ways of encoding files that are much smaller than the actual file itself.

Key Blockchain Components

  • Block: A block, sometimes called a physical record, is a sequence of bytes or bits, usually containing
...
Continue reading "Understanding Merkle Trees, Blockchain, and Digital Signatures" »

Web Design & Development Glossary: Terms and Definitions

Computer science3 KB

Web Design & Development

Common Terms

Web Design

Is the act or practice of determining how a website looks.

Web Development

Is the act or practice of determining how a website works.

Navigation

Is the act of using and finding things on a website.

CSS

(Cascading Style Sheets) is a simple language that decides how a web page looks.

Coding

Is the programming language that makes up a website.

Visibility

Is how easily people find a website using search engines, based on how many other websites link to it.

Usability

Is how easy it is for a person to use a website.

Content

Is the material on a web page, including text and graphics.

Appearance

Is how a web page looks.

Functionality

Is the ability of different elements of a website to work together.

Programming Languages

C

Is...

Continue reading "Web Design & Development Glossary: Terms and Definitions" »

Essential IT English: Vocabulary, Grammar, and Computer Concepts

Computer science3.87 KB

Topic 2: Information Technology Fundamentals

IT Vocabulary Exercises

Word Matching: Find the Synonyms/Related Terms

  • Click
  • Sharp
  • Back up
  • Range
  • Displays

Software Terminology Matching

  • 1. C
  • 2. F
  • 3. G
  • 4. H
  • 5. B
  • 6. D
  • 7. I
  • 8. E
  • 9. A

Listening Comprehension: True or False

  • (1, 4, 5, 8) = False
  • (2, 3, 6, 7) = True

Classifying Phrases for IT Descriptions

  • Consist of
  • Can be divided into
  • Includes
  • Is a type of
  • There are two classes

Workbook Activities: Computer Components

1. Hardware Parts Identification

  • Flat LCD monitor
  • Mouse
  • DVD Drive
  • Printer
  • Webcam

2. IT Crossword Puzzle Answers

  • 1. Input
  • 2. Port
  • 3. Keyboard
  • 4. CPU
  • 5. Peripherals
  • 6. Software
  • 7. Output
  • 8. Drive
  • 9. Hardware

3. Computer Device Types (Email Context)

  • Laptop
  • PDA
  • Mainframe
  • Tablet PC
  • Desktop PC

4. Prepositions for Classification

  • Classify into
  • Divide
...
Continue reading "Essential IT English: Vocabulary, Grammar, and Computer Concepts" »

Essential Programming Concepts: Variables, Data Types, and Algorithms

Computer science1.89 KB

Variables and Constants

Variable

A named data location in a program for a value that can be changed throughout the execution of the program.

  • Definition: A storage location containing data that can be modified.
  • Usage: Once created and assigned, a variable can be used repeatedly and reassigned new values.
  • Naming: Use descriptive names related to the stored data. Avoid spaces to prevent syntax errors.

Constant

A named data location in a program for a value that remains the same throughout the program's execution.

  • Definition: A storage location for values that should not change.
  • Benefit: Updating the value at the definition point automatically updates it everywhere the constant is used.

Data Types

  • String: A sequence of characters or symbols.
  • Numbers:
    • Integer:
...
Continue reading "Essential Programming Concepts: Variables, Data Types, and Algorithms" »

Understanding JavaScript Events and Methods

Computer science5.51 KB

Javascript

The async attribute allows the browser to process the web page concurrently with loading and processing the JavaScript.

The defer attribute allows the browser to load the web page concurrently with loading the JavaScript, but the JavaScript is not processed until the web page is completely loaded.script src="bootstrap.js" async>script>

A change event is caused by an element value being modified. Ex: Selecting an item in a radio button group causes a change event.

An input event is caused when the value of an input or textarea element is changed.

A load event is caused when the browser completes loading a resource and dependent resources. Usually load is used with the body element to execute code once all the web page's CSS, JavaScript,

...
Continue reading "Understanding JavaScript Events and Methods" »

OSI Model Security and Encryption Protocols

Computer science4.72 KB

Common Block Cipher Modes and Encryption

Double DES: This method uses two keys for encryption. It is susceptible to the meet-in-the-middle attack, where an attacker attempts to find a match such that E(k1, M) = D(k2, C).

ECB (Electronic Codebook): Each block is encoded with the same key. Information leakage can occur with repeated messages. While it is parallelizable, it is vulnerable to block replay attacks, where an attacker monitors and replays repeated messages.

CBC (Cipher Block Chaining): This mode uses a key and an Initialization Vector (IV). The IV ensures that the same plaintext produces different ciphers, which limits information leaks. However, patterns can still emerge in long messages, and the primary drawback is a lack of integrity....

Continue reading "OSI Model Security and Encryption Protocols" »

MIPS Hardware Multiplication and Branch Addressing Solutions

Computer science5 KB

MIPS Arithmetic and Addressing Solutions

This document provides detailed solutions for problems related to MIPS arithmetic hardware (non-optimized and optimized multiplication) and MIPS instruction addressing (beq, bne, and j instructions).

Multiplication Hardware Constants

  • UNSIGNED = 0
  • SIGNED = 1

Non-Optimized Multiplication Hardware

Unsigned Multiplication: 10111 × 01011

Use the non-optimized multiplication hardware to perform unsigned multiplication 10111 × 01011. Show the bit value of the multiplicand, the multiplier, and the product after Step 4, separated by commas.

Answer: 0101110000, 00000, 0011111101

Signed Multiplication: 1100111 × 0011011

Use the non-optimized multiplication hardware to perform signed multiplication 1100111 × 0011011....

Continue reading "MIPS Hardware Multiplication and Branch Addressing Solutions" »

Kernel System Calls, Synchronization, and OS Concepts

Computer science6.51 KB

Implementing a New System Call in the Kernel

Required Files to Add

  • /usr/src/test_kernel/SystemCalls/test_call.c:
    • Creates system call pointer.
    • Exports the pointer so that the system call module can access it.
    • Defines the system call wrapper.
  • /usr/src/test_kernel/SystemCalls/Makefile: obj-y := test_call.o (Compiles files directly into the kernel).

System Module Implementation

  • /usr/src/test_kernel/SystemModule/syscallModule.c:
    • Holds module code.
    • Implements system call behavior.
    • Registers system call pointer to the proper system call handler.
  • /usr/src/test_kernel/SystemModule/Makefile: obj-m := syscallmodule.o (Compiles file as a module).

Required Files to Modify

  • /usr/src/test_kernel/arch/x86/entry/syscalls/syscall_64.tbl: Add the system call to the table.
  • /usr/
...
Continue reading "Kernel System Calls, Synchronization, and OS Concepts" »

PL/SQL Video Store Management System: Procedures and Functions

Computer science5.11 KB

PL/SQL Video Store Management System

Sequence Creation

Create a sequence to automatically generate unique primary keys for members:

CREATE SEQUENCE SOCIO_PK_SEQ
INCREMENT BY 1
START WITH 01
MAXVALUE 1000
NOCYCLE;

Member Management Procedures

Create a procedure to register new members and execute test inserts:

CREATE OR REPLACE PROCEDURE NUEVO_SOCIO(
    P_APE1 SOCIOS.APE1%TYPE, 
    P_APE2 SOCIOS.APE2%TYPE, 
    P_DIREC SOCIOS.DIRECCION%TYPE, 
    P_CIUDAD SOCIOS.CIUDAD%TYPE, 
    P_TELEF SOCIOS.TELEFONO%TYPE
) IS
BEGIN
    INSERT INTO SOCIOS
    VALUES (SOCIO_PK_SEQ.NEXTVAL, P_APE1, P_APE2, P_DIREC, P_CIUDAD, P_TELEF, SYSDATE);
    COMMIT;
END NUEVO_SOCIO;
/

BEGIN 
    NUEVO_SOCIO('ARMENTEROS', 'NAVO', 'POZOA S/N', 'VITORIA', 945112233);
END;
/
...
Continue reading "PL/SQL Video Store Management System: Procedures and Functions" »

Networking Essentials: Devices, Protocols, Topologies

Computer science3.67 KB

Network Fundamentals: LANs and WANs

  • A Local Area Network (LAN) covers a small geographical area, such as a single site or building (e.g., a school or a college).

  • A Wide Area Network (WAN) covers a large geographical area. Most WANs are formed by connecting several LANs, with the internet being a prime example.

Virtual Private Networks (VPNs) Explained

A Virtual Private Network (VPN) is programming that creates a safe, encrypted connection over a less secure network. It provides business travelers with secure access to software applications hosted on proprietary networks. To gain access to a restricted resource through a VPN, the user must be authorized to use the VPN application and provide one or more authentication factors, such as a password....

Continue reading "Networking Essentials: Devices, Protocols, Topologies" »