Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

AS Computer Science Notes OCR - 01 - Computing Principles

Rating
-
Sold
1
Pages
210
Uploaded on
05-08-2024
Written in
2022/2023

Notes for AS computer science for ocr. Contains lesson notes for every sub topic in the first component of the course as well as a reference to the specification. Also includes diagrams and questions. The general theory questions do not have answers included but most (?) of the programming tasks have a corresponding screenshot with the python code or ocr reference language code.

Show more Read less
Institution
Course

Content preview

1.1.1 - Structure and function of the processor
Specification




Purpose of the CPU
● Processes data (searching,sorting,calculating,decision making and control of
input, output and storage devices)

Arithmetic Logic unit (ALU)
● Performs arithmetic and logical operations on data as well as binary shifts
● Arithmetic operations on fixed and floating point numbers
○ Addition,subtraction,multiply,divide
● Boolean logic operations
○ Comparison,AND,OR,NOT,XOR
● Uses general purpose registers to temporarily hold the results of

, calculations such as the accumulator
● Inputs from internal bus and accumulator ; Outputs routed to a register

Control Unit (CU)
● Coordinates CPU’s activities; directs flow of data/operations of the CPU
between CPU and other devices.
● Accepts the next instruction, decodes it, handles the execution and
stores the result back in registers or memory
● Sends memory read or write requests to main memory via the control bus
as well as other command and control signals e.g bus requests, bus grants,
interrupt requests etc.
● Makes extensive use of the status registers and clock
● Coordinates and communicates with all parts of the CPU

Registers
What are registers?

● They are the CPU’s own memory store. They are small memory cells that
temporarily store data. It is very quick and contains specialised registers
which are at the core of the fetch-decode-execute cycle. All
arithmetic,logical and shift operations occur in registers.
● General purpose registers available to programmers to temporarily store
data
● Dedicated/specialised registers are used by the processor to carry out a
specific role.

Name Description
Program Counter (PC) ● Holds address of next instruction to be executed
○ Next instruction in a sequence
○ Address to jump to if commanded - from CIR
● Close relationship with MAR. Contents are copied
into MAR at the start of the fetch-decode-execute
cycle. Increments by 1 after

Accumulator (ACC) ● A general-purpose register that modern CPUs
have
● Stores data or control information
● CPU has many general purpose registers to store
data temporarily while instructions or calculations
are being carried out.
● More general purpose registers in a processor =
faster it may operate
● Results of calculations done by ALU stored here

Memory Address ● Holds memory address from which data or an
instruction is to be fetched or to which data is to
Register (MAR) be written or read from

, ● Sends these addresses down the address bus

Memory Data Register ● Temporarily stores data which has been read
from or written to memory
(MDR) ● Holds instruction from MAR and associated data
● Known as the MBR (memory buffer register) - or the
gateway to the processor
● All data to and from memory passes through the
data bus and passes through the MDR

Current Instruction ● Holds the current instruction being executed
● MDR contents are copied to the CIR if it is an
Register (CIR) instruction
● Contains opcode and operand(s) of current
instruction
● Opcode = what to do e.g store, load etc.
● Operand = what do we need to do it e.g data,
address
● E.g load 1000 into ALU
○ LDA 1000




Buses
● Collection of wires/channels (that are parallel) which allow data or
instructions to be communicated between devices. They connect two or
more components together inside the CPU. These buses are collectively
called the system bus.
● The width of a bus is the number of parallel wires the bus has. The width
is directly proportional to the number of bits that can be transferred
simultaneously at any given time. E.g they are normally 8,16,32 or 64 wires
wide.

Name Description
Data bus ● Carries binary 1s and 0s that make up
actual info being transmitted.
● Responsible for moving data and
instructions between the CPU and the
main memory (and I/O devices)
● bi-directional

Address bus ● Carries memory addresses that identify
where the data is being read from or
written to (sent to or retrieved from)
● One way - from the CPU to RAM
● Width of the bus is proportional to the
number of accessible memory locations

Control bus ● Carries command and control signals

, from the control unit to and from every
other component of the CPU/computer
e.g clock signal to synchronise the
process.
● Bi-directional
● Manages data processing
● Coordinates use of the address and data
buses, provided status info between
system components.
● Control signals:
○ Bus request - device requesting use
of a data bus
○ Bus grant - CPU granted access to
data bus
○ Memory write - data written into
addressed location using this bus
○ Memory read - data read from
specific location to be placed on data
bus



Buses - how this relates to assembly language
● Computers can only deal with binary 1s and 0s but we prefer to deal in
more abstract languages we can understand
● At a low level, computers uses assembly code, a language which has a
direct one-to-one relationship with processor architecture
● E.g the assembly instruction for ‘load’ is ‘LDA’. This is known as a mnemonic
in assembly language.It is a simplified way of representing machine code.
● Assembly Code Mnemonics to know:
○ ADD: add
○ SUB: sub
○ STA: store
○ LDA: load
○ BRA: branch always
○ BRZ: branch if zero
○ BRP: branch is positive
○ INP: input
○ OUT: output
○ HLT: end program
○ DAT: data location

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
August 5, 2024
Number of pages
210
Written in
2022/2023
Type
Class notes
Professor(s)
-
Contains
All classes

Subjects

$12.40
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
arushnaprabaharan

Get to know the seller

Seller avatar
arushnaprabaharan Tunbridge Well\'s Girls Grammar
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
1 year
Number of followers
1
Documents
1
Last sold
1 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions