processor fundamentals Flashcards
von neumann architecture
consists of a single shared, memory for programs and data
control unit
- directs and co-ordinates other parts of computer system
- controls operations for computer system
- fetches computer instructions
- decodes each instruction
- executes the instruction
arithmetic logic unit
- a unit which performs arithmetic operations
- and bit shifting operations
- logic operations (AND, OR, XOR)
- designed to perform integer calculation
operand
part of the computer instruction which specifies what data is to be processed
opcode
the instruction executed by the CPU
register
- small piece of memory
- part of the processor
- temporary storage of data which is about to be or has been processed
general purpose register
holds the temporary data while performing different operations
special register
holds the status of the program
program counter
stores the address of the next instruction to be fetched
memory address register (MAR)
stores the memory address where data is to be read from
memory data register (MDR)
stores data that has just been read from memory
current instruction register (CIR)
stores the instruction that is currently being executed
index register (IX)
used for indirect addressing
accumulator
a register that temporarily stores arithmetic and logic data
status register
interpreted as independent flags, each flag is set depending on an event
system clock
- internal clock that regulates the rate at which instructions are executed
- used to synchronize all operations
data bus
- carries data between processor and memory
- bi-directional
- used to exchange data
address bus
- uni-directional
- carries signal related to memory address
- between processor and memory
control bus
- transmits signals between control unit and other components
- bi-directional
factor affecting computer performance: data bus width
- determines number of bits that can be simultaneously transferred
- increasing width increases number of bits that can be transferred
- increasing improves processing speed as fewer transfers are needed
factor affecting computer performance: clock speed
- one F-E cycle is run on each pulse
- clock speed dictates the no. of instructions that can be run per second
factor affecting computer performance: cache memory
- can improve processor performance, similar to RAM, cache uses SRAM
factor affecting computer performance: number of cores
- each core processes one instruction per clock pulse
- more cores mean that sequence of instructions can be split between them and more than one instruction is executed per clock pulse
- more cores decreases the time taken to complete task
Port
acts as an interface between computers and other peripheral devices
USB port
- stands for universal serial bus
- asynchronous serial data transmission method
- serial refers to a single wire being used to transmit data one after the other
- asynchronous refers to a sender using its own clock rather than sharing the same one w/ recipient device.
USB system pros
- fast data transfer
- once plugged, devices are auto detected and drivers are loaded up automatically
- connectors only fit one way to prevent incorrect connections from being made
- is the industrial standard
- several different data transmission rates are supported
high definition multimedia interface (HDMI)
- helps to connect more monitors
- ports allow to output both audio and visual
- support high definition signals
- faster data transfer
- increases bandwidth making it possible to supply the the necessary data for high quality sound and visual effects
pros of HDMI
- current standard for modern televisions and monitors
- allows for a very fast data transfer rate
- improved security, helps prevent piracy by the by the help of HDCP
- supports modern digital system
cons of HDMI
- not a very robust connection
- limited cable length
pros of video graphics array (VGA)
- simpler tech
- only one standard available
- easy to split the signals and connect a number of devices from one source
- connection is very secure
- supports a higher refresh rate
cons of video graphics array (VGA)
- it does not support audio
- outdated as modern laptops rarely have a VGA port
- easy to bend the pins when making connections
fetch execute cycle
- PC holds address of the next instruction to be fetched
- address in PC is copied to MAR
- PC is incremented
- instruction is copied from address stored in MAR to MDR
- then instruction from the MDR is copied to CIR
what is an interrupt
- a signal from source/device
- telling the processor that its attention is needed
hardware interrupt example
- printer out of paper
- no CD in drive
software interrupt example
- run-time error
- a running program needs input
how processor handles interrupt
- an interrupt will cause one of the bits in the interrupt register to change its status
- at the next F-E cycle, the interrupt register is checked bit by bit
the contents would indicate an interrupt occurred during the previous cycle + needs servicing - the CPU would now service this interrupt or ignore it for now depending on its priority
- once interrupt is serviced by CPU, it stops its current task and stores the contents of its registers
- once fully serviced, the register is reset and the contents of registers are restored
assembly language
- low level language
- type of language which can be used to communicate with the computer hardware directly
machine code
code written in binary that uses the processor’s basic machine operations
Relationship between machine and assembly language
every assembly language instruction (source code) translates into exactly one machine code instruction (object code)
symbolic addressing
- symbols used to represent operation codes
- labels can be used for addresses
absolute addressing
the contents of the memory location in the operand
are used
assembler
- software that changes assembly language into machine code for the processor to understand
- replaces all mnemonics and labels with their respective binary values
one pass assembler
- converts mnemonic source code into machine code in one sweep
- cannot handle code that involves forward referencing
two pass assembler: 2 passes thru the code
- on the first pass: symbol table created to enter symbolic addresses and labels into specific addresses. all errors are suppressed
- on the second pass: jump instructions access memory addresses via table. whole source code translates into machine code
- errors reported if they exist
direct addressing
loads contents at address into ACC
indirect addressing
address to be used is at given address, load contents of this second address to ACC
indexed addressing
form the address to be used as ACC + contents of IR
relative addressing
next instruction to be carried out is an offset number of locations away, relative to address of current instruction held in PC, allows for relocatable code
conditional jump
has a condition that will be checked
unconditional jump
no condition to be followed, simply jump to the next instruction
arithmetic shift
used to carry out multiplication and division of signed integers represented by bits in the accumulator by ensuring that the sign-bit is the same after the shift
logical shift
zeros replace the vacated bit position
cyclic shift
- the bit that is removed from one end by the shift is added to the other end
bit masking
an operation that defines which bits you want to keep and which bits you want to clear
masking to 1
OR is used with a 1
masking to 0
AND is used with a 0