3- Hardware Flashcards
Computer architecture
1- The central processing unit (CPU)
2- Von Neumann architecture
3- Cores, cache and internal clock
1- The central processing unit (CPU)
- it is also known as a microprocessor or processor
- it is central to all modern computer systems (including tablets and smartphones).
- The CPU has the responsibility for the execution or processing of all the instructions and data in a computer application
2- Von Neumann architecture
- with early computers it wasn’t possible to store programs or data.
- In the mid-1940s, John von Neumann developed the concept of the ‘stored program computer’, which has been the basis of computer architecture ever since.
The main novel features of the von Neumann architecture
- the concept of a central processing unit (CPU or processor)
- the CPU was able to access the memory directly
- computer memories could store programs as well as data
- stored programs were made up of instructions which could be executed in
sequential order.
Components of the central processing unit (CPU)
- Arithmetic & Logic Unit (ALU)
- Control Unit (CU)
- Registers
The Arithmetic & Logic Unit (ALU)
- It allows the required arithmetic (e.g. +, - and shifting) or logic (e.g. AND, OR) operations to be carried out while a program is being run; it is possible for a computer to have more than one ALU to carry out specific functions.
- Multiplication and division are carried out by a sequence of addition, subtraction and left or right logical shift operations.
The control unit(CU)
- The control unit reads instructions from memory.
- Signals are generated during the Fetch-Decode-Execute cycle to control all components of the computer.
- The control unit synchronises data flow and program instructions throughout the computer.
Registers
- One of the most fundamental components of the von Neumann system are the registers.
- Registers can be general or special purpose.
Types of Register
- current instruction register (CIR) : this register stores the current instruction being decoded and executed
- accumulator (ACC) : this register is used when carrying out ALU calculations; it stores data temporarily during the calculations
- memory address register (MAR) : this register stores the address of the memory location currently being read from or written to.
- memory data/ buffer register (MDR) : this register stores data which has just been read from memory or data which is about to be written to memory.
- program counter (PC) : this register stores the address where the next instruction to be read can be found
System buses and memory
buses are used to connect the CPU to the memory and to input/ output devices.
Memory
- The computer memory is made up of a number of partitions.
- Each partition consists of an address and its contents.
- The address will uniquely identify every location in the memory and the contents will be the binary value stored in each location.
- The random access memory (RAM) holds data, programs and the part of the operating system currently in use.
- RAM is often known as the Immediate Access Store (IAS).
- All data being used in programs needs to be transferred to the RAM.
- Primary memory also includes read-only memory (ROM) which cannot be altered; ROM contains start-up routines for the computer.
(System) buses
- Buses transfer data and control signals throughout a computer.
- They use parallel data transfer and each wire in the bus transmits one bit of data.
The three common buses used in the von Neumann architecture
- address bus
- data bus
- control bus
address bus
- the address bus carries addresses throughout the computer system. Between the CPU and memory.
- the address bus is unidirectional (bits can travel in one direction only). this prevents addresses being carried back to the CPU.
- The width of a bus is very important. The wider the bus, the more memory locations that can be directly addressed at any given time.
Data bus
- The data bus is bidirectional (allowing data to be sent in both directions along the bus).
- This means data can be carried to/from CPU / memory and to/from input- output.
- As with the address bus, the wider the bus the larger the word length that can be transported.
Control bus
- The control bus is also bidirectional. It carries signals from the control unit (CU) to all the other computer components.
- It is usually 8-bits wide.
- There is no real need for it to be any wider since it only carries control signals.
Fetch–Decode–Execute cycle
- To carry out a set of instructions, the CPU first of all fetches some data and instructions from memory and stores them in suitable registers.
- Both the address bus and data bus are used in this process.
- Once this is done, each instruction needs to be decoded before finally being executed
The process of Fetch–Decode–Execute cycle
- Fetch
- Decode
- Execute
- Fetch
- Both data and instruction can be stored in MDR.
- The next instruction is fetched from the memory address currently stored in the MAR and the instruction is stored in the MDR.
- The contents of the MDR are then copied to the Current Instruction Register (CIR). - The PC is then incremented (increased by 1) so that the next instruction can be then be processed.
- Decode
The instruction is then decoded so that it can be interpreted in the next part of the cycle.
- Execute
- The CPU passes the decoded instruction as a set of control signals to the appropriate components within the computer system.
- This allows each instruction to be carried out in its logical sequence.
3- Cores, cache and internal clock
- Caches: is temporary memory using static RAM to hold frequently used data/instructions by the CPU thereby increasing CPU performance. More generally, cache means any area of storage used to quickly access frequently-used data - other examples include web cache, database cache, DNS cache
Cores
- core : a unit on a CPU made up of an ALU, control unit and registers; a CPU may contain a number of cores.
- dual core : a CPU containing two cores
- quad core : a CPU containing four cores
system clock
produces timing signals on the control bus to ensure synchronisation takes place