1.1.1 /1.1.2 Structure & functions of the processor

Central Processing Unit – (CPU) it carries out all the mathematical and logical operations necessary to execute the instructions given to it by the user. When code is written in languages such as Python, the code is readable and understandable by humans and is known as source code. Processors have no understanding of source code and cannot execute it directly unless it is translated into machine code. A compiler is the name given to any piece of software that takes source code and converts it to machine code. Machine code is the binary representation of an instruction, split into the opcode and the operand (instruction’s data).Each processor has its own set of instructions.  Assembly language or code uses text to represent machine code instructions, or mnemonics. Each processor architecture has a set of instructions that it can run; this is known as the instruction set. Despite many differences between instruction sets, machine code does uphold a common structure:

Every instruction available, in a given instruction set, will have a unique binary value known as the opcode. When an instruction is executed by the processor, it uses the opcode to determine which instruction to run (i.e. what action it is to perform).

Relationship between machine code and assembly language – Assembly code is the step above machine code, allowing the coder to write code using mnemonics, which represent machine code instructions. Each assembly code instruction has a one-to-one mapping with a machine code instruction. This is unlike source code, which has one-to-many mapping. When converting assembly code to machine code you will use an assembler.

https://docs.google.com/presentation/d/1LAntOTLo_EpoZBHbbeTzFBHnCGPgssCzCCloJz5E0Oo/edit?usp=sharing

Buses
Data Bus – This is used to carry the data that needs to be transferred from one part of the hardware to another, often memory.

Address Bus – This carries the address of the location to which the data in the data bus should be delivered. The address and the data travel in tandem to each of the locations in turn until the component being visited recognises its address, it then grabs the data that is being transported.

Control Bus – Previously we learnt that one of the components of the processor was the Control Unit (CU), whose job is to control and coordinate the operations of the rest of the processor. It can only do this if it can send commands to the different components of the system. The control bus is used to carry these control signals.

CPU Speed – CPU speed is determined by a number of factors. The clock speed of a CPU is one factor determining the CPU’s overall speed. This is given in Hz, a 1.6 GHz processor can perform 1,600,000,000 calculations per second. The higher the clock speed the faster the CPU will run, however this will produce more heat which could cause the it to slow down. Another factor determining CPU speed is the number of cores. A single core will be able to do one calculation per hertz but by increasing the number of cores the number of calculations is increased and the CPU will be able to do calculations simultaneously. The more cores the faster the CPU will run however it will also produce more heat which will need to be dealt with. Finally the amount and levels of cache that the CPU has will affect speed of a CPU. Caches are comprised of multiple levels with level 1 being the fastest memory however it is also the smallest. Next is level 2 which is slightly slower and there is more of it, with level 3 being the slowest and what most of the cache will be made of. More level 1 and 2 cache will speed up the processor as it can access and store data and instructions quicker. without caches the CPU would have to go to ram or the hard drive which are nowhere near quick enough to allow the CPU to run at full capacity.


Create your own website, free on WordPress.com.Create your own website.
Start free