Unit 2 Flashcards
(14 cards)
The machine instruction cycle is a sequence of actions that a CPU performs to execute each machine code instruction in a program. State where the program is held.
RAM
State the part of the CPU that performs the decoding.
CU (Control Unit)
Outline the function of the memory address register (MAR)
MAR (is a register in the CPU that) stores the addresses of the next instruction/data; to be read from/written to RAM
Identify four fundamental operations of a computer
- Retrieve
- Compare
- Store
- Add
Distinguish between fundamental and compound operations of a computer.
Fundamental operation requires one machine instruction cycle/do not require the processor to go through many machine instruction cycles to reach a result;
A compound operation is complex / it is an operation that involves a number of other operations to reach the result;
For example, find the largest number in an array/ sort the array in ascending order etc;
Distinguish between random access memory (RAM) and read only memory (ROM).
RAM acts as temporary storage of data, instructions and programs currently running (for the operating system and for the running applications) whilst ROM is permanent memory (stores the instructions and data that won’t change/stores the instructions that the computer needs in order to boot up.
Memory access, both read and write operations are performed on RAM whilst ROM works with read only operation;
If power failures happened during access to RAM then all data will be permanently lost/RAM is volatile memory/whilst if power failure happened during the ROM access no data will be lost/ROM is non-volatile memory;
Outline the function of an operating system in managing primary memory.
A part of the OS (memory manager) assigns that block of memory to the program when a running program requests a block of memory;
When the program no longer needs the data in previously allocated memory blocks, they become available for reassignment;
OS ensures the availability of adequate memory for data structures/objects of each running program at all times;
By allocating the memory portions to programs after freeing the space (of the computer memory);
OS (memory management unit) uses virtual memory which provides secondary memory (external storage) for program that does not have enough space in RAM for execution;
After execution of the program this memory is reallocated (used by other programs)/freed;
Explain the roles of the data bus and the address bus in the machine instruction cycle.
Data Bus: Transfers actual data between the CPU, memory, and other devices during the machine instruction cycle.
Address Bus: Carries the memory address from the CPU to memory or I/O devices to specify where data should be read from or written to.
State how many integers can be represented in 1 byte
256, 2 to the power of 8
Outline why this byte could not be used to represent characters such as those
used in Chinese.
A byte can store 256 different values (2⁸), which is enough for basic Latin characters, but not enough to represent the thousands of unique characters used in languages like Chinese. Chinese has over 50,000 characters, so multi-byte encoding (like UTF-8 or UTF-16) is needed to represent them.
How many bits or bytes does 1 digit have?
1 digit means 1 byte. 1 digit is 8 bits.
Outline the function of the memory data register (MDR)
MDR is a register in the CPU holding the data which is most recently taken from the RAM.
Identify 3 functions of the operating system
Resource allocation
Memory management
Interrupt handling
State where the operating system is held when the computer is turned off.
Hard Disk or ROM or SSD