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

Comprehensive Guide to Digital Certificates, Security Protocols, and Computer Architecture

Computer science6.87 KB

Data Items in a Digital Certificate

  • Serial Number
  • Certificate Authority (CA) that issued the certificate
  • CA Digital Signature
  • Name of company/organization/individual owning the certificate
  • Subject Public Key
  • Validity Period of the certificate
  • Hashing Algorithm

Conditions for Message Authenticity

  • Digital Certificate
  • Inclusion of Public Key
  • Use of Public Key to hash the received message and produce a message digest
  • Comparison of the generated hash to the digital signature

Usage of Encrypted Message Digest

  • Financial Transactions
  • Legal Documents
  • Software Distribution

Process of Digital Signature

  1. Software is put through a hashing algorithm.
  2. The hash total is encrypted with a private key.
  3. The software and encrypted digest hash/digital signature are sent.
  4. The receiver
...
Continue reading "Comprehensive Guide to Digital Certificates, Security Protocols, and Computer Architecture" »

Using Voicemail, Intranet, and More

Computer science2.63 KB

Using Voicemail

  • Contact someone off the hook: Press this button
  • Delete: Press receiver
  • Dial a phone number: Record an outgoing message
  • Enter your access code: Replay
  • Fast forward: Retrieve
  • Listen to incoming messages: Review
  • Location: Rewind
  • Loud/Loudspeaker: Volume
  • Modify: Save

Using the Intranet

  • Attachment: doc. adjunto
  • Background: fondo
  • Bold: negrita
  • Bullet: viñeta
  • Column: Lower case letters: minúscula
  • Copy: Paragraph
  • Cut: Password
  • Desktop: Paste
  • Double click: Reply: contestar
  • Flow chart: organigrama
  • Font: Row: fila
  • Forward: reenviar
  • Heading: título
  • Icon: Italics: cursiva
  • Log in: iniciar sesión
  • Log out: cerrar sesión
  • Underline: subrayar
  • Upper case letters: mayúscula
  • Username:

Extra

  • Alignment: alineación
  • Flash: destello
  • Headset: auriculares
  • Hold: espera
  • Increased security:
...
Continue reading "Using Voicemail, Intranet, and More" »

C++ Queue Data Structure Implementation

Computer science6.1 KB

This document presents a C++ implementation of a Queue data structure, demonstrating its core functionalities and operations. The Queue is implemented using a linked list, adhering to the First-In, First-Out (FIFO) principle.

Queue Class Definition

The Queue class encapsulates the data members and member functions necessary to manage a queue. Note that the Node struct/class is assumed to be defined elsewhere, typically as struct Node { double info; Node* link; };.

class Queue
{
private:
    Node* front;
    Node* rear;
    int count;
    double info; // This member 'info' within the Queue class itself seems unused in the provided code.
public:
    // Constructor: Should be 'Queue();' without 'void'. Implementation is missing.
    Queue();
...
Continue reading "C++ Queue Data Structure Implementation" »

Software Design Principles and UML Diagrams Explained

Computer science4.2 KB

Dimensions of Software Design

Software design involves several key dimensions:

  • Problem solving
  • Modeling
  • Specification
  • Organizing the solution
  • Communication
  • Economics and reuse
  • Maintenance and evolution

Design Approaches

Divide-and-Conquer

A problem is decomposed into subproblems that are worked on independently. This approach can be applied recursively for complex problems and allows managers to allocate work to multiple people.

Procedural Design

Design is viewed as a set of procedures that are composed:

  • Sequentially
  • Conditionally
  • Iteratively
  • Hierarchically

Borderline Procedural Design

In this approach, the main steps are not fixed. The user has choices with few constraints, and there is typically a main loop to find the next operation.

Event-Driven Design

This...

Continue reading "Software Design Principles and UML Diagrams Explained" »

Understanding Key Computer Science Concepts

Computer science3.47 KB

Fetch-Execute Cycle

  1. The address in the program counter is transferred within the CPU to the Memory Address Register (MAR).
  2. During the next clock cycle, two things happen simultaneously:
    • The instruction held in the address pointed to by the MAR is fetched into the Memory Data Register (MDR).
    • The address stored in the program counter is incremented.
  3. The instruction stored in the MDR is transferred within the CPU to the Current Instruction Register (CIR).

Sound Sampling

  1. The amplitude of the sound wave is determined to get an approximation of the sound wave.
  2. This is encoded as a sequence of binary numbers and converted to a digital signal.
  3. Increasing the sampling rate will improve the accuracy of the recording.

Run-Length Encoding (RLE)

  1. RLE is a lossless
...
Continue reading "Understanding Key Computer Science Concepts" »

Computer Network Basics: Concepts, Types, and Hardware

Computer science4.75 KB

Understanding Computer Networks

A network is created when more than one device is connected together. A network can be a small collection of computers connected within a building (e.g., a school, business, or home) or it can be a wide collection of computers connected around the world.

Data Packet Transmission

The main purpose of networking is to share data between computers. A file has to be broken up into small chunks of data known as data packets in order to be transmitted over a network. The data is then rebuilt once it reaches the destination computer. Networking hardware is required to connect computers and manage how data packets are communicated. Protocols are used to control how data is transmitted across networks.

Local Area Networks

...
Continue reading "Computer Network Basics: Concepts, Types, and Hardware" »

Mechatronics Engineer Job Description

Computer science2.19 KB

Mechatronics engineers are responsible for designing mechanical equipment. Combining their knowledge of computer, mechanical, and electrical engineering, they develop various automated products, such as cameras, cars, and aircraft. The engineering process typically involves designing and assembling components, testing products in development, making improvements, and evaluating finished products. Engineers must also assess equipment and publish reports outlining production factors, such as practical use, safety, and cost.

Work Areas:

  • Electronics Development Unit
  • Software Development Unit
  • Project Management Unit
  • Biomechanical Development Unit including our Mechanical Shop and Scientific Glassblower

Mechanical Engineer Job Duties:

  • Evaluates mechanical
...
Continue reading "Mechatronics Engineer Job Description" »

VHDL Code for SR, JK, and T Flip-Flops

Computer science8.25 KB

SR Flip-Flop Logic Diagram SR Flip-Flop Truth Table

VHDL Code for SR Flip-Flop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity SR_FF is
PORT( S, R, CLOCK: in std_logic;
      Q, QBAR: out std_logic);
end SR_FF;

Architecture behavioral of SR_FF is
begin
  PROCESS(CLOCK)
  variable tmp: std_logic;
  begin
    if(CLOCK='1' and CLOCK'EVENT) then
      if(S='0' and R='0')then
        tmp:=tmp;
      elsif(S='1' and R='1')then
        tmp:='Z';
      elsif(S='0' and R='1')then
        tmp:='0';
      else
        tmp:='1';
      end if;
    end if;
    Q <= tmp;
    QBAR <= not tmp;
  end PROCESS;
end behavioral;

JK Flip-Flop Logic Diagram JK Flip-Flop Truth Table

VHDL Code for JK Flip-Flop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
library
...
Continue reading "VHDL Code for SR, JK, and T Flip-Flops" »

Top-Down Design and Control Structures in Python

Computer science3.35 KB

3/10/16 Notes

Chapter 7/8

Top-Down Design

Takes the most basic aspect of a program and breaks it down into subprograms.

Control Structure

An expression that determines the order in which a program executes.

In Python, this is an if statement.

It can also be a looping statement.

Boolean Expression

A "True or False" program statement.

Composite Data Types

Example:

  • numbers[0] = 1066
  • numbers[1] = 1492
  • numbers[2] = 999
  • numbers[3] = 553
  • numbers[4] = 1892

Example Code:

for i in range(3):
    print(numbers[i])

Arrays

When data is being read into an array, a counter is updated for each operation (e.g., for i in range(5)).

Sequential Search of an Unsorted Array

A sequential search examines each item in turn and compares it to the target item. If it matches, the item is found....

Continue reading "Top-Down Design and Control Structures in Python" »

Malicious Software: Types, Threats, and Advanced Viruses

Computer science3.31 KB

Logic Bombs and Resource Exhaustion Attacks

Logic Bombs

A logic bomb is a program that performs an action violating the site security policy when a specific external event occurs. These are typically associated with insider threats.

Example: A program that deletes a company’s payroll records when one particular record is deleted.

  • The "particular record" is usually that of the person who created the logic bomb.
  • The idea is that if (or when) the creator is fired and their payroll record is deleted, the company loses all those records.

Rabbits and Bacteria (Resource Exhaustion)

Rabbits or Bacteria refer to programs designed to absorb all of a specific class of system resources, leading to denial of service or system instability.

Example: For a UNIX...

Continue reading "Malicious Software: Types, Threats, and Advanced Viruses" »