ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2017 Question 15 (CfE)

13 marks · The fetch-execute cycle

The processor runs the machine code version of an application by fetching and executing instructions from memory. Describe the steps of the fetch-execute cycle. The SnapLizard includes cache for instructions and data. Explain how cache improves performance. The SnapLizard has many registers including X and Y registers. Here are three low level language instructions that are fetched and executed in sequence: 1 LOAD X, 2000 Loads the contents of memory location with address 2000 into the X register. 2 LOAD Y, 2000 Loads the contents of memory location with address 2000 into the Y register. 3 ADD X, Y Add the contents of the Y register to the X register. Explain the impact of cache on the execution of instructions 2 and 3. The mobile phone should be capable of capturing high quality video. One characteristic that would be considered would be bit depth. Describe the difference between a bit depth of 16 bits and that of 24 bits for the quality of video. Describe how video is compressed using interframe and intraframe compression. The effectiveness of video compression can depend on the content that is being captured. For example, videoing someone sitting singing a song on stage will compress differently when compared to videoing a high energy dance performance with a group of dancers. Explain the effectiveness of interframe compression for these different performances. A manufacturer of mobile phones is considering the SnapLizard processor. A description of the SnapLizard is given below. The SnapLizard processor has a clock speed of 2·4 GHz. It is quad core, resulting in extremely efficient multi-tasking when compared to dual core processors. The data bus and the address bus are both 32 bits. The SnapLizard includes a separate instruction and data cache.

Marking scheme

• Address of instruction placed on address bus • Read line (on control bus) is activated • Contents of location (instruction) transferred to a register along data bus • Instruction decoded/executed 3 marks for all four steps in the correct order 2 marks for three steps in the correct order OR four steps in incorrect order 1 mark for two steps in the correct order OR three steps in incorrect order 0 marks for any other response • Stores frequently accessed instructions/data • Faster access times than main memory • Fewer accesses to slower main memory • On the same chip as the processor • Cache is static RAM (faster) 1 mark for any bullet point – maximum 2 marks Do not accept closer to the processor • Instructions 2/3 will already be (pre-loaded) in cache ie a cache hit will occur • Data in location 2000 will already be in cache improving access time/instruction time. Accept reference to Instruction 3 accessing registers not cache or main memory 16777216 colours (1 mark) is better than 65536 (1 mark) Values can be expressed as powers 2²⁴, 2¹⁶ 1 mark if only states “more colours” • Interframe saves the differences between frames • Intraframe compresses a single frame (using RLE or ‘blocking’ shades of colours) Award 1 mark for good description which does not reference inter- or intra- frame • More effective compression for a singer performer (1 mark) • (Differential/delta/i/p) Interframes will be smaller for a performance with fewer movements • (Differential/delta/i/p) Interframes will be larger for performance with more movement • More key/delta frames will be needed as dancers will be moving around 1 mark for more effective for singer 1 mark for valid reason that clearly explains the compression and does not just compare levels of movement

Previous question: Higher Computing Science 2017 Question 14 (CfE)

Next question: Higher Computing Science 2018 Question 1 (CfE)