CSE 101 · WEEK 14 · READING
Course synthesis and review
A final synthesis: explain the concepts, trace the computation and question the assumptions.
Use this reading to connect earlier ideas and identify topics to revisit. Predict each answer before opening its Check. The short C examples are review, not a new assignment. No new assessment format, deadline or compulsory lab is introduced. Click any figure to enlarge it. Wide code and tables scroll sideways.
1. One system brings the course together

A room sensor provides a useful route through the course. A physical signal becomes a number, a program processes that number, communication carries it to another component, and a record may outlast the running program. An alert may then affect a person’s decision. Each step introduces questions that belong to a different part of computing.
Representation explains what the number means. Architecture explains how instructions operate on stored values. Algorithms describe the method; data structures organize its inputs and state. Operating systems coordinate execution. Networks connect components. Software design, testing, security and privacy concern whether the complete system behaves appropriately for the people using it.
The aim of this final reading is to connect those explanations. It does not introduce another assessed prerequisite or a new implementation assignment. Use a question to locate uncertainty, return to the relevant earlier reading, then explain the answer in your own words. A successful review produces reasons, not just remembered labels.
Check: Which single course topic proves that a displayed sensor value is correct?
None by itself. Correctness depends on the measurement, representation, transport, parsing, computation and display assumptions working together.
2. Bits acquire meaning through interpretation
The bit pattern 01000001 can represent the unsigned integer 65 or the character A in ASCII. The bits do not choose their interpretation. An encoding, type and context do. Similarly, a raw sensor value of 700 is not automatically 700 degrees: conversion, calibration and units give it a physical meaning.
Representations also impose limits. A bounded integer type has a finite range. Sampling observes a signal at selected times rather than continuously. Quantization maps measurements into discrete levels. A text representation may preserve a number’s printable digits while omitting the unit, timestamp or measurement conditions needed to interpret it.
When an output surprises you, separate three questions: Were the correct bits obtained? Were they interpreted with the intended format? Does that interpretation match the real-world quantity? A conversion error and a faulty physical measurement may produce similar symptoms but require different fixes.
Check: Does receiving the decimal text 700 prove the sensor measured a temperature of 700 degrees?
No. It establishes only those characters. The agreed measurement format and conversion determine their meaning.
3. Instructions change machine state

An instruction address identifies where an instruction is stored; the instruction is the encoded operation found there. During execution the processor fetches instructions, interprets their operation and updates machine state. Registers, memory and control flow provide the mechanism behind a high-level program’s behavior.
A variable name is useful to the programmer, but it does not make the intended computation happen automatically. If the instructions implement the wrong bound or comparison, the processor can execute them faithfully and still produce the wrong answer to the original problem. A program finishing without a crash is weaker evidence than a result checked against a requirement.
Check: If a program prints a number and exits normally, has it necessarily solved the intended problem?
No. Normal execution does not establish that the implemented algorithm, inputs or interpretation match the requirement.
4. Return the mechanic analogy to technical terms

One mechanic represents a processor core, and each car’s repair job represents a process. Several unfinished jobs can share one mechanic’s time. Two mechanics can make progress at the same instant. A job waiting for a replacement part differs from a job ready for a mechanic but waiting for its turn.
| Distinction | Technical meaning |
|---|---|
| Program / process | Stored instructions / an executing instance with state |
| Ready / blocked | Waiting for CPU time / waiting for an event |
| Concurrency / parallelism | Overlapping progress / simultaneous execution |
| Function / process | A callable part of a program / an execution context |
An analogy is useful when it clarifies a relationship and its limits are understood. A real operating system also manages resources, protection and interactions that the shop picture does not fully describe. Do not count one process as one permanently occupied core: a process may wait, and runnable work can share execution resources.
Check: A job is waiting for a part. Would giving it another idle mechanic necessarily make it progress?
No. Its required event has not occurred. That is the point of distinguishing blocked from ready.
5. A language is not a single execution mechanism
Compilation translates one representation into another. Interpretation executes the operations of a representation through an interpreter. Bytecode is an intermediate instruction representation; a runtime may interpret it or compile parts of it further. These are mechanisms, not exclusive labels that permanently classify every implementation of a language.
Ordinary CPython provides the familiar example from Week 5: source is translated into Python bytecode and the runtime executes it. The user may not see a separate compilation command, but that does not mean no intermediate translation occurs. Likewise, a language with a native compiler can also have an interpreter or another implementation.
For this course’s PC C examples, compilation produces an executable appropriate to the chosen implementation and platform. Understanding that path helps distinguish source-language errors, translation errors and runtime behavior. A successful compiler invocation is not a test of the program’s intended result.
Check: Can a system involve both compilation and interpretation?
Yes. Source can be compiled to an intermediate form that is then interpreted. The stages answer different questions.
6. State why the method should work
An algorithm needs inputs, an intended result and conditions under which its steps make sense. Sequence, selection and repetition organize those steps. A flowchart helps make branch paths and stopping conditions visible, but a neat picture is not itself a proof of correctness.
For a loop, ask what has been established before each iteration and how one iteration preserves it. Then ask why the loop stops and what the maintained property means at that point. Only after the method’s behavior is understood should we compare its cost with alternatives. A fast method that answers the wrong question is not an improvement.

The ordered tree illustrates eliminating a branch from a comparison. Searching for J follows G, K, I, J: four node visits. Scanning A through M from left to right reaches J on the tenth item. These counts are item visits, not exact machine-instruction counts. The picture is not the precise midpoint tree of every binary-search implementation. Ordering justifies discarding a branch; balance influences path length.
An unsorted collection cannot be searched by discarding half on the same grounds. Preparing a sorted structure also costs work. One lookup and a million lookups may justify different choices. Always include the assumptions and setup costs in the comparison.
Check: Why is “binary search is always faster” an incomplete statement?
It omits ordering, size, setup costs and the operation being compared. An invalid precondition makes the method incorrect regardless of its speed.
7. Choose storage and access rules for the task


An array offers direct indexing into contiguous elements. Its index identifies a position, not the element’s meaning or permanent identity. The original six-element drawing labels positions 1–6; C indices for those elements are 0–5. A bound belongs to the actual array, not to whichever labels happen to appear in a picture.
A stack removes the most recently added item first. A queue removes the earliest waiting item first. These are access rules; either can be implemented using different storage representations. A linked list follows successor links and can relink after a known node, but finding that node can still require a traversal.
| Need | Reasonable starting point |
|---|---|
| Visit fixed samples by position | Array |
| Undo the latest action | Stack |
| Serve requests in arrival order | Queue |
| Relink after a known node | Linked list |
Check: Does choosing a linked list make access to its thousandth element a direct indexing operation?
No. A simple singly linked list normally follows links from the head to reach that position.
8. Records, identity and persistence: the Week 11 connection
Week 11 has now been completed, so its database and record ideas belong in the synthesis too. A structure groups fields of one in-memory record. An array or list organizes several records. A database schema adds descriptions of fields, keys and constraints, while a DBMS can provide managed queries, concurrency and recovery services.
A key identifies a record independently of where it is stored. Sorting an array can change an index while leaving the record’s ID unchanged. A foreign key connects related records, such as readings to devices. Merely placing related integers in C structures does not automatically enforce that relationship.
Changing memory does not change a saved file. Writing a file can fail, and successful output is not the same as a database transaction. This distinction connects Week 11 to Week 13: state exactly what was accepted, what changed in memory and what was successfully persisted. See the Week 11 reading for the fuller treatment.
Check: After sorting records by value, should a reading’s ID be replaced with its new array index?
No. Its identity should remain stable even when its storage position changes.
9. Communication carries representations across boundaries

An endpoint produces or consumes application data. An intermediate router forwards traffic between networks. The Internet is the interconnected network infrastructure; the Web is one application family using resources and protocols such as HTTP. A file is stored data, while a protocol specifies formats and interaction rules. These concepts describe different roles.
Receiving bytes does not prove their meaning is correct or that the sender had permission to supply them. A complete application record may require several lower-level deliveries. A complete-line helper and its parser therefore have different contracts. The same distinction appears when a browser retrieves a resource: naming, communication and interpretation are separate stages.
Check: If a packet reached the computer, has the application necessarily received a complete valid measurement record?
No. Framing, assembly, validation and interpretation may still be required.
10. Evaluate learned behavior on the cases that matter
Training adjusts a model using examples and an objective; inference uses the resulting model on an input. A high training score does not establish performance on independent new cases. Reusing the same examples for development and evaluation can conceal weaknesses, and changing environments can invalidate assumptions.
A single score can hide important errors. An inspection model that labels every item sound could appear accurate when defects are rare while detecting none of them. Examine false positives, false negatives and representative conditions. Also identify how the output will be checked and what happens when the system is uncertain or wrong.
The review question is not simply whether a system uses AI. Ask what data and objective shaped its behavior, which conditions were tested and what evidence supports its intended use. The Week 12 worked evaluation shows why accuracy and recall answer different questions.
Check: Why might 99% overall accuracy still be inadequate for detecting a rare fault?
The model could miss every fault while correctly labelling the much more common normal cases. The relevant error breakdown is essential.
11. Protection and purpose belong in the design
Confidentiality concerns who can read information; integrity concerns unauthorized changes; availability concerns access when needed. Privacy also asks whether information should be collected and retained at all. A securely stored unnecessary history can still be a poor privacy design.
Encryption does not validate a physical reading, grant correct permissions to every account or make a stale signed message fresh. A parser does not authenticate a sender merely by accepting a valid number. A tested backup does not replace access control. Connect each claimed protection to the mechanism and assumptions that support it.
This brings the course back to requirements. Decide what should happen, including important failures, then choose tests with independently expected results. Readability, maintainability and the effects on people are part of the system’s quality, not decorations added after a working demonstration.
Check: The network is encrypted, but one shared account can read every room’s history. Which questions remain?
Who needs which records, how permissions are assigned, how actions are attributed and whether the collection and retention are justified.
12. Reasoning clinic: trace the values before running
int a[4] = {3, 8, 2, 7};
int total = 0;
for (int i = 0; i < 4; i++) {
if (a[i] >= 5)
total += a[i];
}
printf("%d\n", total);
The loop visits indices 0, 1, 2 and 3. The condition controls whether the current value contributes to total; it does not control whether the next index is visited. Before each iteration, total is the sum of qualifying values among the elements already examined. That statement connects the trace to the intended computation.
Check: What is printed, and when does total change?
It prints 15. The values 8 and 7 qualify, so total changes from 0 to 8 at index 1 and from 8 to 15 at index 3. The other iterations leave it unchanged.
| Index | Value | Total afterward |
|---|---|---|
| 0 | 3 | 0 |
| 1 | 8 | 8 |
| 2 | 2 | 8 |
| 3 | 7 | 15 |
13. A boundary error has no reliable predicted output
int a[4] = {3, 8, 2, 7};
/* Incorrect: diagnose, do not run. */
for (int i = 0; i <= 4; i++)
printf("%d\n", a[i]);
The fourth valid index is 3. The condition i <= 4 also permits i = 4, and a[4] accesses outside this array. The corrected condition is i < 4. C does not define a reliable output for the faulty program; “it prints a random fifth number” is not a valid language-level explanation.
Although a pointer one past an array may be formed for certain comparisons and iteration patterns, it must not be dereferenced as an array element. The distinction is between an allowed boundary position and an object that actually exists there.
Check: If the faulty loop happened to print five plausible numbers once, would that make it correct?
No. One observed run does not repair undefined behavior or establish that the fifth access is valid.
14. A pointer argument is also passed by value
void bump(int n) {
n++;
}
void bump_at(int *p) {
(*p)++;
}
/* Inside main: */
int x = 5;
bump(x);
bump_at(&x);

bump receives a copy of the integer value, so modifying n does not modify x. bump_at receives a copy of an address. Dereferencing that address reaches x, so modifying *p changes x. C still passes the pointer value by value; no new argument-passing mechanism is required.
The pointer must designate a live, writable int before bump_at uses it. This small example establishes that by passing &x. A general function contract must state such a precondition rather than assuming any pointer value is safe. Distinguish the pointer object, the address stored in it and the object reached through that address.
Check: What is x after each call?
After bump(x), x remains 5. After bump_at(&x), x is 6. The first call changes a local copy; the second writes through a copied address.
15. The operation happens before assignment conversion
int sum = 7;
int count = 2;
double a = sum / count;
double b = (double)sum / count;
In the first expression both operands of division are integers, so integer division produces 3. Assigning it to a double gives 3.0; it does not restore the discarded fraction. In the second expression the conversion occurs before division, giving 3.5 for these values.
A general averaging routine must also handle count == 0 and consider whether the sum can overflow. Choosing a floating destination alone does not solve those earlier operations. Trace types and evaluation steps, not just the type of the final variable.
Check: Would (double)(sum / count) produce 3.5 here?
No. The integer division still happens first. The cast converts the already computed integer 3 to 3.0.
16. Two indices define which elements are visited
int a[2][3] = {{1, 2, 3},
{4, 5, 6}};
int total = 0;
for (int r = 0; r < 2; r++)
for (int c = 0; c < 3; c++)
total += a[r][c];
The outer loop selects a row; the inner loop visits its three columns. The inner initialization occurs again for each row, so all six elements are included and total becomes 21. If c starts at 1 instead, column zero is skipped in both rows: the visited values are 2, 3, 5 and 6, whose sum is 16.
Both traversals stay inside the array, yet they answer different questions. This is why bounds checking alone cannot prove that an algorithm meets its requirement. A valid but unintended traversal can still compute the wrong total.
Check: With c starting at 1, are only the first element of the whole array or the first column of every row skipped?
The first column of every row is skipped, because the inner loop restarts at 1 for each outer iteration.
17. Test the decision and the input contract separately
| Input | Expected interpretation |
|---|---|
| 599 | Valid and not high |
| 600 | Valid and high |
| 601 | Valid and high |
| Invalid text | Reject before applying the threshold |
The equality case distinguishes >= from >. Values immediately below and above it expose an off-by-one interpretation of the requirement. Invalid text belongs to a different decision: parsing must succeed before the threshold function receives a measurement.
No new reading, an old reading and a new valid zero are different states. If a connection fails, silently replacing the measurement with zero fabricates data. Retaining an older value can be reasonable only if its age or failed update is made clear. These are requirements about the system’s meaning, not just its arithmetic.
Check: Should a parser failure automatically produce a LOW status?
No. It means no valid new sample was obtained. LOW describes a successfully interpreted value below the threshold.
18. Follow one reading through the complete path

Start with a known input and compare evidence at each stage: physical input, raw sample, transmitted characters, complete record, parsed integer, computed status and saved row. A difference between adjacent stages narrows the investigation. Do not change several unrelated components before identifying which assumption failed.
For an empty saved file, check the intended path, opening mode, successful writing and closing, and whether a valid record reached the logger. For an incorrect display, compare the parsed value with the displayed conversion. A correct parser does not prove a transport helper handles partial records, and successful output to a stream does not by itself establish power-loss durability.
The reused picture is a conceptual PC logging pipeline, not a wiring diagram or a claim that the Arduino itself writes the CSV file. The earlier weeks provide the implementation context. Here the goal is to explain the boundaries and evidence needed to diagnose a failure.
Check: If the parser receives 700 correctly but the display shows 70, which boundary would you inspect next?
Inspect computation, conversion and display formatting after parsing. The evidence already narrows the fault beyond the earlier input stages.
19. Three changes of context
A system working once on one desk is useful evidence, but it is not a universal claim. Consider these changes of context and identify which earlier assumptions no longer have support.
Check: The sensor works on one desk but fails in another room. What would you inspect first?
Compare wiring, power, calibration, input range and environmental conditions using known inputs. Then compare the data at each stage before blaming the algorithm.
Check: An encrypted service uses one shared account for all rooms. What remains unresolved?
Permissions, attribution, collection purpose and retention. Transport encryption does not decide who should see which records.
Check: A classifier performs well overall but misses rare important cases. What evidence is needed?
Inspect false negatives and false positives for those cases, along with representative independent data and the consequences of errors. A single overall percentage is insufficient.
20. Use uncertainty to choose the next review step
Return to a diagram and explain every arrow, state, index or message. Work one small example by hand and include an empty, boundary or failure case where appropriate. Compare with the earlier explanation, then try another example without looking at the answer. This reveals whether a remembered result has become a reusable idea.
For code, state the expected result before execution. If the result differs, trace one step at a time. For a system, separate a requirement, an assumption, an observation and a conclusion. “It worked once” is an observation; “it works for every permitted input” needs a much stronger argument.
Classroom time remains available for questions and remaining quizzes under the existing course policy. This reading adds no exam format, deadline, grading rule or compulsory Week 14 lab. The instructor determines how the final review is used.
Check: What is a stronger review activity than rereading an answer you recognize?
Explain it without the answer, apply it to a changed example and justify a boundary or failure case.
21. Routes back through the course
This synthesis preserves all ten embedded teaching-image components from the accepted 38-slide Week 14 deck as nine figures. Figure source notes trace them to the earlier weekly decks. The two sensor illustrations are generated conceptual artwork reused from Week 13. The short Week 11 recap above completes the review now that its previously deferred material has been prepared; the Week 14 PPTX and published PDF are unchanged.
| Week | Review focus |
|---|---|
| Week 1 | Computer foundations and representation |
| Week 2 | Architecture and instruction execution |
| Week 3 | Algorithms, decisions and loops |
| Week 4 | Operating systems and processes |
| Week 5 | Languages, translation and C foundations |
| Week 6 | Physical computing and control |
| Week 7 | Software design, functions and arrays |
| Week 8 | Algorithms, search and efficiency |
| Week 9 | Networks, pointers and strings |
| Week 10 | Internet/Web and file persistence |
| Week 11 | Databases and records |
| Week 12 | AI and linked data structures |
| Week 13 | Security, privacy and integration |
For textbook review, use Brookshear & Brylow, Computer Science: An Overview, 12th Global Edition, following the chapter references in the relevant weekly reading. For C semantics, consult the GNU C Language Introduction and Reference Manual or WG14 N1570, the public C11 committee draft. The latter is a reference document, not labelled as the C17 standard.
The final connection is a habit: identify what a representation means, explain what a method assumes, trace what the implementation actually does and ask what evidence supports the result. Those questions remain useful well beyond this introductory course.