Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All

Online Courses / University Track / Computing Foundations

Module 2 · Lab

Lab: encode a message and size a data store

Convert numbers, encode a short word and estimate the storage a device needs, then explain a limit to a non-specialist.

  • 50 minutes
  • 14 marks
  • Self-marked

50 minutes. Self-marked against the rubric. 14 marks. In the full course this counts toward the labs and cases share (15% of the course grade). Write your answers in the boxes, then open the model answer and tick each mark you earned honestly. Nothing is sent or stored.

Scenario (invented)

A small team designs a basic device (invented) that stores a single reading and a two-letter label. Readings are whole numbers. The label “Go” uses ASCII with one byte per character, where G is 71 and o is 111. The device also holds one small icon of 40 × 30 pixels at 3 bytes per pixel.

Tasks

Task 1 (3 marks)

Convert the reading 37 to binary using repeated division and show the remainders. Then check it by place values.

Private: nothing you type here is sent or stored.

Task 2 (4 marks)

Encode the label “Go” as two 8-bit bytes, using G = 71 and o = 111. State how many bits the label needs in total.

Private: nothing you type here is sent or stored.

Task 3 (3 marks)

Compute the uncompressed size of the 40 × 30 icon at 3 bytes per pixel in bytes and in kilobytes (1 kB = 1,000 bytes).

Private: nothing you type here is sent or stored.

Task 4 (4 marks)

A colleague wants to store the reading 300 in a single 8-bit byte. In up to four sentences, explain why this fails and propose a fix.

Private: nothing you type here is sent or stored.

Rubric and model answer

Task 1: convert a reading (3 marks)

Model: 37 ÷ 2 = 18 r 1; 18 ÷ 2 = 9 r 0; 9 ÷ 2 = 4 r 1; 4 ÷ 2 = 2 r 0; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Read last to first: 100101. Check: 32 + 4 + 1 = 37. As an 8-bit byte: 00100101.

Task 2: encode the label (4 marks)

Model: 71 = 64 + 4 + 2 + 1, so 01000111. 111 = 64 + 32 + 8 + 4 + 2 + 1, so 01101111. The label is 2 bytes, which is 16 bits.

Task 3: size the icon (3 marks)

Model: pixels = 40 × 30 = 1,200; bytes = 1,200 × 3 = 3,600; kilobytes = 3.6 kB.

Task 4: explain a limit (4 marks)

Model: “An 8-bit byte has 256 patterns, so it can hold only 0 to 255. The reading 300 is larger than 255, so it cannot be stored in one byte. We can use 9 bits, which give 512 patterns (0 to 511), or a whole second byte (16 bits, 0 to 65,535). Adding a bit doubles the range, so the choice depends on the largest reading we expect.”

Marks so far: 0 of 14