Hardware Flashcards
What is meant by the term ‘computer architecture’?
The structure of a computer system - the hardware components it has and how they work together to execute programs
Give the core elements used in von Neumann architecture.
- Input & output mechanisms
- Main memory
- Central processing unit (CPU)
John von Neumann proposed the concept of a stored program.
State the two items he proposed to store in main memory.
- Program instructions
- Data
Describe the function of the central processing unit.
To decode and execute program instructions fetched from memory
State what is meant by the term ‘program instruction’.
A task that is carried out by the CPU
(Exam-style question)
Von Neumann developed the stored program concept.
Describe the stored program concept. (2)
- Instructions and data are stored in main memory
- Instructions and data are fetched, decoded, and executed in a sequence by the CPU
(Exam-style question)
Describe how the CPU and main memory work together to run programs. (4)
- Program instructions and data are stored in main memory and are fetched by the CPU one at a time, where they are decoded and executed
- Results of operations carried out in the CPU are stored in memory
(Exam-style question)
Explain one reason why the stored program concept enabled computers to become general purpose machines capable of performing a variety of different tasks. (2)
Computers could be reprogrammed to carry out different tasks because they were able to store program instructions and data in memory
Give some examples of input devices and output devices.
Input -
- Keyboard
- Mouse
- Scanner
- QR code reader
- Sensor
- Microphone
- Touchscreen / tablet
Output -
- Monitor
- Printer
- Projector
- Speaker
- Touchscreen / tablet
Describe the characteristics of main memory.
- It holds the program instructions and data that the CPU is currently using
- It consists of a collection of storage locations, each with its own unique address
(a storage location can hold a program instruction or an item of data)
State what is meant by the term ‘memory address’.
A pointer to a location in memory
Main memory is volatile.
Describe what is meant by this.
- Power is needed to retain its contents
- When the computer is switched off, its main memory is completely wiped
Why is main memory classed as primary storage?
The CPU has fast, direct access to it
Why is main memory often referred to as random-access memory?
The storage locations can be read from and written to in any order
Give some characteristics of random-access memory (RAM).
- Stores currently executing programs and data
- Volatile - if a computer loses power, all data stored in its RAM is lost
- Not suitable for long-term storage of software/data
- Contents of RAM can be manipulated while computer running
Give some characteristics of read-only memory (ROM).
- Memory that cannot be changed by program or user
- Retains its memory after computer turned off - its contents are permanently embedded
- Used to store instructions/software for the computer to boot up when turned on - e.g. BIOS
Give some characteristics of cache memory.
- Cache memory stores commonly used instructions and is used to speed up processing
- Cache located on same microchip as CPU, so can be accessed much quicker than ordinary RAM
- Executing a program from cache memory means it runs more quickly
- Computers don’t have much cache memory because it is much more expensive
Give some characteristics of virtual memory.
- It’s an area on a secondary storage device used to store programs if you do not have enough physical memory to store them
- Programs that are open but not currently active are transferred to virtual memory to make room in main memory
- Not physical
Give some characteristics of flash memory.
- Physical, secondary storage devices
- Non-volatile storage
- Solid state technology, so non-mechanical
- More reliable and durable than alternatives - can only be overwritten limited number of times
Describe the function of the control unit (CU).
- Handles all processor signals
- Controls flow of data within the system
- Fetches instructions from memory sequentially, decodes them and directs operations of other parts of the system to execute them
Describe the function of the arithmetic logic unit (ALU).
Performs arithmetic and logic operations on data
Describe the function of the clock in a computer system.
- Controls the rate at which program instructions are executed
- Each ‘tick’ of the clock triggers the CPU to carry out one action
- Its speed is measured in cycles per second: 1Hz = 1 cycle per second
(Modern CPUs have clock speeds of around 3GHz)
What are general-purpose registers in a computer system?
Direct-access storage which temporarily stores data and instructions within the CPU
The fetch-decode-execute cycle is the cycle the central processing unit (CPU) follows in order to process instructions.
Name two registers used in the cycle.
Any two from:
- Program counter / PC
- Current instruction register / CIR
- Memory address register / MAR
- Memory data register / MDR
- Accumulator / ACC
Describe the function of the program counter (PC).
- Holds the memory address of the next instruction to be fetched from main memory
- Memory address incremented during the fetch process
Describe the function of the current instruction register (CIR).
Holds the instruction currently being executed or decoded
Describe the function of the memory address register (MAR).
Holds the memory address of current data that is to be fetched from memory
Describe the function of the memory data register (MDR).
Holds data found at memory address held in MAR, or data that is to be transferred to main memory
Describe the function of the accumulator (ACC).
Holds the result of a calculation performed by the ALU
What is a core within a computer system?
A processing unit within the CPU, containing an ALU, control unit and registers
What is a bus within a computer system?
A collection of wires that is used to transfer data between the CPU, main memory and input/output devices
Give the 3 types of buses used in a computer.
- Control bus
- Address bus
- Data bus
Describe the function of the control bus.
Carries signals from the processor between the components of the CPU and other parts of the computer system
(bidirectional)
Describe the function of the address bus.
Holds the address of the memory location that the CPU will read from or write to
(unidirectional)
Describe the function of the data bus.
Transfers program instructions and data between memory and the CPU
(bidirectional)
(Exam-style question)
Describe how the width of the address bus determines the size of the memory that a CPU can use. (3)
- Each memory location has a unique binary address
- Each wire in the address bus represents one bit of the address
- Therefore, the number of wires it has determines how many unique addresses can be generated
(Exam-style question)
Describe one reason the data bus needs to be bi-directional. (2)
The CPU needs to be able to read program instructions and data from memory and write the results of operations to memory
(Exam-style question)
Describe how program instructions stored in memory are processed by the central processing unit. (3)
- Instructions are fetched from memory into the CPU one at a time, where they are decoded and executed by the control unit (CU)
- Arithmetic and logic operations are performed by the ALU
Describe what happens in each stage of the fetch-decode-execute cycle.
Fetch -
- Memory address of current instruction held in program counter is copied into MAR
- Address in program counter is then incremented by one - program counter now holds address of next instruction
- Processor sends signal containing memory address of current instruction along address bus to main memory
- RAM retrieves instruction/data stored at that address and passes it back along the data bus to MDR - instruction is then copied into CIR
Decode -
- Control unit (CU) reads contents of CIR, checking if it is a part of its instruction set
Execute -
- Instruction held in CIR is then decoded and executed by CU - the results of processing are stored in ACC