CS PAPER1

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/173

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

174 Terms

1
New cards
Control Unit (CU)
Sends control signals, executes programs via the fetch-decode-execute cycle, contains the clock, and the decoder.
2
New cards
Arithmetic Logic Unit (ALU)
Carries out calculations (add, subtract, multiply, divide) and logical operations (>,
3
New cards
Program Counter (PC)
Holds the memory address of the next instruction.
4
New cards
Memory Address Register (MAR)
Stores the address of data fetched from or sent to memory.
5
New cards
Memory Data Register (MDR)
Stores the data fetched from or about to be stored in memory.
6
New cards
Current Instruction Register (CIR)
Stores the most recently fetched instruction.
7
New cards
Accumulator (ACC)
Holds results of calculations/operations from the ALU.
8
New cards
Address Bus
Provides memory addresses to system memory or I/O devices.
9
New cards
Data Bus
Transfers data between the CPU and memory or I/O devices.
10
New cards
Control Bus
Provides control signals for memory or I/O operations (read/write).
11
New cards
Fetch-Decode-Execute Cycle
A process where the CPU fetches an instruction, decodes it, and executes it.
12
New cards
Clock Speed
Higher clock speed means more instructions can be completed per second.
13
New cards
Cache
Small, fast memory within the CPU that stores frequently or recently used data/instructions.
14
New cards
Number of Cores
Each core is a complete processing unit with its own CU, ALU, registers, etc.
15
New cards
Pipelining
A technique where the CPU fetches one instruction while decoding the prior and executing the one before that.
16
New cards
Von Neumann Architecture
Single CU and ALU. Instructions and data stored together in the same memory.
17
New cards
Harvard Architecture
Separate memory for data and programs, each with a different bus.
18
New cards
Contemporary Architecture
Uses parallel processing, including pipelining, array processing (SIMD), and multicore processing (MIMD).
19
New cards
CISC (Complex Instruction Set Computing)
Supports more instructions, requires more transistors, larger, more power, more heat.
20
New cards
RISC (Reduced Instruction Set Computing)
Supports fewer instructions, requires less transistors, smaller, less power, less heat.
21
New cards
GPU (Graphics Processing Unit)
Specifically designed for graphics calculations.
22
New cards
Applications of GPUs
Gaming, animation, computer-aided design, modelling physical systems, audio processing, cryptography, machine learning, and more.
23
New cards
Parallel Processing
Simultaneous processing of data.
24
New cards
SIMD (Single Instruction, Multiple Data)
Same operation on multiple data sets.
25
New cards
MIMD
Different instructions on different data sets, often using multiple cores or CPUs. Can be achieved by having multiple cores inside a CPU or across workstations, supercomputers, and distributed systems.
26
New cards
Input Devices
Keyboard, mouse, microphone, scanner, joystick.
27
New cards
Output Devices
Printer, speakers, monitors, actuators.
28
New cards
Storage Devices
Used to hold data and programs long-term and are non-volatile.
29
New cards
Categories of storage
Magnetic, Flash, and Optical.
30
New cards
Magnetic Storage
Hard disk drives, magnetic tape. High capacity, low cost but vulnerable to magnetic fields and shock.
31
New cards
Optical Storage
CDs, DVDs, Blu-rays. Cheap to produce, fairly reliable if not scratched.
32
New cards
Flash Memory
Memory sticks, memory cards, SSDs. High speed, low power, but more expensive per gigabyte.
33
New cards
RAM
Primary memory for temporarily storing programs and data being run by the computer.
34
New cards
ROM
Primary memory that is non-volatile and stores instructions to boot the computer (BIOS). Can contain the firmware for an embedded system.
35
New cards
Virtual Storage
Data stored over the internet rather than locally.
36
New cards
Advantages of Virtual Storage
Access from anywhere, easy data sharing, scalability, backup and security handled by a third party.
37
New cards
Disadvantages of Virtual Storage
Requires fast internet, can be expensive for large amounts of data, requires trusting the service provider.
38
New cards
Operating System (OS)
An OS manages computer hardware and software.
39
New cards
Purposes of an OS
Manages hardware/peripherals, provides a user interface, provides a platform to run software, manages system security, manages CPU usage through scheduling and interrupts, provides utilities for system maintenance, manages available memory.
40
New cards
Memory Management
The memory manager controls RAM allocation for running processes.
41
New cards
Virtual Memory
Manages virtual memory to load/run programs even if physical RAM is full.
42
New cards
Interrupts
Signals from hardware or software that need the CPU's immediate attention.
43
New cards
Process of handling Interrupts
1. The CPU checks for interrupts at the end of each fetch-decode-execute cycle. 2. If an interrupt of higher priority occurs the program counter and other registers are copied to the stack. 3. The interrupt service routine (ISR) is loaded. 4. After the ISR is complete the program counter and registers are restored and normal program execution resumes.
44
New cards
CPU Scheduling
The OS uses algorithms to share processor time between multiple running applications.
45
New cards
CPU Scheduling Algorithms
Round Robin, First Come First Served, Shortest Job First, Shortest Remaining Time, Multi-level Feedback Queues.
46
New cards
Types of Operating Systems
Multitasking OS, Multi-user OS, Distributed OS, Embedded OS, Real-time OS.
47
New cards
Device Drivers
Software that allows the OS to understand data from external devices.
48
New cards
BIOS
Controls the startup sequence and configures hardware.
49
New cards
Virtual Machine (VM)
A program that simulates a computer in software.
50
New cards
Uses of Virtual Machines
Run multiple operating systems on the same computer, split a powerful server into smaller VMs, and improve security.
51
New cards
Application Software
Software that allows a user to perform a task or produce something (e.g., word processor, spreadsheet).
52
New cards
Utilities
Small programs for system maintenance (e.g., disk cleanup, defragmenter, compression, encryption).
53
New cards
Open Source Software
Source code is available, often free, can be modified by users. Encourages collaboration.
54
New cards
Closed Source Software
Source code is proprietary, usually more polished and user-friendly, often with warranty/support.
55
New cards
Assembler
Converts assembly code into machine code.
56
New cards
Interpreter
Converts high-level code line by line, good for debugging.
57
New cards
Compiler
Converts high-level code into machine code all at once, faster execution.
58
New cards
Lexical Analysis
Removes comments and whitespace, creates tokens, builds a symbol table.
59
New cards
Syntax Analysis
Produces an abstract syntax tree to represent the program, checks for correct syntax.
60
New cards
Code Generation and Optimization
Converts the syntax tree into object code. Compilers are tweaked to optimize for either speed or memory.
61
New cards
Linkers
Incorporate library code into the final program.
62
New cards
Loaders
Responsible for loading the executable file into memory.
63
New cards
Waterfall
Sequential stages, linear. Good for clear outputs and stable requirements but inflexible.
64
New cards
Rapid Application Development (RAD)
Builds a prototype, iteratively refined. Good for unclear requirements but doesn't scale well.
65
New cards
Spiral Model
Manages risk at each stage, good for large, risky projects. Requires expertise in risk analysis.
66
New cards
Agile
Deals with changing requirements. Includes Extreme Programming (XP) which focuses on high-quality code.
67
New cards
Algorithmic Thinking
A process for solving problems using a set of instructions (an algorithm). Can be represented using pseudocode or flowcharts.
68
New cards
Low-Level Languages
Machine code and Assembly language, close control of CPU, very efficient.
69
New cards
High-Level Languages
Closer to human language.
70
New cards
Imperative Programming
Tells the computer what to do step by step.
71
New cards
Procedural Programming
Instructions in sequence, broken into procedures/functions (e.g., Basic, C, Pascal).
72
New cards
Object-Oriented Programming
Uses interacting objects (e.g., Java, C++, C#).
73
New cards
Declarative Programming
Tells the computer the qualities of the solution not how to compute it.
74
New cards
Logic Programming
For AI applications (e.g., Prolog).
75
New cards
Functional Programming
For calculations and simulations (e.g., Lisp, Wolfram).
76
New cards
Assembly Language
Uses mnemonics to represent machine code instructions.
77
New cards
Little Man Computer (LMC)
A simplified version used for learning purposes.
78
New cards
Simple LMC Program
1. INP: Input a number and store it in the accumulator. 2. STA num: Store the accumulator value in memory location num. 3. INP: Input a second number, overwrites accumulator value. 4. ADD num: Add the value in memory location num to the accumulator. 5. OUT: Output the value in the accumulator. 6. HLT: Halt the program. 7. num DAT: Declare a memory location labelled num.
79
New cards
LMC program
A program that compares two numbers using a series of instructions including input, storage, subtraction, and output.
80
New cards
Immediate Addressing
The data to be used is hardcoded into the instruction.
81
New cards
Direct Addressing
The operand contains the memory address.
82
New cards
Indirect Addressing
The operand contains the memory address where the data address is stored.
83
New cards
Indexed Addressing
The final address is calculated by adding an offset to a base address.
84
New cards
Object-Oriented Programming (OOP)
Organizes programs around data/objects rather than functions/logic.
85
New cards
Class
A template for creating objects (defines attributes and methods).
86
New cards
Object
An instance of a class with specific attributes and behaviors.
87
New cards
Attributes
Data fields that describe an object.
88
New cards
Methods
Procedures and functions to act on the object's data.
89
New cards
Abstraction
Hides internal mechanisms, revealing only relevant details.
90
New cards
Encapsulation
Data and methods are bundled within the object. Data is made private and not accessible from outside of the class to provide program security.
91
New cards
Inheritance
Class inherits attributes and methods from a parent class.
92
New cards
Polymorphism
Use the same code to process different objects based on their type.
93
New cards
Compression
Reduces file size.
94
New cards
Lossy Compression
Removes data to reduce file size, irreversible, reduces quality (e.g. images, videos).
95
New cards
Lossless Compression
No data is lost, reversible, maintains original quality.
96
New cards
Run Length Encoding (RLE)
Replaces repeating sequences of data with a single data value and a count.
97
New cards
Dictionary Coding
Stores repeated data once in a dictionary with a pointer to its position.
98
New cards
Encryption
Scrambling data so only authorized users can read it.
99
New cards
Symmetric Encryption
Same key for encryption and decryption.
100
New cards
Asymmetric Encryption
Two different keys (public and private). Public key encrypts and private key decrypts. Better for internet use because the keys do not need to be exchanged.