Comp Sci Notes - Topic 2
Comp Sci Notes - Topic 2
Computer architecture: computers are made up of a processing module and a memory module.
Has the circuitry necessary to fetch, decode, and execute programme instructions from and to
the memory.
Controls retrieval process of program instructions from the memory to the cpu and decoding the
commands. Send the decoded commands to the ALU.
Step 2:
Deconde the instructions into commands
Step 3:
Execute the instructions
Step 4:
Send the output to memory
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
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
The MAR sends the address to the RAM through the address bus
The RAM sends the corresponding data back to the CPU to the MDR through data busses
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.
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.
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
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
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:
Types:
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.
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
Ex: gmail
Ex: firefox
Ex: Autocad
Ex: photoshop
Pros Cons
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
Data representation
Images: