The IB CS SL Book - Topic 2
from IB students, to IB students, for IB students
- System fundamentals
- Computer organization
- Computational thinking, problem-solving and programming
- General principles
- Think procedurally
- Think logically
- Thinking ahead
- Thinking concurrently
- Thinking abstractly
- Connecting computational thinking and program design
- Introduction to programming
- Nature of programming language
- Use of programming language
- General principles
- Option D: Object-oriented programming
- Internal Assesment
Topic 2: Computer organization
1. Computer organization
1. Computer architecture
2.1.1 The central processing unit (CPU) and its elements
Outline the architecture of the central processing unit (CPU) and the functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within the CPU.
Central Processing Unit (CPU) is a hardware component of a computer system and can perform basic arithmetic, logical or input/output operations, in order to process data from input devices into useful information.
A block diagram can be created to represent the elements that compromise it.
The CPU contains the:
- control unit (CU)
- arithmetic logic unit (ALU)
- memory address register (MAR)
- memory data register (MDR)
The control unit (CU) controls the retrieval of instructions from the primary memory as well as the sequence of their execution and provide the ALU with the data that needs to be processed as well as the instructions of how the data should be processed.
The arithmetic logic unit (ALU) performs all the basic arithmetic, logical or input/output operations.
The random access memory (RAM) stores the executing program instructions as well as any data that is needed.
The read only memory (ROM) holds instructions and data in unique memory locations:
- store permanent instructions and data that cannot be changed are used to boot and operate the computer
- nothing can be altered in the ROM
The CU contains various registers, a small storage location that can hold data. The basic registers in the CU are memory address register (MAR) and memory data register (MDR).
The MAR holds the memory address of the data to be used by the ALU, so that the ALU can fetch the corresponding content from the memory and process it accordingly.
In order for the MAR to communicate with the primary memory, a connection is necessary. This connection is accomplished by Memory (Address) Bus.
The MDR holds the data that is to be used by the ALU and then saved to the RAM.
The MDR is closely related to the MAR, since whichever memory address location the MAR is holding, the corresponding data will be loaded onto the MDR for processing by the ALU.
After the processing has taken place, the ALU places the result onto the MDR and the data is copied to the memory address location in RAM specified by the MAR. The connection between the RAM and the MDR is accomplished by the Data Bus.
The architecture of CPU:
2.1.2 RAM and ROM
Describe primary memory.
Distinguish between random access memory (RAM) and read-only memory (ROM), and their use in primary memory.
The primary memory is the only storage that is directly accessible by the CPU. It holds both data and instructions that are currently running on the computer system.