University Study Notes on IGCSE Computer Science: Computer Systems
File Size Measurement and Data Compression
The size of a computer file can be quantified using various standard units of measurement. In the context of digital data, common units include the bit, nibble, and byte. A nibble represents 4 bits, while a byte is composed of 8 bits. Other measurement units that were not used in the context of the transcript include the term "bot," which is not a recognized computer science measurement unit.
To manage the storage and transmission of these files, compression techniques are employed to reduce the overall file size. The two primary categories of compression are lossy and lossless compression. Lossy compression reduces file size by permanently removing some data (often used in media like JPEG or MP3), while lossless compression reduces size without any loss of original information, allowing the file to be reconstructed perfectly.
Reducing file size provides several critical benefits for both storage and transmission. First, it requires less storage capacity on secondary storage devices, allowing more files to be saved on a single device. Second, smaller files can be transmitted across a network much faster, reducing the time required for activities such as emailing or downloading. Third, it reduces the bandwidth required for transmission, which can lower costs and improve network efficiency.
Smartphone Hardware: Input, Output, and Secondary Storage
Smartphones are integrated computer systems that utilize various hardware components for user interaction and data retention. Input devices that can be built directly into a smartphone include sensors such as a microphone for capturing audio, a camera for visual input, or a touchscreen (which functions as both input and output). Output devices built into the device include the screen/display for visual output and speakers for audio output.
Secondary storage in a smartphone is essential for providing non-volatile, permanent storage for data even when the device is powered off. Its primary purpose is to store the operating system, applications (apps), and user data such as photos and documents. The most suitable type of secondary storage for a mobile device like a smartphone is Solid State Drive (SSD) or Flash memory. This choice is predicated on several physical and performance factors: it has no moving parts, making it highly durable and resistant to physical shock; it is compact and lightweight, fitting the form factor of a handheld device; and it offers very fast read/write access speeds compared to traditional magnetic media.
Data Representation: Character Sets and Number Conversions
Computer systems use character sets to convert human-readable text into binary that the hardware can process. The American Standard Code for Information Interchange (ASCII) is a common set, but for broader global support including different languages and symbols, Unicode is used as an alternative character set.
In the ASCII system, the character 'A' is represented by the denary value . Converting this to an 8-bit binary number results in . In hexadecimal, this is represented as . The character 'm' has a denary ASCII value of . Its binary equivalent is , which converts to in hexadecimal.
When converting from binary to other systems, such as the binary ASCII number (representing the character 'y'), the denary value is calculated as follow: . In hexadecimal, the same binary number is split into two nibbles, () and (), resulting in .
Binary Operations and Data Transfers
Logical shifts are performed on binary numbers to manipulate data or perform quick calculations. A logical right shift of two places on the binary number results in . In this process, the bits are moved two positions to the right, and the vacant positions on the left are filled with zeros.
Binary addition involves summing two binary strings. For example, adding the ASCII characters 'T' () and 't' ():
Network Structures and Packet Switching
When a network is established within a single room (such as a Local Area Network or LAN) to allow employees to share files, packet switching is often used. When an email is sent, it is broken down into small units called packets. The structure of a packet typically consists of three main parts: the header, the payload, and the trailer. The header contains essential routing information, including the sender's IP address, the receiver's IP address, the packet number (sequence number), and the total number of packets. The payload contains the actual contents of the email. The trailer usually contains a checksum or parity bit used for error detection to ensure the packet data arrived intact.
Data transmission methods define how data moves across these networks. A company may choose parallel full-duplex data transmission. Parallel transmission means multiple bits are sent simultaneously over multiple wires, which is faster for short distances. Full-duplex means data can be sent and received in both directions at the same time. However, this method has drawbacks: parallel transmission can suffer from data skew (where bits arrive out of sync) over longer distances, and the cost of cabling more wires is significantly higher than serial transmission. An alternative method would be serial data transmission, where data is sent one bit at a time over a single wire.
CPU Architecture and the Fetch-Decode-Execute Cycle
The Central Processing Unit (CPU) follows the Fetch–Decode–Execute (FDE) cycle to process instructions. During the Fetch stage, several registers are active, primarily the Program Counter (PC), which holds the address of the next instruction, and the Memory Address Register (MAR), which holds the address of the data to be fetched from memory. Other registers include the Memory Data Register (MDR) and the Current Instruction Register (CIR).
In the Decode stage, the Control Unit (CU) interprets the instruction currently held in the CIR. It translates the instruction into a form that the CPU's internal components can carry out. During the Execute stage, the instruction is carried out. A common register used here is the Accumulator (ACC), which stores the results of calculations performed by the Arithmetic Logic Unit (ALU).
Buses are the communication pathways within the CPU. Three essential buses are the address bus (carrying memory addresses), the data bus (carrying actual data and instructions), and the control bus (carrying signals from the Control Unit).
CPU performance is heavily influenced by clock speed, measured in Gigahertz (). Upgrading from a dual-core processor to a dual-core processor increases the clock speed, meaning the CPU can perform more FDE cycles per second, resulting in faster processing of instructions and improved system responsiveness.
Embedded Systems and Programming Tools
An embedded system is a computer system that performs a dedicated, specific function as part of a larger mechanical or electrical system, such as the control unit in a washing machine. For programming these systems, assembly language is often used. Since computers can only understand machine code, a translator called an assembler is used to convert assembly language into machine code.
Programming in assembly language provides the benefit of direct hardware control and more efficient memory usage compared to high-level languages. In small systems like washing machines, hexadecimal is often used to represent binary error codes on screens because it is more compact and easier for humans to read than long strings of binary.
To assist development, programmers use an Integrated Development Environment (IDE). Beyond the built-in translator, IDEs provide several features:
A code editor with syntax highlighting to make code easier to read and troubleshoot.
Debugging tools, such as breakpoints and variable stepping, to identify and fix logic errors.
Auto-completion and auto-indentation features that speed up the coding process and reduce syntax errors.
Operating Systems and System Software
The operating system (OS) is the software that manages the computer hardware and software resources. Important functions include managing files (organizing storage), providing a User Interface (UI), and handling interrupts. However, loading the bootstrap is generally the responsibility of the BIOS/firmware and the CPU's initial power-on sequence rather than a management function of the OS itself once it is running.
The set of instructions provided to the operating system to allow it to initialize and run is often referred to as the bootstrap loader or startup instructions. Another core function of the OS is memory management, which ensures each application has enough RAM to operate without interfering with other processes.
Expert Systems and Artificial Intelligence
An expert system is a specialized form of Artificial Intelligence (AI) designed to mimic the decision-making ability of a human expert. For instance, in a medical context, a doctor inputs data regarding symptoms into the user interface. The inference engine then functions as the "brain" of the system, deciding which questions to ask by searching through the facts stored in the knowledge base and applying the logic found in the rule base.
The system reaches a diagnosis through the inference engine's processing and outputs the result on the user interface. Some advanced expert systems possess machine learning capabilities, which is the ability to automatically adapt and improve their own processes and data based on experience and new information.
Digital Currency and Blockchain
A payment transaction using digital currency relies on blockchain technology. This process involves broadcasting a transaction to a decentralized network of computers. The transaction is verified and bundled into a block with other transactions. This block is then added to the existing chain of transactions, creating a permanent, unalterable digital ledger that ensures the security and transparency of the currency transfer.