Fundamentals of Computer Science
In computer science, the terms datum and information are often used interchangeably, but they have distinct meanings. A datum is a raw, uninterpreted piece of data—essentially a single value…

A digital representation of a temperature reading is less sensitive to noise because:
Which requirement is NOT mandatory for a procedure to be considered an algorithm?
In the Von Neumann architecture, which component stores both data and program instructions in the same memory space?
A CPU fetches an instruction from memory address 0x0040. After execution, the Program Counter (PC) points to 0x0044. Which of the following explains this behavior?
Which of the following statements about cache memory is true?
What is the minimum number of bits required to uniquely encode the seven days of the week?
In Boolean algebra, which operator has the highest precedence when no parentheses are present?
Which SQL clause determines the order in which the final result rows are displayed?
A programmer writes a loop that never reaches a terminating condition. Which fundamental property of an algorithm is violated?
Understanding Data and Information
In computer science, the terms datum and information are often used interchangeably, but they have distinct meanings. A datum is a raw, uninterpreted piece of data—essentially a single value without context. When that datum is placed within a meaningful context, it transforms into information. This distinction is crucial because it underpins how we store, process, and communicate knowledge in digital systems.
- Datum: A solitary value, such as the number
42or a binary bit1. - Information: The meaning derived from the datum, e.g., "42 degrees Celsius" conveys temperature, which is useful for decision‑making.
Recognizing this transformation helps developers design better data models and user interfaces, ensuring that raw data is always presented with the appropriate context.
Digital Representation and Noise Immunity
Analog signals are continuous and susceptible to noise, which can corrupt the measured value. Digital representation mitigates this problem by mapping a range of analog voltages to discrete binary levels. Each binary level corresponds to a specific range of analog values, allowing the system to ignore small variations caused by noise.
Key benefits of digital encoding include:
- Robustness against electrical interference.
- Ease of error detection and correction using techniques such as parity bits and checksums.
- Simplified storage and transmission, as binary data can be efficiently compressed.
For example, a temperature sensor that outputs a 10‑bit digital value can represent 1024 distinct temperature levels, each covering a small voltage range. Even if noise slightly perturbs the voltage, the digital converter will still map it to the same binary code, preserving the intended reading.
What Makes an Algorithm?
An algorithm is a well‑defined, step‑by‑step procedure for solving a problem. To be considered a valid algorithm, a procedure must satisfy several mandatory requirements:
- Definiteness: Each step must be unambiguous and precisely defined.
- Finiteness: The algorithm must terminate after a finite number of steps.
- Input and Output: It should accept input(s) and produce at least one output.
- Effectiveness: Every operation must be basic enough to be performed exactly in a finite amount of time.
Expressing an algorithm in natural language is not a requirement; in fact, natural language often introduces ambiguity. Formal notations, pseudocode, or programming languages provide the precision needed for implementation and analysis.
Von Neumann Architecture: Unified Memory
The classic Von Neumann architecture stores both data and program instructions in the same memory space—typically the main memory (RAM). This design simplifies hardware, allowing the CPU to fetch instructions and data using the same bus system.
Key characteristics of this unified memory model include:
- Shared address space for code and data.
- Sequential execution of instructions unless a control‑flow change occurs.
- Potential bottleneck known as the "Von Neumann bottleneck," where the single bus limits simultaneous data and instruction transfers.
Understanding this architecture is essential for grasping concepts such as caching, pipelining, and modern alternatives like Harvard architecture, which separates instruction and data memories.
Program Counter (PC) Advancement Explained
When a CPU fetches an instruction from memory address 0x0040 and the Program Counter (PC) subsequently points to 0x0044, the most common explanation is that each instruction occupies 4 bytes. The PC automatically increments by the instruction length to point to the next sequential instruction.
In many instruction set architectures (ISAs), such as ARM or MIPS, fixed‑length instructions simplify decoding and pipeline design. Variable‑length ISAs (e.g., x86) adjust the PC based on the actual size of the fetched instruction.
Therefore, the observed PC increment reflects the underlying instruction width, not a constant offset or a skipped branch.
Cache Memory: Speeding Up Data Access
Cache memory sits between the CPU and main memory, storing copies of frequently accessed data and instructions. By keeping these copies close to the processor, cache reduces the average time required to access memory, dramatically improving overall system performance.
- Temporal locality: If a piece of data is accessed once, it is likely to be accessed again soon.
- Spatial locality: Accesses tend to cluster around nearby memory addresses.
Modern CPUs employ multi‑level cache hierarchies (L1, L2, L3), each with increasing size and latency. Contrary to some misconceptions, cache does not hold the entire operating system image permanently, nor is it limited to executable code only; it stores both data and code as needed.
Encoding the Days of the Week
To uniquely represent the seven days of the week, we need enough binary combinations to cover all possibilities. The smallest integer n such that 2ⁿ ≥ 7 is n = 3, because 2³ = 8 provides eight distinct codes, one more than required.
Thus, three bits are sufficient, allowing for one unused combination (e.g., 111) that can be reserved for error detection or future extensions.
Operator Precedence in Boolean Algebra
When evaluating Boolean expressions without parentheses, the NOT operator has the highest precedence. This means that negations are applied before any AND, OR, or XOR operations.
For example, in the expression ~A & B | C, the NOT operation on A is performed first, followed by the AND with B, and finally the OR with C. Understanding this hierarchy is essential for correctly designing logical circuits and writing accurate conditional statements in programming.
Key Takeaways
- A datum becomes information when contextual meaning is assigned.
- Digital representations improve noise immunity by discretizing analog signals.
- Algorithms must be finite, unambiguous, and produce output; natural language is not a requirement.
- Von Neumann architecture uses a single memory space for both data and instructions.
- Program Counter increments reflect instruction size, commonly 4 bytes in fixed‑length ISAs.
- Cache memory stores copies of frequently used data to reduce RAM access latency.
- Three bits are enough to uniquely encode the seven days of the week.
- In Boolean algebra, NOT has the highest precedence.
Mastering these foundational concepts equips you with the analytical tools needed for deeper studies in computer architecture, algorithm design, and digital logic.
