1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Hardware
comprised of physical, tangible parts.
Example: CPU, monitor, motherboard
Software
comprised of programs and operating systems.
Example: Windows, Linux, Microsoft Office, Zoom
Programs
composed of collections of instructions and procedures
that perform specific tasks on a computer.
Windows Command Line (CMD)
Windows’ text-based command interpreter that lets users interact with the computer by typing commands.
WMIC (Windows Management Instrumentation Command-line)
utility that queries, configures, and manages system settings via the WMI framework.
Binary: computers use the binary system, a system with two states. passing current or no current —> 1 or 0 ← called bit
true
How does the computer run a program?
The program is stored in RAM (memory cells with binary addresses), and the CPU executes it using the fetch–decode–execute cycle.
Von Neumann Architecture
One shared memory unit for program instructions and data, and one bus for memory access.
One arithmetic unit and one program control unit.
Instruction is fetched from memory and decoded, then relevant data is
fetched, then instruction is executed.
Requires at least two clock cycles to execute an instruction.
Due to single memory unit and single bus, limited bandwidth causes a
bottleneck situation.
Most commonly used in PCs.
Harvard Architecture
Two separate memory units: one for program instructions and one for
data.
A set of address and data buses to read and write data to memory, and another set of address and data buses to fetch instructions.
Can fetch instruction and data simultaneously.
Can execute an instruction in only one clock cycle.
Faster and no bottleneck issues.
Requires more memory and hardware.
Most commonly used in embedded devices and signal processing.
More and more modern computers are using this.
The algorithm can be described in a variety of ways
Plain English
Pseudo-code
Flowchart
Pseudocode
an artificial and informal language that helps
programmers develop algorithms.
"text-based" detail (algorithmic) design tool.
flowchart
a picture of the separate steps of a process in sequential
order. It is a generic tool that can be adapted for a wide variety of
purposes, and can be used to describe various processes, such as a
manufacturing process, an administrative or service process, or a
project plan.
23
programming language
a formal language comprising a set of
strings that produce various kinds of machine code output.
Program code
Implementation of an algorithm in a programming language.
Compiled
-Compiler converts the whole program to executable (machine code) before running.
-Runs faster and compiler not required to run the executable, but is more complex to develop.
-Allows the developer to have more control over hardware specs, i.e., memory management, CPU usage.
Examples: C, C++, Java, Rust, Go
Interpreted
converts the program to machine code instruction by instruction.
Easy to debug but a little slower - always requires interpreter to run.
More flexible, offer dynamic typing and smaller program size.
Examples: Python, Javascript, PHP, Ruby.
Strongly typed
A language that requires variable and object data types to be specified (integer,
string, float).
Allows for more structure, but less flexible
Loosely typed
A language that does not require variable and object data types to be specified.
More flexible and faster, but errors are more likely to occur.
Examples: JavaScript, Perl, Python, Ruby.
Fetch–Decode–Execute
Fetch Instruction (Control Unit → Main Memory):
The CPU’s Control Unit gets (fetches) the next instruction from Main Memory and stores it in a register.
Decode Instruction (Control Unit):
The Control Unit decodes the fetched instruction, figuring out what needs to be done.
Get Data (ALU → Registers/Main Memory):
If the instruction needs data (like numbers for a calculation), the CPU retrieves it from memory or registers.
Execute Instruction (ALU):
The Arithmetic Logic Unit (ALU) carries out the action (e.g., add, compare, move data).
Results may be stored back in registers or main memory.
👉 Then the cycle repeats for the next instruction.