Edexcel GCSE Computer Science Topic 15 The Processor

  • Slides: 8
Download presentation
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)

Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)

Memory • Main memory usually refers to RAM (usually dynamic RAM or DRAM), which

Memory • Main memory usually refers to RAM (usually dynamic RAM or DRAM), which stands for Random-Access Memory, a name is has because anything stored in the RAM can be accessed in roughly the same amount of time. • RAM has quick read/write times, and its function is to load open programs and operating system data currently in use from the slower secondary storage, so they can be accessed directly by the CPU. Latency: The time delay between stimulation and response i. e the time wasted waiting for a response • Static RAM or SRAM is faster than RAM (but more expensive), and is often used for CPU cache, a smaller, faster memory that stores copies of frequently accessed data from memory. • Another type of memory often contrasted with RAM is ROM, which stands for Read-Only Memory. This memory can only be read, and not changed or updated, and can be used in small amounts in computers to store essential programs, like the initial programs that run when the computer boots up.

Processor (CPU) …CPU stands for Central Processing Unit and it is the circuitry in

Processor (CPU) …CPU stands for Central Processing Unit and it is the circuitry in a computer that controls the manipulation of data • Modern computers often have multiple processing units contained on one chip (multi-core processors) The CPU architecture we’re looking at largely consists of 3 main parts: • the arithmetic/ logic unit (ALU) – the circuits that perform the operations on data (e. g. + -, Boolean etc) • The registers are quick, small stores of data within the CPU that temporarily hold data, addresses and instructions being manipulated by the processor. • The control unit (CU) is the circuitry coordinating the activities of the computer • Data in the form of bit patterns are transferred through a bus – a transmission channel connecting components. Two types are: An address bus which is used to specify the physical memory location where the processor needs to read and write to in the memory. It sends the address along the bus from the CPU to the memory. A data bus is used to transmit the actual data to and from the memory. Computers have internal clocks for synchronising the operation of a digital circuit, like those in CPUs. The clocks produce repeated alternating signals, like a metronome. We use the clock speed (in Hz) as an indicator of a CPU’s speed. • The width of a bus is the capacity of how much data can be transmitted at one time e. g. an 8 bit address bus can locate a maximum of 256 unique locations

Program Counter (PC) – stores the memory location of the next instruction to be

Program Counter (PC) – stores the memory location of the next instruction to be The Stored Program executed. It increments after the. Concept end of the fetch stage. Current Register (CIR) – stores instruction currently being processed. • This Instruction is the idea that program instructions, just like data, can be stored in the computer’s main memory. • Early computers had their programs built into the control unit of the CPU, meaning the wiring had to be changed whenever different. FETCH instructions were being executed. receives the address of the next instruction to be executed • Now, the CPU extracts the program from the-The main. CPU memory, decodes the instructions the program counter (PC) register then executes them. Instead of rewiring, the from contents of the memory is changed. -This is added to the address bus, which the main memory receives and then transfers the instruction in that location via the data bus back to the The Fetch-Execute Cycle Manchester Baby (1948) CPU. The instruction is stored in the current instruction register (CIR). DECODE -The control unit will make sense of the instruction stored in the CIR according to the instruction set. The instruction is decomposed into its individual components and based on this the appropriate circuitry is prepared for the execution stage. EXECUTE -Here the control unit activates and initiates the processing required by the instruction. E. g. , if the instruction requires an arithmetic calculation, the control unit will activate and transfer data to the ALU and then the output will be stored in a different register.

Assembly Code • All computer programs are executed as machine code (1 s and

Assembly Code • All computer programs are executed as machine code (1 s and 0 s) by the processor • When translated, each high-level instruction is split into smaller low-level instructions, which are split into an opcode (or operator, which denotes the basic machine operation e. g. ADD) and an operand (which is the data). • Binary numbers are difficult to understand write (which is why we don’t program in machine code), so assembly language was created. • Assembly language code uses mnemonics (e. g. MOV or SUB) which are short codes representing the instructions (so the opcode) • The actual mnemonics used and the associated binary codes are unique for each processor. The patterns of 0 s and 1 s that a particular processor recognises as commands is its instruction set. • This means that assembly code or machine code written for one processor won’t work on another 0010 1010 0101 or… ADD R 5, #10 # refers to immediate addressing, meaning the value following it is the actual data item (not just a value in a register, called direct addressing)