Volume 1 Exercises: Foundations of ComputingPractice for Volume 1
0 / 0

Workbench / Volume 1 Exercises: Foundations of Computing

Volume 1 · Exercises

Volume 1 Exercises: Foundations of Computing

Exercises that prove you understand each chapter from first principles: theory questions you answer in your own words, programs you build, run and measure, and integration tasks that combine everything covered so far. Every solution is hidden until you open it, and every programming solution shows real output from running it.

11 chapters◷ ~3 h to read ✓ 489 topics

What each chapter's exercises hold

Theory (T)Questions you answer in your own words, from first principles
Programming (P)Programs you build, run and measure, with real output to compare against
Cumulative (C)Larger tasks combining the chapter with every earlier one
Senior (S)Production problems, after What the chapter leaves out

How to use this book

  1. Read the chapter first; the exercises point back to its sections by name.
  2. Write your answer in the box before opening anything. Hints unlock as your answer grows, and the solution after the second hint and a little thinking time.
  3. Run every programming exercise yourself and compare with the real output in the solution.
  4. Rate yourself after reading a solution, and tick an exercise Done only when you could do it again without help.

Mastery levels

L1 RecognitionDefine it and identify it.
L2 WorkingUse it correctly in code or config.
L3 InternalsExplain why it works.
L4 DebuggingDiagnose failures and performance problems.
L5 DesignChoose among competing approaches.
L6 ProductionOperate it under scale, failure, security and cost.

Languages used throughout

Java 21 · SpringC · C++ · Rust · Zig · GoPostgreSQL 16TypeScript · React · browserPython · PyTorchKubernetes · cloud · CI/CDLLMs · RAG · agents

How to use it: one entry per chapter, added as you read. Write or type your answer before opening a solution; tick an exercise Done only when you could do it again without help. Programming solutions were run on a Linux lab machine (Java 21, Python 3.13, GCC); timings on your laptop will differ, but the patterns should not.

Contents

  1. V1·01Computers, Programs and Your ToolboxExercises for Volume 1, chapter 01: what a computer is, memory versus storage, bits and bytes, programs and languages, compilers, interpreters and…29 min
  2. V1·02Programming Fundamentals and ParadigmsExercises for Volume 1, chapter 02: values, types and variables; expressions, operators, division and conversions; control flow and cleanup…28 min
  3. V1·03Data StructuresExercises for Volume 1, chapter 03: the cost model, arrays and dynamic arrays, cache locality, linked lists, stacks, queues, ring buffers, deques and…16 min
  4. V1·04AlgorithmsExercises for Volume 1, chapter 04: complexity analysis (Big-O, Ω, Θ, growth classes, best/average/worst, amortised, time–space trade-offs)…15 min
  5. V1·05Discrete MathematicsExercises for Volume 1, chapter 05: sets and bitsets, relations (equivalence and order), functions and the pigeonhole principle, propositional logic…14 min
  6. V1·06Number Systems and Data RepresentationExercises for Volume 1, chapter 06: place value and bases, binary, octal and hexadecimal and converting between them, unsigned and two's-complement…15 min
  7. V1·07Computer ArchitectureExercises for Volume 1, chapter 07: gates and adders, the parts of a processor, the fetch–decode–execute cycle, clocks and the performance equation…15 min
  8. V1·08Operating SystemsExercises for Volume 1, chapter 08: kernel and user space, system calls, kernel designs, processes (PIDs, fork/exec/wait, states, scheduling, context…17 min
  9. V1·09Networking FundamentalsExercises for Volume 1, chapter 09: layers and the OSI and TCP/IP models, Ethernet and MAC addresses, IPv4 and IPv6, subnetting and CIDR, routing…17 min
  10. V1·10Compilers and RuntimesExercises for Volume 1, chapter 10: the compiler pipeline (lexing, parsing and grammars, ASTs, name resolution, type checking, intermediate…18 min
  11. V1·11Computer Science Mastery ProjectsExercises for Volume 1, chapter 11: checkpoints for the five warm-ups and the ten mastery projects (memory allocator, shell, HTTP server, thread…17 min