1/25
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Arithmetic and Logic Unit (ALU)
Handles all arithmetic (addition / subtraction) and logical (AND/OR) calculations
Functions of the Control Unit
Handle loading of new instructions into the CPU and decode them
Direct data flow and ALU
Registers
Are small, very fast circuits that store intermediate values from calculations or instructions inside the CPU
Examples are the Memory Address Register (MAR) and the Memory Data Register (MDR)
Memory Address Register (MAR)
Contains RAM address of the instruction the CPU wants next
Memory Data Register (MDR)
Holds data that will be written to or was read from the RAM
Busses
The connecting wires that connect the CPU to other devices as they carry instructions.
1) Data bus (RAM → CPU via MDR)
2) Control bus (RAM → via CPU CU)
3) Memory bus (RAM → CPU via MAR)
Primary memory
Random Access Memory (RAM) and Read-only Memory (ROM).
RAM: “Short term”, volatile - loses its contents when power shuts off
ROM: Stores permanent instructions to boot up computer, holds the Basic Input Output System, non-volatile
Use of cache memory
High-speed memory in the CPU that stores instructions from the RAM. It’s checked by the processor first, if data is found, = cache hit. If data isn’t found = cache miss and RAM is searched. It is closer to the CPU than the RAM, which is why it’s high speed.
CPU <=> L1 Cache <=> L2 Cache <=> L3 Cache <=> RAM
Fetch-Decode-Execute Cycle
Address to be checked appears in the Program Counter (PC).
The address of the next instruction is copied onto the MAR from PC.
MAR sends address to RAM and is then sent to the MDR.
The instruction, stored in the MDR, is then copied into the CIR.
Instructions are sent to the CU to be executed by the ALU.
PC → MAR → RAM → MDR → CIR → CU → ALU
The computer only requires one cycle to reach a result.
The need for persistent storage (secondary storage)
The processing done in CPU has no permanent storage has the RAM is volatile therefore HDD (Hard disk drives) and SSD (Solid state drives) allows for persistent storage. They are slower compared to primary storage but are cheaper.
Operating systems
Set of software that controls computer’s hardware and resources and provides services for computer programs
Functions of an operating system
User interface: link between hardware and user
Graphical User Interface (GUI): menus, icons, point & click
Command Line Interface (CLI): user type in commands and code
Natural Language Interface (NLI): user can speak to computer e.g. Siri
Menu Based Interface (MBI): similar to CLI but only menu options
Memory management: tracks storage devices and controls which applications have access to RAM
Provide file management services
Notifies user when memory is full
User can copy and delete files
Peripheral management: controlling keyboards, mouses, monitors, and printers through device drivers
Coordinate with BIOS
Use device drivers to interface with peripherals
Multitasking: allocating CPU cycles to programs based on prioriy and time
Security: prevents unauthorised access through usernames and passwords
The range of application software
Word processor stores, manipulates, and formats text entered from a keyboard to make a printout
Spreadsheet programs arranges data in a grid table to be manipulated and used in calculations
Database management systems provides users and programmers a systematic way to create, retrieve, update, and manage data
Email clients help in accessing and managing user’s emails.
Web browsers retrieve and navigate information resources on the World Wide Web
Computer Aided Design programs use computer systems to create, modify, or optimise a design.
Graphic Processing Software enables users to manipulate visual images on a computer
Programming features
Consistent grammar and syntax
Can define basic data types and operations
Can handle input and output
Can provide a conditional loop
Must have a compiler or interpreter
High-level vs low-level programming languages
High-level provide greater abstraction from hardware whereas low-level languages require interaction with hardware specifics e.g. memory addresses and registers
High-level languages are generally easier to learn as they are more similar to the natural human language
Low-level language have finer control and faster performance due to their proximity to machine code
Compiler
Translates code written in high-level language into machine code (takes it chunk by chunk)
Interpreter
Directly executes instructions in a programming language (line-by-line)
Differences between high-level programming languages
Method of translation - compiler and/or interpreter
Loosely/strongly typed - whether data types are specified or not
Compatibility with different environments
Syntax differences
ASCII vs Unicode
Unicode can represent multiple languages
ASCII uses 8 bits for each character
Logic gates
NOT, AND, OR, XOR, NAND, XOR
NOT logic gate
A | NOT A
0 | 1
1 | 0
AND logic gate
A | B | A AND B
0 | 0 | 1
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1
OR logic gate
A | B | A OR B
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1
XOR logic gate
A | B | A XOR B
0 | 0 | 1
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0
NOR logic gate
A | B | A NOR B
0 | 0 | 1
0 | 1 | 0
1 | 0 | 0
1 | 1 | 0
XOR logic gate
A | B | A XOR B
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0