Professional Documents
Culture Documents
4 - Processor Fundanmentals
4 - Processor Fundanmentals
4 - Processor Fundanmentals
Von-Neumann Architecture
Types of Registers:
1
Processor Fundamentals
Current Instruction Register (CIR):
Stores the data of the current instruction being decoded and executed.
Index Register (IX):
Used when carrying out index addressing operations.
Memory Address Register (MAR):
Used to store the address of the current instruction being processed.
Memory Data Register (MDR)/ Memory Buffer Register (MBR):
Stores the data which has just been read from and is about to be written to the memory.
Program Counter (PC):
Stores the address of the next instruction to be processed.
Status Register (SR):
Contains bits whi
ch can be set depending upon the operation. It is used when an instruction needs arithmetic or logical
processing.
Address bus:
Carries signals related to address between the processor and the memory unit.
It is unidirectional.
2
Processor Fundamentals
Data Bus:
Carries signals related to data between the processor and the memory unit.
It is bi-directional.
Control Bus:
Carries signals related to control and coordination between the processor, memory unit and I/O
devices.
It is unidirectional and bidirectional.
Factors increasing the performance of a processor:
1. Increasing the width of the bus- Allows more bits to be transferred.
2. Increasing the clock speed- Allows more instructions to be carried out per second.
3. Use of cache memory- Uses SDRAM which speeds up data access.
4. Increasing the word length- Allows more precise instructions to be carried out.
5. Increasing the number of cores- It reduces the need of overclocking thereby increasing processing
speed for the most part.
Drawbacks of the methods of increasing the performance of a processor:
Increasing the clock speed makes the computer more unreliable by causing overheating issues.
Increasing the number of cores means that the computer needs to communicate with more cores
thereby reducing the performance.
Computer ports:
Universal Serial Bus (USB):
Pros Cons
Drivers of plugged-in devices are Maximum cable length is up to 5m.
automatically loaded up. Maximum transmission speeds are up to
Has a universal connection. 500mbps.
Connector fits one way; reduces chances Older devices may not be supported.
of incorrect connections.
Backwards compatible.
Industry standard.
Variable transmission speeds are
supported.
3
Processor Fundamentals
Pros Cons
Current standard for TVs and monitors. Not a very robust connection.
Faster transmission rates. Limited cable length to retain good
Improved security. connection.
Better display image. 5 cable standards.
Pros Cons
One standard available. Outdated analog technology.
Easy to connect multiple monitors from Easy to bend the pins when making
one source. connections.
Secure connection. Cable must be high quality to make good
connection.
4
Processor Fundamentals
Interrupt:
A printer sends a signal to the processor that there is a paper jam or the printer is out of ink.
A program sends a signal to the processor that the .exe file could not be found.
Interrupts allow multitasking to take place. For example, listening to music while downloading a file.
Assembly Language and Machine Code:
Assembly language is most closely related to machine code and uses mnemonics (e.g: ADD 20)
instead of binary.
Each instruction consists of an opcode and an operand.
Opcode- It is the operation to be carried out.
Operand- It is the data to be used by the Opcode.
Assembler: It is used to convert assembly language into machine code before execution.
Types of Assembler:
5
Processor Fundamentals
Pass 1 Pass 2
Read the assembly language code. Read the assembly language code, one
Ignore unnecessary items. line at a time.
Allocate a memory address for the code. Generat object code, including opcode
Check the opcode of the instruction set. and operand from symbol table.
Add new labels to the symbol table along Save and execute the program.
with the address.
Place the address of the labelled
instruction in the symbol table.
6
Processor Fundamentals
comparison being made is false.
END Returns control to the operating
system.
CMP Compares the contents of the
accumulator with the contents of
the specified address.
CMP Compare the contents of the
accumulator with the number.
CMI Compare the contents of the
contents of the given address with
the accumulator.
Modes of Addressing:
Absolute Addressing:
The contents of the memory location are used.
Direct Addressing:
The contents of the memory location are used.
Indirect Addressing:
The contents of the contents of the memory location are used.
For example, if the location 200 stored the value 20, and the location 20 stored the value 10, then 10
would be stored in the accumulator.
Indexed Addressing:
The contents of the memory location by adding the contents of the index register are stored in the
accumulator.
Immediate Addressing:
The value of the operand is used only.
Relative Addressing:
The memory address used is the current memory address added to the operand.
Symbolic Addressing:
Labels are used instead of the values.
Bit Manipulation:
Binary shifts
Logical Shift
The shifted out bits are replaced with zeros.
7
Processor Fundamentals
Arithmetic Shift
The shifted out bits are replaced with ones.
Cyclic Shift
Bits shifted out of one end are entered through the other end of the register.
Left Shift
Bits are shifted to the left.
Right Shift
Bits are shifted to the right.
LSL n: Bits are shifted to the left side and 0s are introduced on the right side.
LSR n: Bits are shifted to the right side and 0s are introduced on the left side.
Use of Bit manipulation in monitoring and control
AND is used to check if the bit has been set.
OR is used to set the bit.
XOR is used to clear the bit that has been set.
Past Papers:
Macro is a sequence of instructions given to an identifier. These may need to be carried out several times.
Directive is an instruction which tells the assembler to do something. It is not a program instruction.
8
Processor Fundamentals
A General Purpose Registers
B System Clock
C ALU
D Data Bus
E Control Bus
F Address Bus
Groups of Instructions
Input Output
Data Movement
Arithmetic operations
Jump instructions
Compare instructions
Modes of Addressing
Handling of Interrupt