What does the processor do?
Executes program instructions in order to run applications.
What is main memory comprised of?
RAM
ROM
What is the role of main memory?
To store program instructuions and frequently used data
How does storing data and instructions in main memory over secondary storage help the running of the computer?
Main memory is usually much faster than secondary storage so storing in main memory helps the processor to execute instructions quickly
what is a bus?
series of parallel wires that connects internal components of a computer system, allowing signals to be passed between them.
what are the three examples of buses?
address bus
control bus
data bus
what is the number of wires a bus have called?
its ‘width’
how do buses transmit data?
parallel data transmission
what does the width of a bus have a direct relationship to?
the number of bits that can be transferred simultaneously by the bus
what is the role of the address bus?
to transport memory addresses, specifying where data is to be sent to or retrieved from
what does increasing the width of the address bus do?
increases the range of addresses that it can specify
what does increasing the range of specifiable addresses do?
increases the computers amount of addressable memory
what does adding a single wire to the address bus do?
doubles the number of addressable memory locations
what is an addressable memory location?
a portion of memory that can be accessed by its address
what happens if there are not enough adressess
some portions of memory go unused
what does the data bus do?
sends data and instructions to and from difference components of the computer system.
what does increasing the width of the data bus do?
increases the volume of data that can be transferred over the bus at any one time
what does the control bus do?
used to carry control signals that regulate the operation of the computer system
also carries the computer’s clock signal
what are I/O controllers?
hardware that control the communication of data between the processor and external hardware devices
what are some examples of I/O devices?
keyboards
mice
monitors
what is the key fact about Harvard architecture?
processor will use two separate main memory locations: one for instructions and another for data
What can Harvard architecture take advantage of that Von Neumann cannot?
Its memory can be read only memory if they do not want instructions to be altered
what is harvard architecture used in?
embedded systems like digital signal processing (DSP)
what is von neumann architecture?
both instructions and data are stored together in the same memory
how does von neumann architecture perform in comparison to harvard architecture? why?
often perform worse than
same buses have to be shared for fetching both instructions and data
what is von neumann architecture used in everyday?
general purpose systems like laptops and smartphones
what is a computer that uses the stored program concept?
“serially fetching and executing machine code instructions stored in main memory by a processor that performs arithmetic and logical operations”
what does the stored program concept and the way that it stores program instructions in main memory allow?
one set of instructions to be switched out for another.
what does ALU stand for?
Arithemetic Logic Unit
rwhat is the tole of the ALU?
to perform arithmetic and logic operation
what are the operations the ALU performs?
mathematical operations like addition, logic operations include AND, OR and XOR.
what is the role of the control unit?
controlling the various components of the processor and the fetch-execute-cycle
what is the role of a register?
small storage locations used to hold temporarily with high read and write speeds
what are the two types of registers?
general purpose
special purpose
what are the five types of special register?
program counter
current instruction register'
memory address register
memory buffer register
status register
what is the role of the program counter?
to hold the memory address of the next instruction to be executed in the fetch-execute cycle
what is the role of the current instruction register?
to hold the instruction that is currently being executed by the processor
what are general purpose registers role?
storage for any data that is required by instructions during execution
what are special purpose registers used for?
storage of specific information
what are the types of special purpose registers?
program counter
current instruction register
memory address register
memory buffer register
status register
what is the role of a program counter?
to hold the memory address of the next instruction to be executed in the fetch-execute cycle
what is the role of the current instruction register?
to hold instruction that is currently being executed by the processor
what is the role of a memory address register?
to store the memory address of memory location that is to be read from or written to
what is the role of the memory buffer register?
to hold the memory location that has been read from or data that is to be stored
what is the status registers?
to contain a number of bits, the values of which can change to indicate the occurrence of an interrupt
what is the role of a clock?
generates a timing signal which changes a regular frequency
what is the signal of a clock used to do?
synchronise communication between the components of the processor and the rest of the computer system
what is the fetch-decode-execute cycle?
a continuous cycle performed by the processor
what happens in the fetch stage of the fetch-decode-execute cycle?
next instruction to execute is retrieved from main memory
the content of the PC is copied to the MAR
content of MAR transferred to main memory by the address bus
instruction is sent from main memory to the MBR by the data bus
PC is incremented by one
content of the MBR is copied to the CIR
what happens in the decode stage of the fetch-decode-execute cycle?
content of the CIR is decoded by the CU
decoded instruction is split into two parts: opcode and operands
what happens in the execute stage of the fetch-decode-execute cycle?
any data required by the instruction that isn’t present in registers is fetched
instruction is carried out
results of any calculations are stored in general purpose registers or main memory
what happens between each execute stage and fetch stage of the cycle?
contents of the status register is checked for changes that could signify occurrence of an interrupt
what is a processors instruction set?
group of instructions that it can carry out
why may the instructions for one processor not be compatible with other processors?
each type of processor has its own instruction set
what are instructions usually stored in?
machine code
what are the two parts of machine code instructions?
opcode
one or more operands
what does opcode specify?
the type of operation that is to be carried out
what are operands?
the pieces of data on which the operation is performed
what is one bit in a machine code instruction usually assigned to?
the addressing mode in use
what are the two types of addressing mode?
immediate
direct
what happens in immediate addressing?
value specified in the operand is to be treated as the actual value
what is an example of immediate addressing?
if the operand were 18, the value used by the operation would be 18
what happens in direct adressing?
the value specified in an operand signifies a memory address
what is an example of direct addressing?
if the operand were 18, the value to be used by the operation would be whatever the content of the memory location 18 is
what is a logical shift?
operation performed on binary numbers which involves shifting all the bits in a number a specified number of positions to the left or right
what does performing a logical left shift do (once)?
double it
what does performing a logical right shift do (once)?
half it
what is an interupt?
a signal sent to the processor by another part of the computer requesting the attention of the processor
what is an example of a hardware interupt?
the computer’s I/O controller informing the processor that the mouse has been moved or that a keyboard key has been pressed
what are some examples of interrupts that software can send?
unexpected errors like:
division by 0
stack overflow
how is an interrupt detected?
a change in the content of the status register between the execute and fetch stages of the fetch-execute cycle
how can interrupts be handled?
using the vectored interrupt method
what happens during the vectored interrupt method? what is this called?
the processor stops executing the current program and places the content of its registers onto the system stack
aka saving the “volatile environment”
what happens, when dealing with an interrupt, once the volatile environment is saved?
loads the appropriate interrupt service routine
what is an appropriate interrupt service routine?
a series of instructions for handling the interrupt that is specific to the type of interrupt
what happens, when dealing with an interrupt, once the processor finishes executing the interrupt service routine?
restores the volatile environment from the system stack and resumes execution of any programs that were running before the interrupt
what are the six factors that can effect the processor’s performance?
multiple cores
cache memory
clock speed
word length
address bus width
data bus width
how does the number of cores a processor has affect the performance of the processor?
each core performs its own fetch-execute cycle independently of others
different applications can be allocates different cores
what is a processor’s cache?
small portion of incredibly fast memory
read and write speeds far higher than HDD and SSDs
what is cache used for?
storing frequently used information and reduces time wasted in fetching the same information from main memory again and again
how does the amount of cache affect the processor’s performance?
the more information it can store and the more time it can save fetching information from main memory
what does a processor’s clock speed relate to?
the frequency of pulses generated by the system clock
how does a higher clock speed affect the processor?
the higher the frequency, the more cycles of the fetch-execute cycle cycle can be completed in the same period of time
what happens if the computer’s clock speed is increased too far?
errors can occur
what is a word?
group of bits that is treated as a single unit by a processor
what can words be used to represent?
instructions
data
what is the length of a word?
the number of bits that are assigned to it
how does a higher word length effect the performance of the processor?
higher word lengths allow for more bits to be transferred and manipulated as a single unit
what is the width of a bus?
the number of parallel wires that make up the bus
how does increasing the width of the address bus help the computer perform?
increases the range of addresses it can specify
increasing the computer’s amount of addressable memory
how does increasing the width of the data bus help the computer perform?
increases the volume of data that can be transferred over the bus at any one time
processor can fetch more data in one cycle
reduces the number of cycles required to fetch large volumes of data
what is a barcode?
printed diagrams that consist of light and dark portions
what do barcodes contain? what is used to read this?
information
computer
what are the two main types of barcode?
1D
2D
how do 2D and 1D barcodes differ in terms of amount they contain?
2D barcodes contain more information in the same amount of space
how do 2D and 1D barcodes differ in terms of processing?
2D barcodes require more processing in order for the information to be extracted
what do barcode readers consist of?
laser light source
lens
photodiodes
mirror
what does a photodiode do?
turns light into electrical charge
how does a barcode reader work?
mirror directs light onto printed barcode'
light reflected by barcode passes through lens
light is incident on the photodiode
electrical charge measured and processed to form digital signal
represents content of a barcode
what portions of a barcode reflect the most light?
light portions