CS2100: pass the exams, not just read the notes
Your complete guide to National University of Singapore's computer organisation course. See where the marks are, work real practice questions, and study with an AI tutor that knows CS2100.
Sia generates CS2100 practice questions, walks through data representation systems and boolean algebra step by step, and quizzes you on the material the exam weights most heavily.
Worked example
A direct-mapped cache has 64 blocks with a block size of 16 bytes, addressed by a 32-bit byte address. How is the address divided into tag, index and offset?
Start with the offset, which selects a byte within a block. The block is 16 bytes and 16 is 2 to the power 4, so the offset needs 4 bits.
The tag is whatever is left over, since it must distinguish every address that maps to the same index. That is 32 minus 4 minus 6 = 22 bits.
Check the layout. From the most significant end: tag 22 bits, index 6 bits, offset 4 bits, totalling 32. Always take the logarithm base 2 of the byte count for the offset and of the block count for the index, and never of the byte totals themselves.
The trap: Using the raw sizes as bit counts instead of their logarithms, which produces option B and is impossible on a 32-bit address. The other frequent error is swapping index and offset, as in option D, which comes from working out the two fields in the wrong order. Compute the offset from the block size first, then the index from the number of blocks, then subtract. classic slip!
One exam decides 50% of your grade. Open book, conducted on paper. This whole page is built around that.
Overview
What CS2100 is, and where it sits
CS2100 is the School of Computing's core computer organisation course and the point where a programmer starts seeing the machine. Its stated objective is to familiarise students with the fundamentals of computing devices: the basics of data representation, and how the various parts of a computer work separately and together, so that you can understand the issues in computing devices and how those issues affect the implementation of solutions.
The course is worth 4 units and runs on two-hour recitations plus a one-hour tutorial and a one-hour lab from Week 3. Content moves from the C programming language and data representation, through combinational and sequential circuits, into assembly language, processor datapath and control, and finally pipelining and cache.
Assessment is split exactly in half. Continual assessment is 50%, made up of tutorials, quizzes, assignments, labs and a midterm test, and the final examination is the other 50%. Both the midterm and the final are open-book, pen-and-paper assessments, which shifts the demand away from memorisation and toward being able to actually perform the analysis under time pressure.
Official outline: comp.nus.edu.sg · CS2100 outline. Always treat the official outline and the exam timetable as authoritative.
Difficulty & time commitment
Is CS2100 hard, and how much time does it take?
CS2100 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.
The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.
Is this course for you
Who tends to do well, and who tends to struggle
You will likely do well if
- You build your open-book notes as a working tool during the semester and actually use them in practice papers, rather than assembling them the night before.
- You can decompose a cache address, minimise a Boolean function and trace a datapath without stopping to rederive the method each time.
- You keep up with the labs and tutorials from Week 3, since the later topics assume the earlier mechanics are automatic.
- You draw things. Circuits, state diagrams, datapaths and pipeline timing charts are all far easier to reason about on paper than in your head.
You may struggle if
- You treat open book as a substitute for preparation. The papers are time-constrained and unfamiliar notes slow you down rather than help.
- You fall behind at the datapath topic, which makes pipelining and cache substantially harder because both build directly on it.
- You skip the low-weight components. Tutorials, quizzes and labs together are 18% of the grade for steady, low-difficulty work.
- You memorise procedures without understanding what each field or signal means, which fails as soon as the question varies the parameters.
- Index your open-book notes. A contents page and tabs are worth more marks than extra content you cannot locate in time.
- Drill the arithmetic that recurs: base conversion, two's complement, Karnaugh minimisation and cache field widths. These are quick marks when automatic and expensive when not.
- For pipelining, be able to draw the timing chart and identify each hazard type and its resolution, since hazard questions are where partial understanding shows.
- Work past assessments under time. The constraint in an open-book paper is minutes, not memory.
Syllabus
The 12 topics, topic by topic
The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.
T1 · C programming language
Course lecture notesThe C language as the vehicle for talking about memory, pointers and low-level representation.
T2 · Data representation systems
Course lecture notesNumber bases, signed representations, two's complement arithmetic, overflow, and floating point.
T3 · Boolean algebra and logic gates
Course lecture notesBoolean laws, truth tables, canonical forms, and translating between expressions and gate networks.
T4 · Combinational circuit design and minimisation
Course lecture notesKarnaugh maps, don't-care conditions, and building adders, multiplexors and decoders.
T5 · Sequential circuits
Course lecture notesLatches and flip-flops, state tables and state diagrams, registers and counters.
T6 · Assembly language and the instruction set
Course lecture notesInstruction formats, addressing modes, encoding and decoding instructions, and hand-assembling short programs.
T7 · Processor datapath
Course lecture notesThe single-cycle datapath, the components each instruction class exercises, and where data flows for each.
T8 · Control logic
Course lecture notesDeriving the control signals each instruction requires and how the control unit produces them.
T9 · Pipelining
Course lecture notesSplitting execution into stages, the speedup it buys, and the pipeline registers that make it possible.
T10 · Pipeline hazards
Course lecture notesStructural, data and control hazards, and resolving them by stalling, forwarding or prediction.
T11 · Cache memory
Course lecture notesThe memory hierarchy, direct-mapped, set-associative and fully associative caches, and splitting an address into tag, index and offset.
T12 · Cache performance and replacement
Course lecture notesHit rate, miss penalty, average memory access time, and replacement and write policies.
How it's assessed
Assessment structure
| Component | Weight | Format & timing |
|---|---|---|
| Final examination | 50% | Open-book, pen-and-paper final examination covering the whole course. NUS examination period. Open book, conducted on paper. |
| Mid-term test | 20% | Open-book, pen-and-paper midterm test on a fixed date. Mid-semester. Open book, conducted on paper. |
| Assignments | 12% | Three assignments across the semester. Across the semester. Continual assessment. |
| Labs | 10% | Weekly one-hour labs from Week 3. Weekly from Week 3. Continual assessment. |
| Tutorial | 5% | Weekly one-hour tutorials from Week 3. Weekly from Week 3. Continual assessment. |
| Quizzes | 3% | Online quizzes. Across the semester. Continual assessment. |
- Continual assessment contributes 50% of the final grade and the final examination the other 50%. No separate component hurdle is published.
- Both the midterm and the final are open book on pen and paper. Open book removes the need to memorise Boolean laws, instruction encodings or cache formulas, which means the papers test whether you can execute the analysis quickly rather than whether you can recall it. Prepare a well-indexed set of notes and, more importantly, practise the procedures until they are fast.
This is an exam-cram course. With the exams at 50% of the grade and the final examination alone at 50%, your result is overwhelmingly decided by how well you perform under time pressure. Open book, conducted on paper.
Final exam timing: During the NUS examination period. Confirm the exact date and venue on the official exam timetable.
How to actually pass it
A weekly rhythm, two checklists, and the traps to avoid
The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.
The weekly loop
Before the mid-semester checklist
- Convert between number bases and perform two's complement arithmetic, identifying overflow correctly.
- Apply Boolean laws and Karnaugh maps to minimise a function, handling don't-care conditions.
- Design and analyse combinational circuits including adders, multiplexors and decoders.
- Analyse sequential circuits using state tables and state diagrams, and explain flip-flop behaviour.
Before the final heaviest topics
- Encode and decode instructions and hand-assemble short programs.
- Trace the single-cycle datapath for each instruction class and derive the control signals required.
- Identify structural, data and control hazards in a pipeline and resolve them by stalling, forwarding or prediction.
- Decompose an address into tag, index and offset for direct-mapped and set-associative caches, and compute hit rate and average memory access time.
The mistakes that cost marks
Using sizes instead of logarithms in cache fields. A 16-byte block needs 4 offset bits, not 16. Take the logarithm base 2 of the block size for the offset and of the block count for the index, in that order.
Bringing notes you have never used. Open book rewards a familiar, indexed reference. Notes compiled at the last minute cost more time to search than they save.
Confusing forwarding with stalling. Forwarding routes a result to an earlier stage before writeback; stalling delays the pipeline. Some hazards need one, some the other, and the exam asks which.
Skipping the datapath topic. Pipelining and cache both assume you can already trace a single-cycle datapath. Leaving it unlearned makes the last third of the course far harder than it is.
Teaching team
Who teaches CS2100
The bios below are factual. We do not rate lecturers; any star ratings are submitted by students who have taken CS2100.
Tan Tuck Choy, Aaron
Associate Professor in the School of Computing at the National University of Singapore, and a lecturer on CS2100. He also designed and maintains the official CS2100 and CS1231S course websites.
Prabhu Natarajan
Lecturer on CS2100 in the School of Computing at the National University of Singapore.
Teaching team as listed in the course materials reviewed. AskSia does not rate lecturers; star ratings are submitted by students who have taken CS2100.
Formula & concept sheet
The vocabulary and formulas you must own
- Two's complement
- The standard signed binary representation. Negate by inverting all bits and adding one; the leading bit indicates sign.
- Karnaugh map
- A grid arrangement of a truth table that makes adjacent minterms visually groupable, used to minimise a Boolean expression by inspection.
- Don't-care condition
- An input combination that cannot occur or whose output is irrelevant, which may be assigned either value to produce a simpler minimisation.
- Flip-flop
- An edge-triggered one-bit storage element, the basic building block of registers, counters and sequential state.
- Addressing mode
- The rule an instruction uses to compute the location of its operand, such as immediate, register or base-plus-offset.
- Single-cycle datapath
- A processor organisation in which every instruction completes in one clock cycle, so the clock period is set by the slowest instruction.
- Control signal
- An output of the control unit that configures a datapath component for the current instruction, such as selecting an ALU operation or enabling a write.
- Pipelining
- Overlapping the execution of successive instructions by splitting the datapath into stages, increasing throughput without reducing individual instruction latency.
- Data hazard
- A pipeline conflict where an instruction needs a result that an earlier instruction has not yet written back, resolved by forwarding or stalling.
- Cache address fields
- A byte address splits into tag, index and offset. The offset is log base 2 of the block size in bytes, the index is log base 2 of the number of sets, and the tag is the remainder.
- Set associativity
- The number of blocks in each cache set. Direct-mapped is one-way; fully associative has a single set containing every block.
- Average memory access time
- Hit time plus the product of miss rate and miss penalty, the standard measure of cache effectiveness.
Common acronyms: ALU · AMAT · CA · CPU · ISA · LRU · MUX · PC · RAM · SoC.
Set texts
The prescribed reading
The syllabus references map straight onto these.
Course lecture notes and the official CS2100 books page
NUS School of Computing.
Where it fits
Prerequisites, related courses & why it matters
Prerequisite: one of the CS1010 family or CS1101S at grade D or better. Preclusion: students who have completed CS2100DE at grade D or better, or who are undertaking the Bachelor of Engineering in Electrical Engineering or Computer Engineering. The course is worth 4 units.
Your CS2100 study toolkit
Study the course with Sia, not just read about it
Each tool already knows CS2100: your syllabus, your texts, and where the marks are. Grouped by how you study, from first contact to exam week.
FAQ
Frequently asked questions
Is CS2100 hard?
It rates moderately hard. The individual topics are standard computer organisation material, but the volume of exact mechanical work is high and the second half, covering datapath, pipelining and cache, is noticeably denser than the first. The open-book format removes memorisation pressure but not the need for speed.
How is CS2100 assessed?
Continual assessment is 50% and the final examination is 50%. Within the CA half: midterm test 20%, assignments 12%, labs 10%, tutorial 5% and quizzes 3%. Both the midterm and the final are open-book, pen-and-paper assessments.
What does open book actually change?
It changes what you should practise. You do not need to memorise Boolean identities, instruction encodings or the cache address formula, because you can bring them. What you do need is to have performed each procedure often enough that you are fast, since the paper is a time constraint rather than a recall test. Notes you have never used before are close to useless under time pressure.
What are the prerequisites?
You need one of the CS1010 family or CS1101S at grade D or better. The course is precluded for students who have completed CS2100DE at grade D or better, and for students in the Electrical Engineering or Computer Engineering honours degrees, who take their own equivalent.
How many units is CS2100?
Four units. Weekly contact is two-hour recitations plus a one-hour tutorial and a one-hour lab, both starting in Week 3.
Which topics carry the most marks?
The back half of the course is where the density is: assembly and instruction encoding, the processor datapath and its control signals, pipelining and hazards, and cache organisation and performance. These build on one another, so falling behind at the datapath stage makes pipelining and cache much harder than they need to be.
Study CS2100 with Sia
Work through data representation systems, boolean algebra, combinational circuit design and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.
Start studying with Sia