1.Lesson overview
- 1.1 Data Representation
- 1.2 Multimedia
- 5.4 Representing characters
- 5.5 Representing graphics
- 2.1 Binary Numbers
- 1Explain character encoding using ASCII, extended ASCII and Unicode.
- 2Use a character set's block structure to work out one character's code from another, and distinguish a character code from the pure binary value of the same digit.
- 3Calculate the storage required for text in a stated character set.
- 4Describe bitmap encoding using pixels, resolution, colour depth and a file header.
- 5Calculate bitmap file sizes from image dimensions and colour depth.
- 6Predict how resolution and colour depth affect image quality and file size.
- 7Explain vector-graphic drawing objects, properties and drawing lists, and choose an appropriate image format.
- 1TextPart 1A character set maps symbols to numeric codes so that writer and reader agree.
- 2Bitmap imagesPart 2A bitmap stores a grid of pixel values, interpreted using header metadata.
- 3Vector graphicsPart 3A vector file stores drawing objects and their properties, then renders them when needed.
- 4Choose and justifyPart 4Select the representation that fits the real requirement: language coverage, visual detail, editability, scaling or storage.
2.Characters need an agreed code
A computer stores bits, not letters, emojis or accented names. To store text, a system needs an agreed mapping between each permitted character and a numeric value. That mapping is a character set. When text is saved, the characters are replaced by code values; when it is displayed, software uses the same convention to turn those values back into symbols.
- Character set
- A defined collection of characters together with the numeric codes assigned to them.
- Character
- A symbol such as A, 7, ?, space, é or 🙂 that a person can distinguish in text.
- Code point
- A number assigned to a character by a standard such as Unicode. A code point is an abstract identifier, not necessarily the exact bytes stored in a file.
- Encoding
- A rule for representing code points as bits or bytes. UTF-8 is a Unicode encoding.
- 1Choose a characterA user enters the symbol A, a Thai character, or another permitted symbol.
- 2Look up its codeThe selected character set identifies the corresponding code point or numeric value.
- 3Encode and storeThe file stores bits according to the selected encoding.
- 4DecodeA reader applies the same encoding and character set to display the intended symbol.
If the writer and reader use different conventions, the bit pattern can be decoded as the wrong character. This is why text systems specify an encoding: agreement is more important than memorising isolated character-code values.
3.ASCII, extended ASCII and Unicode
Early systems needed a compact, shared set of English letters, digits, punctuation and control characters. ASCII met that need, but it was not designed to represent every writing system. Modern software often needs names, currency symbols, mathematical notation and scripts from many languages, so Unicode provides a much larger common repertoire.
Standard | Typical capacity | Strength | Limitation or caution |
|---|---|---|---|
ASCII | 7 bits: 128 possible codes | Simple shared set for basic English text, digits, punctuation and controls. | Too limited for most world scripts and many symbols. |
Extended ASCII | 8 bits: 256 possible codes | Adds capacity for further symbols and accented characters. | Several code pages exist, so the same value can mean different characters in different extensions. |
Unicode | Very large repertoire of code points | Supports characters from many scripts, symbols and emojis in one standard. | The storage per character depends on the chosen Unicode encoding; UTF-8 is variable-length. |
Eight bits allow only 256 different values. That is useful but insufficient for all languages. More importantly, an “extended ASCII” file is not always self-explanatory: one system might interpret a particular byte as one accented character while another system uses it for a different symbol. Unicode reduces this ambiguity by assigning internationally agreed code points.
Unicode does not mean that every character always takes the same number of bytes. UTF-8 uses one byte for the ASCII-compatible part of Unicode and more bytes for many other characters. Therefore, only calculate a fixed text size when the question states the character set or the number of bytes/bits per character.
Within ASCII and Unicode, related characters are grouped into contiguous blocks of consecutive codes. You are not expected to memorise individual character codes, but you should be able to work out the code of one character from the code of another in the same block, using the block's known starting point.
Block | First character | Starting code |
|---|---|---|
Numeric digits | 0 | 48 |
Uppercase letters | A | 65 |
Lowercase letters | a | 97 |
- 1Identify the block and offset
The character G is 6 letters after A in the uppercase block (A, B, C, D, E, F, G).
- 2Add the offset to the block start
Uppercase letters start at 65, so G is coded as 65 + 6 = 71.
- 3Apply the same idea elsewhere
The digit 7 is 7 places after the digit 0 in the numeric-digit block, so its code is 48 + 7 = 55.
Do not confuse a digit's character code with the pure binary representation of its numeric value. The decimal digit 6 has the pure binary value 110, but its ASCII character code is 48 + 6 = 54, which is 0110110 in 7-bit binary; the same digit encoded in UTF-8 is 00110110. A character code represents the symbol '6' for text handling, while the pure binary value represents the number 6 for arithmetic. Reading the same bit pattern the wrong way produces the wrong answer.
4.Storage calculations expose quality trade-offs
A character set maps symbols to numeric code points; an encoding maps those code points to bytes. Unicode is not one fixed number of bytes per character, so storage must use the named encoding, such as UTF-8. A bitmap stores colour values for pixels, giving uncompressed size approximately width × height × bits per pixel; metadata and compression change actual file size. Vectors store shapes mathematically and scale without pixelation, but are not ideal for photographic detail.
5.Calculating text storage
For a fixed-width character representation, each stored character needs the same number of bits. Count every stored character: letters, digits, punctuation, spaces and line breaks if the question tells you they are present. Then multiply by the stated number of bits per character. Convert to bytes only after calculating the total number of bits.
- 1Read the representationIdentify the stated character set or explicit bit-width. Do not assume UTF-8 has a fixed width.
- 2Count what is storedInclude spaces and punctuation where the question requires them.
- 3MultiplyCharacters × bits per character gives the storage in bits.
- 4Convert and labelDivide by 8 for bytes, then use decimal or binary prefixes exactly as stated.
A log file stores 18 000 characters in an 8-bit extended-ASCII representation. Estimate its data storage, excluding file-system metadata.
Bits: bits. Bytes: bytes. Using decimal units, this is kB. The numerical answer is simple here because 8 bits is exactly one byte per character.
Marking point: 18 000 characters is not automatically 18 000 bytes. It becomes that only because this question states an 8-bit representation.
Change | Effect on size | Reason |
|---|---|---|
More stored characters | Increases proportionally | Each extra character requires one further encoded value. |
More bits per fixed-width character | Increases proportionally | Each character’s code uses more storage. |
Variable-width encoding | Depends on the characters used | Different code points can occupy different numbers of bytes. |
6.How a bitmap image is encoded
A bitmap image stores a rectangular grid of pixels. Each pixel has a stored colour value. The pixel data must be read in the correct order and with the correct number of bits per pixel; otherwise the same sequence of bits could produce the wrong colours or wrong image shape.
- Pixel data
- The encoded colour value for each pixel, usually arranged in a defined row-and-column order.
- File header
- Metadata at the start of a file that tells software how to interpret the image data, for example its dimensions, colour depth, format and sometimes compression details.
- 1Read the headerObtain the width, height, colour depth and relevant format information.
- 2Allocate the gridUse width and height to determine how many pixel positions are expected.
- 3Read each pixel valueInterpret the required number of bits for each pixel according to the colour representation.
- 4Display the gridPlace the resulting colours in their intended positions on a screen or export surface.
A bitmap stores colour values at fixed positions; it does not store an object called “a circle” or “a person”. Enlarging a bitmap must spread its existing pixels across more display positions unless extra detail is supplied from elsewhere. That is why enlarged low-resolution photographs can look blocky or pixelated.
7.Resolution, colour depth and image quality
Image resolution is the number of pixels used to represent an image, often expressed as width × height. A 1200 × 800 bitmap contains 960 000 pixels. If the image records genuine source detail, increasing the pixel count can make edges and small features appear smoother. It also creates more pixel values to store.
Colour depth (also called bit depth) is the number of bits assigned to each pixel. With bits per pixel, there are up to distinct bit patterns and therefore up to available colours or shades. Greater colour depth can reduce visible banding in gradients and represent subtler colour variation, but it increases the storage required for every pixel.
Colour depth | Possible values per pixel | Typical consequence |
|---|---|---|
1 bit | Two colours or states; useful for a simple black-and-white mask. | |
8 bits | Can represent a palette or 256 greyscale levels, depending on the format. | |
24 bits | Provides a wide colour range but needs three bytes per pixel before compression. |
- 1Increase width or heightAThe number of pixels rises; a larger uncompressed file results because more pixel positions are stored.
- 2Increase colour depthBEach pixel uses more bits; the available colour range rises and the file grows.
- 3Enlarge a bitmap on screenCThe display may use more screen pixels, but the stored bitmap has no new source pixels, so pixelation can become visible.
- 4Reduce either factorDStorage falls; visible detail or colour fidelity may be lost depending on the image content and viewing size.
More pixels do not improve an image that was originally blurred or poorly focused, and more colour depth cannot restore colours that were not captured. In a justification, relate the setting to the requirement: a large print may need more image resolution, while a flat icon may gain little from photographic colour depth.
8.Estimating bitmap file size
For an uncompressed bitmap, first calculate the number of pixels, then multiply by the colour depth. This gives bits. Divide by eight for bytes. Include a file header, row padding or compression only when the question gives information about them; otherwise state that the result is an estimate for the pixel data.
- 1Find pixelsMultiply width by height. Keep the unit as pixels.
- 2Find bitsMultiply the pixel count by colour depth in bits per pixel.
- 3Find bytesDivide by 8. Label the result clearly.
- 4Convert only if askedUse 1000 or 1024 consistently and state whether the result is kB/MB or KiB/MiB.
Estimate the uncompressed pixel-data size of a 1920 × 1080 bitmap with 24-bit colour depth.
Pixels: pixels. Bits: bits. Bytes: bytes. In decimal units, this is approximately MB.
Assumption: this excludes the header and any compression. A real JPEG or PNG may occupy a different number of bytes because these formats use compression and additional metadata.
Change from 1000 × 1000 at the same depth | Pixel count | Uncompressed pixel storage |
|---|---|---|
Double width only: 2000 × 1000 | Doubles | Doubles |
Double width and height: 2000 × 2000 | Quadruples | Quadruples |
Double colour depth as well | Unchanged by depth alone | Doubles again because each pixel uses twice as many bits |
9.How vector graphics are encoded
A vector graphic does not store a colour value for every position in a pixel grid. It stores a drawing list: an ordered collection of drawing objects and their properties. The software renders those instructions to create the visible image at the required size.
- Drawing object
- A defined shape or item in a vector image, for example a line, rectangle, circle, curve or text label.
- Property
- A value that controls how an object is drawn, such as its position, radius, coordinates, fill colour, stroke thickness, font or rotation.
- Drawing list
- The ordered list of vector objects and their properties. Order matters because a later object can be drawn over an earlier one.
Order | Object | Example properties | Why order matters |
|---|---|---|---|
1 | Rectangle background | x, y, width, height, fill colour | Creates a base behind all later objects. |
2 | Circle icon | centre, radius, fill, outline | Appears on top of the background. |
3 | Text label | content, font, size, position, colour | Can be placed above the icon and remain editable. |
When a vector graphic is enlarged, the renderer recalculates the geometry of its objects for the new size. It can therefore remain sharp at different scales. This is especially useful for logos, maps, icons, technical plans and simple illustrations. A highly detailed photograph would need an enormous and impractical number of objects, so a bitmap is normally more appropriate for that kind of content.
10.Choosing bitmap or vector for a real task
The best format is determined by the task, not by a slogan such as “vectors are smaller” or “bitmaps are better quality”. Identify what the user needs to preserve or do: photographic detail, clean scaling, frequent editing of shapes, a particular output size, or a limited download budget. Then connect that need to the stored representation.
Requirement | Best starting representation | Justification |
|---|---|---|
Detailed wildlife photograph | Bitmap | A grid of pixels can record many small colour and tonal variations. |
Logo for a website, poster and vehicle wrap | Vector | Editable objects can be rendered cleanly at several output sizes. |
Engineering floor plan that needs line edits | Vector | Lines, shapes and labels have separate editable properties. |
Hand-painted textured illustration | Bitmap | Pixel values represent irregular detail that would be cumbersome as a drawing list. |
- 1Name the requirementFor example: subtle photographic detail, clean scaling, editable route lines or multilingual text.
- 2Choose the representationState bitmap, vector or the relevant character encoding.
- 3Explain the stored formLink pixels, drawing objects or code values directly to the requirement.
- 4State one relevant consequenceMention file size, pixelation, editability, language coverage or rendering only where it supports the decision.
Many products use both formats. A company may maintain its logo as vector artwork, export a bitmap version at the exact dimensions required for a web banner, and place that banner beside photographs that are naturally bitmaps. The correct answer can therefore be a mixed solution when the scenario contains different kinds of visual content.
11.Worked example 1: text storage and character sets
A ticketing system stores a 240-character booking reference and message using an 8-bit character representation. Estimate the storage for the text itself. Then explain why a multilingual version of the system should not be restricted to ASCII.
- 1Use the given widthThe representation is 8 bits per character.
- 2Calculate bitsbits.
- 3Calculate bytesbytes for the stated text data.
- 4Justify UnicodeASCII has only 128 code values and cannot represent many scripts and symbols. Unicode provides a much wider agreed repertoire, so it is suitable for multilingual names and messages.
Marking note: the calculation needs units at each stage. The explanation needs both the limitation of ASCII and the practical reason Unicode fits the system. Saying only “Unicode is bigger” is incomplete.
12.Worked example 2: bitmap storage estimate
Estimate the uncompressed pixel-data size of a 640 × 480 bitmap at 8-bit colour depth. State one assumption.
- 1Count pixelspixels.
- 2Find bitsbits.
- 3Find bytesbytes.
- 4State the assumptionThe estimate excludes a file header, compression and any format-specific padding unless the question provides them.
Check: at 8 bits per pixel, each pixel needs exactly one byte, so the final byte total equals the pixel count. This is a useful sense check, not a replacement for showing the method.
13.Worked example 3: choose and justify a representation
A city transport authority needs an editable metro map for printed posters and a website, as well as a detailed photograph for its tourism campaign. Choose a representation for each asset and justify both choices.
- 1Analyse the mapIt consists mainly of routes, station symbols and text labels that need frequent edits and must remain sharp at several sizes.
- 2Choose vectorStore the metro map as a vector drawing list. Lines, symbols and labels are drawing objects with editable properties and can be rendered cleanly at poster or phone size.
- 3Analyse the photographA tourism photograph contains many small, irregular colour and tonal changes.
- 4Choose bitmapStore the photograph as a bitmap because its pixels represent detailed visual variation more naturally than a very large list of geometric objects.
Marking note: two choices alone are not enough. Each justification must connect the required property of the asset to how the representation stores and renders information. Do not claim that vector graphics are always smaller; complexity affects vector-file size too.
14.Extended worked example: reason through the method
Estimate the uncompressed pixel data for a 1920 × 1080 image at 24 bits per pixel.
- 1
Pixel count is 1920 × 1080 = 2,073,600.
- 2
Multiply by 24 bits to obtain 49,766,400 bits.
- 3
Divide by 8 for 6,220,800 bytes, about 6.22 MB in decimal units or 5.93 MiB in binary units.
This excludes headers and assumes no compression. Confusing bits with bytes would make the estimate eight times too large.
15.Case study: a multilingual museum guide
A museum guide must display visitors’ names and exhibit labels in several scripts, show high-detail photographs of artefacts, and use the museum logo on a phone screen, a large information display and printed material. This is one product with three different representation problems, so one file type is not automatically suitable for everything.
Content | Representation choice | Reason | Important check |
|---|---|---|---|
Names and labels | Unicode text with a stated Unicode encoding | Required scripts and symbols may exceed ASCII’s limited character range. | Ensure the selected font also contains glyphs for the intended characters; correct encoding alone cannot force a missing font design to appear. |
Artefact photographs | Bitmap images | Pixels capture irregular texture, shading and colour variation. | Balance image resolution and colour depth against download and storage limits. |
Museum logo | Vector master artwork | Objects can be resized and recoloured without bitmap pixelation. | Export a bitmap copy only when a destination system specifically requires raster pixels. |
- 1Keep authoritative sourcesPreserve original Unicode text, high-quality photographs and vector logo artwork.
- 2Choose output constraintsSet an appropriate bitmap pixel size and colour depth for each screen or download target.
- 3Export required variantsRasterise vector artwork only for outputs that need a bitmap at a stated size.
- 4Test decoding and displayCheck the intended characters display, bitmap headers are read correctly, and files fit the storage or network budget.
16.Constraints, boundary cases and failure modes
Textbook-quality answers do more than describe the normal case. They state the assumption behind a method, identify what fails when the assumption is false, and give the relevant consequence. This matters particularly when questions mix file storage, display quality and format choice.
Situation | What can go wrong | Accurate response |
|---|---|---|
Text size calculated from visible letters only | Spaces, punctuation or line breaks may be missed; variable-width encodings may invalidate a fixed-width assumption. | Use the stated number of stored characters and stated width. State assumptions where necessary. |
Bitmap displayed on a higher-resolution screen | The image may be enlarged, but the original pixel count has not changed. | Distinguish image resolution from screen resolution and explain possible pixelation. |
Bitmap file has no interpretable header | Software may not know the dimensions, bit depth or format rules for the pixel sequence. | Explain that metadata allows the reader to decode the pixel data correctly. |
Complex photograph stored as a vector drawing | The drawing list may need an impractically large number of objects and become hard to edit. | Use a bitmap where independent pixel detail is the meaningful representation. |
Simple logo stored only as a small bitmap | It can become pixelated when enlarged for new output sizes. | Maintain a vector master so it can be rendered cleanly at the required size. |
Have you kept the result in bits until you deliberately divide by 8?
Did you apply the stated unit convention rather than silently switching between decimal and binary prefixes?
Did you exclude or include headers and compression exactly as the question specifies?
Does the scale of the answer make sense if width, height or bit depth was doubled?
17.From a definition to system behaviour
Extended responses often start with a short technical definition and then require its consequence. The strongest answers make the causal chain explicit. For example, “a bitmap is a grid of pixel values” is a definition. To explain file size, continue: “therefore increasing width or height creates more pixel values to store, and increasing colour depth uses more bits for each pixel.”
- 1Define accuratelyUse the term the question is testing: pixel, file header, colour depth, drawing list or Unicode.
- 2State the mechanismDescribe what the system stores or does with the representation.
- 3Explain the consequenceLink it to size, quality, compatibility, scaling or editability.
- 4Return to the scenarioConclude why that consequence matters for the stated user or system.
18.Exam tips and common misconceptions
- 1
Write the formula or method before substituting values.
- 2
Label intermediate values: pixels, bits, then bytes.
- 3
State the unit convention if converting to kB/MB or KiB/MiB.
- 4
State whether headers and compression are excluded when they are not specified.
Misconception | Accurate correction |
|---|---|
“Unicode is just another name for UTF-8.” | Unicode defines code points; UTF-8 is one encoding method for representing Unicode code points as bytes. |
“A 24-bit image has 24 colours.” | 24 bits provide up to possible bit patterns, or 16 777 216 possible colours. |
“Increasing screen resolution fixes a low-resolution photograph.” | The display has more positions, but the bitmap still has the same stored pixels; enlargement can reveal pixelation. |
“A vector file stores the final pixels.” | It stores drawing objects and properties, then software renders pixels for a chosen output size. |
“Vector is always the smaller format.” | File size depends on content: a complex drawing can require many objects, while a simple logo may be compact. |
Command words: describe asks what is stored or what happens; explain asks for the cause or consequence; justify requires a reason tied to the scenario. A correct statement without its consequence is often only partial credit.
19.Synoptic worked example: an online gallery
An online gallery stores a 1600 × 1200 artwork photograph at 16-bit colour depth and publishes the artist’s name in several writing systems. It also needs a mark that can be enlarged for a gallery wall. Calculate the uncompressed pixel-data size of the photograph in bytes, then make two justified representation choices for the text and mark.
- 1Calculate pixelspixels.
- 2Calculate bitsbits.
- 3Calculate bytesbytes, excluding header and compression.
- 4Choose text encodingUse Unicode with an appropriate stated encoding because the artist names may require characters not available in ASCII.
- 5Choose mark representationUse a vector graphic for the mark because its drawing objects can be rendered sharply at the gallery-wall size without enlarging a fixed pixel grid.
Marking rationale: the numerical method earns marks for pixel count, bit count and byte conversion. The text answer earns credit for linking Unicode to the multilingual requirement. The vector answer earns credit for linking scalable drawing objects to the required large output, not merely for naming the format.
20.Summary and self-check
Character sets provide the agreed mapping between symbols and numeric codes. ASCII is limited; extended ASCII increases capacity but can vary by code page; Unicode supports a far wider repertoire.
For fixed-width text, multiply the number of stored characters by bits per character. Do not assume a fixed Unicode storage width unless it is stated.
A bitmap stores a grid of pixels. Its header supplies metadata, while image resolution and colour depth jointly determine the uncompressed pixel-data requirement.
A vector graphic stores drawing objects, their properties and an ordered drawing list. It is well suited to editable artwork that must render cleanly at different sizes.
Justify every representation from the scenario: language coverage, pixel detail, scaling, editability or storage constraint.
- 1
Why does text need a character set rather than merely a sequence of bits?
- 2
Compare ASCII, extended ASCII and Unicode in terms of capacity, compatibility and suitable use.
- 3
Calculate the number of bytes needed for 12 500 characters stored using 16 bits per character.
- 4
Name three items a bitmap file header can provide and explain why the reader needs them.
- 5
How many colours can 12-bit colour depth represent, and why does increasing this depth affect file size?
- 6
Estimate the uncompressed size in bytes of a 1000 × 750, 24-bit bitmap. State the assumption you made.
- 7
Explain the difference between image resolution and screen resolution using an enlarged low-resolution photo.
- 8
For a brand logo, a wildlife photograph and multilingual user names, choose a representation for each and justify every choice.
21.Detailed revision focus — choosing an image representation and calculating its storage
This lesson is about choosing an image representation and calculating its storage. In a strong answer, name the relevant representation or mechanism, apply it to the stated evidence, then give a conclusion that fits the conditions of the question.
Explain character encoding using ASCII, extended ASCII and Unicode.
Use a character set's block structure to work out one character's code from another, and distinguish a character code from the pure binary value of the same digit.
Calculate the storage required for text in a stated character set.
22.Worked Example 3 — choosing an image representation and calculating its storage
A photograph is 800 × 600 pixels at 24-bit colour depth. Estimate its uncompressed bitmap data size, ignoring the header, and choose bitmap or vector format for a company logo.
- 1Find the number of pixels: 800 × 600 = 480000.
- 2Each pixel uses 24 bits, so the image uses 11520000 bits.
- 3Divide by 8 to convert to bytes.
- 4Choose the format according to the nature of the image, not because one format is always smaller.
The bitmap data require 1440000 bytes (about 1.44 MB using decimal units). Use a vector graphic for the logo because its shapes can be scaled cleanly; use bitmap for the photograph because it records pixel-level detail.
23.High-value distinction — image resolution and colour depth
| Term | Meaning | Why the distinction matters |
|---|---|---|
| image resolution | the number of pixels in the image | Use image resolution only for its specific role; it is not interchangeable with colour depth. |
| colour depth | the number of bits used for each pixel; it controls the available colour range | Use colour depth when this is the mechanism, condition or property the question actually describes. |
When comparing these ideas, state one difference in purpose or mechanism before giving an example. A pair of definitions with no comparison does not fully answer a “compare” question.
24.Mark-ready route — choosing an image representation and calculating its storage
- 1Identify the rule or representationStep 1
Find the number of pixels: 800 × 600 = 480000.
- 2Apply it to the evidenceStep 2
Each pixel uses 24 bits, so the image uses 11520000 bits.
- 3Keep the condition visibleStep 3
Divide by 8 to convert to bytes.
- 4Check the conclusionStep 4
Choose the format according to the nature of the image, not because one format is always smaller.
Before finalising, check the command word, any stated width, unit, order or condition, and whether your conclusion answers the exact scenario rather than a similar one.
25.Targeted correction and transfer — choosing an image representation and calculating its storage
Multiplying by 24 and reporting bits as bytes, or claiming that a vector graphic stores every pixel.
New situation: Explain two different changes that would reduce the file size of a bitmap, and state the distinct quality cost of each.
Without notes, explain the difference between image resolution and colour depth, then outline the method from the worked example in four or fewer steps.