Weekly practice · Recursion, logic gates and Karnaugh maps
Due Monday, 30 November 2026. Complete sections A–D in the packet handed out in class. Show your working.
Start with the recursion question about adding squares. The last two pages cover Karnaugh maps. Suggested time: 55–60 minutes.
Use the copy you received in class.
Previous packet · Due 23 November
Weekly practice packet
Due Monday, 23 November 2026, at the start of the next CS class.
Spend 50 minutes. Complete sections A–D. Trace on paper before running Python. Save your Python function for D3. The stretch task is optional. Keep your working, code and any questions ready for class. If you reach the time limit, mark where you stopped.
- Review: eight-bit two’s complement and AND, OR and NOT. Use the signed-number bridge for a refresher.
- Cumulative algorithms: linear and binary search, bubble and selection sort, and Big O. Show the intermediate steps, not only the final answer.
- Recursion: trace calls and returns, debug the stopping condition and complete the small coding task. Explain the base case and how each call moves towards it.
This packet does not assign the separate BCD, Gray code, Excess-N, fixed-point or floating-point catch-up sequence.
Earlier homework · Audio
This was the audio homework from last week. Keep completed answers; use it only for unfinished work or corrections.
Workbook page 9: Question 1, Exit and the final audio calculation below.
PCM (pulse-code modulation) stores regularly sampled sound as binary amplitude codes. Quantization rounds each measured amplitude to one of the available levels.
Calculate the uncompressed PCM size of 5 seconds of mono audio at 8,000 samples/s and 8 bits/sample/channel. Show the multiplication in bits and divide by 8 for bytes. Repeat for stereo and explain the change. Exclude headers, metadata and compression.
Keep your working and one question to ask. The 15–20 minute estimate is advisory; your teacher will confirm the submission arrangements.
Earlier audio reading
Baumgarten, Ganea and Turland, Computer Science for the IB Diploma Programme (Hachette Learning, 2025), A1.2.2, printed page 44: read Audio and Analogue-to-digital conversion. Stop before Storage formats.
Use the sampling studio to distinguish wave frequency, sampling rate and bit depth, then show your own calculation.
Earlier homework · Binary arithmetic
About 25 minutes: practise binary addition, subtraction and multiplication. Show carries, borrows and partial products; check in decimal. Use enough digits for the full answer. Division and two’s complement are not required. Stop at 25 minutes and mark your progress.
Worked examples
The handout explains each carry, borrow and shifted partial product.
0101 + 0011 · 0110 − 0011 · 0101 × 0011
Reveal example answer
0101 + 0011 = 1000·5 + 3 = 80110 − 0011 = 0011·6 − 3 = 30101 × 0011 = 0101 + 1010 = 1111·5 × 3 = 15
Independent practice
0011 + 01010111 + 01101010 − 00111101 − 01100011 × 01010110 × 0011
Show carries, borrows and partial products. Check each answer in decimal. Keep the full result, including any extra digit.
Write in the editable handout or on paper. Keep your working, last question reached and one question to ask. Your teacher will confirm when and where to hand it in.
Earlier reading references · text and bitmap images
Preview reading · about 5 minutes
Baumgarten, Ganea and Turland, Computer Science for the IB Diploma Programme (Hachette Learning, 2025), A1.2.2 How binary is used to store data. Page numbers below are printed book pages.
Before Text and UTF-8: read Characters and strings / ASCII encoding on page 31, Unicode encoding on page 32, and the UTF comparison table and opening UTF-8 explanation on page 34. Skip the coding exercises and detailed bit-prefix examples for this preview.
Bring one question: how is a code point different from the bytes used to store it? Stop after about five minutes; this is preview reading, not another worksheet.
After Text and UTF-8, before Bitmap images: read Images / Bitmap images on page 37. Identify pixel, colour depth and the raw-storage formula. Do not complete the later exercises yet.
Upcoming homework · not assigned yet
The full representation and RLE homework is not assigned here. Your teacher will say if and when to complete it.
Upcoming representation homework (Word)