CPU (Central Processing Unit)
Processes all instructions as binary code; code is executed here. Contains the ALU, CU, MAR and MDR
ALU (Arithmetic Logic Unit)
Performs all the basic arithmetic, logical, or input/output operations.
CU (Control Unit)
Is responsible for providing the ALU with the data that needs to be processed as well as processing instructions
MAR (Memory Address Register)
Holds the memory addresses of the data to be used by the ALU, so that the ALU can fetch the content and process it accordingly. The MAR may also hold the memory address where the data needs to be stored.
MDR (Memory Data Register)
The MDR holds the data that is to be used by the ALU and then saved to the RAM.
What are the two parts of the primary memory?
RAM and ROM
RAM (Random Access Memory)
“Short-term memory”
Consists of units of data, each with a hexadecimal address
Volatile - data lost when electricity is cut off (when computer is turned off) (non-persistent storage)
ROM (Read-Only Memory)
Used to store permanent instructions necessary to boot computer
Holds BIOS (Basic Input Output System)
Instructions written in factory
Non-volatile (data persists without electricity)
Cache
Stores frequently used instructions from RAM
Processor checks cache first
Increases speed of FDE cycle
Cache memory more expensive, but faster
Closer to CPU than RAM, which contributes to speed
Secondary Memory
Hard Drive, Removable Storage (USB Drive, CDs)
“Long-term Memory”
Persistent storage
Holds all data not currently in use
Data for running programs transferred from secondary to primary memory
Slower and cheaper than primary
Not directly connected to CPU
Much larger amounts
Virtual Memory
When primary memory overloaded, data sent to secondary
Slower
Temporary
Returned to primary memory as needed
Stored in units called “pages”
What are the steps in the fundamental operation of a computer?
Input (read) values
Processing/execution of values (eg calculate, decode, fetch, delete, evaluate, sort,
transfer, transmit)
Output data
Compare values
Store values in memory or secondary storage
What is the difference between fundamental and complex operation of a computer?
Complex operation requires a number of other, fundamental operations in order to reach the final result.
What is an OS?
Operating system. A set of software that controls computer’s hardware and resources and provides services for computer programs.
What are the five roles of an OS?
User interface
Memory Management
Peripheral Management
Multitasking
Security
What are the four types of UI?
GUI (Graphical User Interface) - menus, point and click
CLI (Command Line Interface) - type in commands
NLI (Natural Language Interface) - speak to computer (Siri)
MBI (Menu Based Interface) - Like CLI, but no commands, only menu option
What is involved in memory management?
Keep track of storage devices (HDD, Flash Drive)
Allocate memory (RAM) to programs
Modify memory locations
Sort data on disk drives and RAM for efficiency
Organize data into folders
Copy and delete files
What is involved in peripherals management?
Peripherals - keyboard, mouse, monitor, etc.
Coordinate with BIOS (basic input/output system)
Use device drivers to interface with peripherals
Device drives translate peripheral signal
What does it mean when an OS does multitasking?
Allocates CPU cycles to concurrent programs based on priority and time
Each program given a slice of time, or a “turn” to use CPU
Slices vary in length of time
What security does the OS provide?
Username and password
User permissions
File permissions for reading and writing
What are the features of a programming language?
Consistent grammar
Consistent syntax
Provide a way to define basic data types and operations on those types (ability to write functions/procedures)
Provide ability of input and output handling
Provide some kind of loop that can be stopped / conditional statement / branching (conditional and unconditional branching)
Has to run on/be able to be processed by a computer (ie it must have a compiler/interpreter)
Differences between high level and low level programming languages
Abstraction - High-level languages provide greater abstraction from the hardware, using human-readable syntax whereas low-level languages often require direct interaction with hardware specifics, such as memory addresses and registers
Ease of Use - High-level languages are generally easier to learn and use because they are closer to natural human language and automate many programming tasks
Performance and Control - Low-level languages offer finer control over system resources and potentially faster performance due to their proximity to machine code
What is a compiler?
translates code written in a high-level programming language into machine code (object code) that a computer's processor can execute
What is a interpreter?
Directly executes instructions written in a programming language (line-by-line) without requiring them to be first compiled into machine code
Differences between higher level programming languages?
Method of translation - whether by compiler or interpreter (or both)
Loosely/strongly typed - refers to whether data types are specified
Compatibility with different environments - Java with virtual
machine can run on all OSes, but some languages are OS specific
Syntax differences
Application Software
Word Processors (Word)
Spreadsheets (Excel)
Database Management System (DBMS) (MS Access)
Email Client (Outlook)
Web Browser (Google Chrome)
Computer Aided Design (CAD)
Graphic Processing Software (Photoshop)
Data storage units
1byte=8bits
1 kilobyte = 1024 bytes
1 megabyte = 1024 kilobytes
1 gigabyte = 1024 megabytes
1 terabyte = 1024 gigabytes
ASCII vs Unicode for displaying text
ASCII
Uses 8 bits for each character
7 bits used for each character, 1 bit is parity bit
2^7 or 128 possible characters
Lower case, capitals, numbers, symbols, spaces, punctuation included
Unicode
Used to represent multiple languages
More bits, so more characters can be represented
UTF-8 → 8 bits, UTF-16 → 16 bits, UTF-32→32 bits
What represents true in a truth table and what represents false?
True is represented by 1, and false is represented by 0.
Logic Gates: Not
Flips the value from true to false or vice versa.
Logic Gates: And
Only returns true if both values are true.
Logic gates: Or
Returns true if there is one true.
Logic Gates: Nand
Returns not and.
Logic gates: Nor
Returns not or.
Logic gates: xor
Returns the or value if both values are different; otherwise returns false.