Set 1 Flashcards
Checked by Matt. Covers everything above SA 1 on BPCompSci topic list
What are the advantages of RPN?
- Eliminates the need for brackets in sub-expressions
- There is no need for order of precedence of operators (DON’T MENTION BIDMAS)
- The expressions are in a form suitable for evaluation using a stack, as the expression can be evaluated from left to right
What is main memory?
Memory that is directly addressable by the processor
What is the system bus?
- A set of parallel wires connecting independent components of a computer system
- It is used to pass signals between the components.
- These signals can represent data, address, or control information.
What is the stored program concept?
Two parts:
(a) A program must be resident in main memory to be executed.
(b) Machine code instructions are fetched and executed serially (one at a time) by the processor.
What are the two types of stored program concept?
- Von Neumann (where data and instructions are stored in main memory)
- Harvard Architecture (where instructions and data are stored separately, using separate buses)
Why is Harvard Architecture sometimes used in preference to Von Neumann?
Von Neumann:
- Competition for resources as all share same bus
Harvard:
- Instructions and writing/reading data can take place in parallel so can be faster
- Avoid bottleneck of single data/address bus
- Instruction and data memory can have different word lengths
- Avoids possibility of data being executed as code, which is one method that can be exploited by hackers
Where is Harvard Architecture used?
Embedded systems and digital signal processing systems
Describe the role of the control unit
- To control operation of the fetch-execute cycle
- It controls fetching (or loading or storing) operations
- It determines the type of an instruction
- To execute (some) instructions
- To synchronise the operation of the processor
- To send control signals and commands to other components
- To control the transfer of data between registers
- To handle interrupts
Describe the fetch part of the fetch decode execute cycle
Fetch:
- Contents of Program Counter transferred to Memory Address Register
- Address bus used to transfer this address to main memory
- Read signal sent along control bus
- Transfer of main memory content uses the data bus
- Contents of addressed memory location loaded into the Memory Buffer Register
- Contents of memory buffer register are copied to the current instruction register
- Increment Program Counter (part of Fetch stage, but not directly involved in fetching an instruction)
Describe the decode part of the fetch decode execute cycle
Decode:
- Instruction to decode held by the Current Instruction Register
- The control unit decodes the instruction
- Instruction split into opcode and operand(s)
Describe the execute part of the fetch decode execute cycle
Execute:
- If necessary, data is fetched or stored
- The opcode identifies the type of operation to be performed by the processor
- The operation (identified by the opcode) is performed by the control unit.
- The ALU is used for calculation (or comparisons)
- The result (may be) stored in a register (or main memory)
- The status register is updated
- If a branch is required then the program counter is updated
- The control bus will transfer signals to other components to initiate or sequence actions
How would you subtract a binary number A from a binary number B?
Convert A into -A using two’s complement. Then use binary addition with -A and B.
Why use hexadecimal instead of binary?
- Easier for humans to read/write/remember
- More compact representation
- Fewer digits required for the same value
- Less screen space
(NOT BECAUSE IT TAKES LESS MEMORY SPACE. IT DOESN’T TAKE LESS STORAGE SPACE!)
What is the data bus used for? What is its direction?
The data bus is used to transfer data between components.
The data bus is bidirectional
What is the address bus used for? What is its direction?
The address bus is used to transfer memory addresses and I/O (input output) locations.
The address bus is unidirectional from the processor
What is the control bus used for? What is its direction?
*The control bus is used to transport control signals between components.
*Indicate that a memory write is occurring
*Transfer clock signal
*Indicate the number of bits being transferred
*Receive transfer acknowledgement
*Send signal to request use of system bus
*Receive signal granting use of system bus
*The control bus is bidirectional
Give three examples of control signals
- Clock signals
- Memory read
- Memory write
What is the difference between volatile and non-volatile memory
- Volatile memory maintains its data only while the device is powered.
- Non-volatile memory retains stored information even after power is removed
Give an example of non-volatile main memory
ROM (Read Only Memory)