1.1.2 types of processor
CPU
- The cpu is the processor
- it carries out all the mathematical and logical operations necessary to execute the instructions given to it by the user
- it is one of the most expensive parts of the computer system
- They can be found in anything from smartphones and tablets to washing machines and microwaves
- They are extremely complex and the way they are constructed
Things that can be upgraded:
RAM- This will give the computer more main memory
Graphic cards-
Usually people swap a hard disk drive for a SSD
Purchasing a CPU with higher cores- this isn't generally done due to the cost and more technical acquisition is needed to improve and replace a CPU
RAM- This will give the computer more main memory
Graphic cards-
Usually people swap a hard disk drive for a SSD
Purchasing a CPU with higher cores- this isn't generally done due to the cost and more technical acquisition is needed to improve and replace a CPU
Machine code instruction is the language that is understandable by humans and is known as source code,processors have no understanding of source codes and cannot executed unless it is translated into machine code .
A complier is the name given to any piece of software that takes the source code and converts it into machine code
machine code is the binary representation . spilt into the opcode and the operand (instruction set)
Opcode - the action the instruction performs
Operand - the location of the data
Machine code instructions
Each processor architecture has its own unique set of instructions
The compiler must specify the target architecture before compiling,
as the differing architectures are not compatible with all computer.Each line of source code can be complied into many lines of code.
Assembly language - uses text or mnemonics to represent machine code in a simplified way
Every instruction that a processor architecture can understand has a unique binary representation/ value, which is known as an Opcode
When executed the Opcode is used to determine which instruction to execute (what action it is to perform)
An example of the Opcode and what will happen when execution occurs:
Opcode
|
Assembly mnemonic
|
Description
|
000 0001
|
MOV
|
Moves a value to a register
|
000 010
|
ADD
|
Adds a value and stores in ACC (accumulator)
|
000 100
|
SUB
|
Subtracts a value and stores in ACC (accumulator)
|
001 000
|
MLT
|
Multiplies a value and stores in ACC (accumulator)
|
each opcode represents a different instruction and mnemonics are used to make development in assembly language easier , as dealing with binary can get very complex
Comparison Operators
==
| Equal to |
!=
| Not equal to |
<
| Less than |
<=
| Less than or equal to |
>
| Greater than |
>=
| Greater than or equal to |
Arithmetic Operators
+ | Addition e.g. x=6+5 gives 11 |
- | Subtraction e.g. x=6-5 gives 1 |
* | Multiplication e.g. x=12*2 gives 24 |
/ | Division e.g. x=12/2 gives 6 |
MOD | Modulus e.g. 12MOD5 gives 2 |
DIV | Quotient e.g. 17DIV5 gives 3 |
^ | Exponentiation e.g. 3^4 gives 81 |
No comments:
Post a Comment