ALL OF TOPIC 2 EXPLAINED IN ONE HOUR
Computer architecture: computers are made up of a processing module and a memory module.
CPU: central processing unit
Has the circuitry necessary to fetch, decode, and execute programme instructions from and to
the memory.
CU: control unit
Controls retrieval process of program instructions from the memory to the cpu and decoding the
commands. Send the decoded commands to the ALU.
Machine Instruction Cycle:
FDE - fetch decode execute orchestrated by control unit
Core refers to alu
Step 1:
load/retrieve instructions from memory
Step 2:
Deconde the instructions into commands
Step 3:
Execute the instructions
Step 4:
Send the output to memory
Programs are loaded from storage into RAM,
They are organized inside in terms of an address and the corresponding data.
Addresses in RAM are stored in hexadecimal form
and then sent to the CPU one by one to be decoded and executed.
ALU: Arithmetic logic unit
Is responsible for handling all the arithmetic and logic calculations, is sometimes referred to as
core
Registers:
Small, very fast memories which store the intermediate results of calculations; mini memories
inside the cpu itself.
Program counter:
Holds the memory address of the next instruction in the RAM
Accumulator:
Stores the intermediate results of calculations. Is located in the ALU
Registers hold very small amounts of memory, and are very fast
MAR: memory address register
Program counter sends an address to the MAR.
Stores the address of the instruction that the cpu wants next
MAR gives the MDR the address of the data it needs to hold
MDR: memory data register
Holds the data itself that is written to or from the RAM
Busses:
The wires which connect the CPU to other components, are usually a part of the motherboard.
Data bus: connects the CPU and ram through the cache memory and MDR
Control bus: connects the CPU and ram through the CU
Address/memory bus: connects the CPU and RAM through the MAR unidirectional from cpu to
RAM
Cycle of Instruction:
From PC to MAR
Program counter Holds the memory address of the next instruction in the RAM and sends it to
the MAR
From MAR to RAM thru address bus
The MAR sends the address to the RAM through the address bus
From RAM to MDR thru data bus
The RAM sends the corresponding data back to the CPU to the MDR through data busses
FROM MDR TO CU, in CIR thru data bus
Data is decoded by the CU and sent to the ALU for execution
ACC, accumulator, stores intermediate results between calculations, located in the ALU
CIR: holds the piece of instruction that’s about to be executed, in the CPU
Primary memory:
The only memory directly accessible by the CPU. Stores both instructions and data as binary
values, a series of 0s and 1s.
RAM: Random access memory
Is volatile, which means that when the computer shuts off, all of its contents are deleted. Holds
all the programs the user has loaded and the data and instructions the computer has loaded.
Has a special link to the CPU.
ROM: read only memory
Used to store permanent instructions
Was at first read only, but now it’s both read and write. Is slower than RAM, has less storage
space, and is not volatile. Instructions to boot BIOS (basic input output system), which is
responsible for telling the computer how to find and turn on the operating system.
Cache:
small , high-speed memory which stores data that is frequently accessed by the computer. So
that the CPU needs to access slower RAM less frequently.
Two parts: L1 on cpu chip, and is faster, and L2 between the memory and microprocessor
Cache is nearer to CPU than RAM, and more expensive
Secondary memory:
Hard Drive
Persistent storage, even when computer is off, data is still there, slower and cheaper than
primary, not connected to cpu, bigger than primary, holds all data not currently in use, data for
running programs
Virtual memory
Slower and temporary, stored in hard disk
2.1.4
Computer programs are stored as instructions in machine code in the primary memory.
2.1.6
Operating system: the set of software which controls the hardware and provides services for
computer programs, is an intermediary between software applications and hardware.
Functions:
1. Provides a user interface
A link between the user and hardware
Types:
Graphical User Interfaces (GUIs) that have
menus and icons, graphics, desktop style.
Command Line Interfaces (CLIs) where the
user types in codes, data entry style.
Natural Language Interface (NLIs) where
the user speaks to the interface.
Menu Based Interface (MBIs) which gives
the user a selection of options
2. Does memory management
- Keeps track of storage devices (HDD, flash drives)
- Allocates RAM memory to programs
- Modifies memory locations
- Sorts data on disk drives and RAM for efficiency
- Organizes data into folders
- Copies and deletes files
-
Manages how memory is used by applications and ensures that memory used by a certain app
doesn’t interfere with the memory used by other apps, avoids overwriting
Keeps track of storage devices and controls which applications have access to which part of
memory.
Memory locations can be read, written, or modified by the OS. When the location is full, the OS
sends a confirmation message.
3. Does File management
Organizes data and what files they belong to, allows users to move, delete, or add them.
4. Does peripheral management
Provides interface between hardware and applications
Coordinates with BIOS
Uses device drivers to interface with peripherals, they translate peripheral signals
Device driver: allows hardware to be used by the OS; translators
5. Allows for multitasking
Efficient allocation of resources so multiple apps can be using the cpu simultaneously. Time and
priority
Each concurrent program is given a slice of time or turn in the cpu
Slices vary in length of time depending on priority and speed and operations and execution
6. Provides security
Responsible for overall security and keeps track of users and their activity
Prevents unauthorized access through usernames and passwords, user permissions, protects
files from reading and writing.
7. Networking
Manages connections to and interactions with networks of other computer systems to share
resources
2.1.7
A computer system can run at least one software application with some predefined tasks
installed by the manufacturer
Example: a digital camera has preloaded software which tells it to capture a picture when the
shutter is clicked on
computers/tablets/phones allow users to download additional software applications
Application Type Description
Word processors Storing, manipulating, formatting text and
providing a printout
Ex: microsoft word
Spreadsheets Data is arranged in rows and columns of a
grid and can be manipulated
and used in formulas and calculations
Ex: microsoft excel
Database Management Systems (DBMS) software system for creating and
managing databases. Provides users with
systematic way to retrieve, create, update,
manage data
Ex: microsoft access
Email clients A programs used to manage, store, and send
emails
Ex: gmail
Web browser Retrieving, presenting, and navigating the
world wide web
Ex: firefox
CAD Computer Aided Design Using computer systems in assisting creation,
modification, or optimization of a design.
Purpose is to increase productivity of user,
used in architectural design
Ex: Autocad
Graphic Processing Unit GPU Manipulate visual data and graphics
Ex: photoshop
URI: uniform resource identifier, the address of information on the internet
Pros Cons
CLIs (command line - Easier to implement - Users need to
interfaces) by programmer remember specific
Takes up less memory commands and their
- Can be ran in the syntax, harder for
absence of a amateur users
graphical monitor
- Quicker to type than
use a mouse for
experienced users
GUI (graphical user - Users don’t need to - More complex to
interfaces) remember specific implement by
commands and their programmers
syntax, easier for - Requires more
amateur users memory
- Commands are - Requires graphical
grouped in menus and monitor and
toolbars trackpad/mouse
(pointing device)
Common Features of Programmes:
- Toolbars, buttons, icons, menus
- Dialogue boxes to communicate to the user urgent information and have them make a
choice
- GUIs allow users to interact with computer systems in a more natural, inuitive way
OS generic: menu bar
Program specific: pictures/icons
Binary, Hexadecimal, Truth Tables, Logic Gates:
THE VIDEOS ARE MOSTLY EXAMPLES THAT’S WHY THEY’RE
SO LONG. THE EXPLANATIONS ARE SHORT IN THE VIDEO. IF
YOU WANT EXAMPLES YOU CAN WATCH IT ALL.
Decimal to Hexadecimal
Hexadecimal to Decimal
Decimal To Binary
Binary To Hexadecimal
Hexadecimal to Binary
Ignore 2nd and 4th Columns. The 4th column is for coding only.
OR: AT LEAST 1 CONDITION IS TRUE
AND: BOTH CONDITIONS ARE TRUE
NOT: THE CONDITION IS FALSE
XOR: ONLY 1 CONDITION IS TRUE
NOR: THE OPPOSITE OF OR
NAND: THE OPPOSITE OF AND
Logic Gates
Processors/chips made up of millions of switches called logic gates
1: high voltage
0: low voltage
Voltage: pressure that forces charged electrons to flow through a
circuit
Data representation
ASCII and Unicode
Images:
Displays are divided into pixels
Little squares in a grid, smallest controllable element of a display
Each pixel can have a different color
RGB in hexadecimal
First two red, second two green, third two blue
16^2 x 16^2 x 16^2
1023x763 high x wide