Mock Examination

Here are the answers to the mock examination that you took in the summer.

For many students the objective here is to understand how to answer questions, to see where silly mistakes were made that cost easy marks and to appreciate how the examiner can ask questions relatingto the theory that you already know.

To make it really clear the extra questions are in blue.

Question 1

This is a trace table question. There is almost certainly going to be one in your examination, maybe even more than one.

Work your way through the algorithm.

The subroutine that the examiner has given you is called TotalOut(a,b)

The values you are given are TotalOut(3.4)so a has the value 3 and b has the value 4. It is simply matching them in order. So we now know the staring values of a and b.

a b c
3 4  
     
     
     

 

The next line of the algorithm is c <- a + b so c has the value 3 + 4

a b c
3 4 7
     
     
     

 

The next line says WHILE a < c which is true as a is 3 and c is 7 so a is less than c.

a now gets 1 added a <- a + 1 so a now has the value 4

a b c
3 4 7
4    
     
     

 

b <- b - a means that b now has the value of b - a, so 4 - 4 = 0 so b is now 0.

a b c
3 4 7
4 0  
     
     

 

c still has the value 7.

a b c
3 4 7
4 0 7
     
     

 

Then its back to the beginning of the loop where it says WHILE a < c which is true as a is 4 and c is 7 so a is less than c.

a now gets 1 added a <- a + 1 so a now has the value 5

a b c
3 4 7
4 0 7
5    
     

 

b <- b - a means that b now has the value of b - a, so 0 - 5 = -5 so b is now -5.

a b c
3 4 7
4 0 7
5 -5  
     

 

c still has the value 7.

a b c
3 4 7
4 0 7
5 -5 7
     

 

Then its back to the beginning of the loop where it says WHILE a < c which is true as a is 5 and c is 7 so a is less than c.

a now gets 1 added a <- a + 1 so a now has the value 6

a b c
3 4 7
4 0 7
5 -5 7
6    
     

 

b <- b - a means that b now has the value of b - a, so -5 - 6 = -11 so b is now -11.

a b c
3 4 7
4 0 7
5 -5 7
6 -11  
     

 

c still has the value 7.

a b c
3 4 7
4 0 7
5 -5 7
6 -11 7
     

 

Then its back to the beginning of the loop where it says WHILE a < c which is true as a is 6 and c is 7 so a is less than c.

a now gets 1 added a <- a + 1 so a now has the value 7

a b c
3 4 7
4 0 7
5 -5 7
6 -11 7
7    
     

 

b <- b - a means that b now has the value of b - a, so -11 - 7 = -18 so b is now -18.

a b c
3 4 7
4 0 7
5 -5 7
6 -11 7
7 -18  
     

 

c still has the value 7.

a b c
3 4 7
4 0 7
5 -5 7
6 -11 7
7 -18 7
     

 

The value of c is constant does not change whereas a and b both change as the loop progresses. This is a logical error.

To demonstrate, in the table below you can see that c remains constant and yet a + b changes through each iteration.

a b c a + b
3 4 7 7
4 0 7 4
5 -5 7 0
6 -11 7 -5
7 -18 7 -11
       

 

If the programer ha used a < a + b rather than a < c then the subprocedure would have terminated when b was 0 and not when b was -18.

The subroutine returns the value of b when the value of a is no longer less than the value of c.

So if x is any positive integer then the trace table will look like this.

a b c
x 0 x + 0
     

 

At this point a < c is not true as they both have the value x so the subroutine stops and outputs the value of b which is 0.

Here is an example of how a trace table could work...

1. Complete the trace tables for the following algorithms...

Question 1 x y z
     
     
     
     
     
     

 

Question 2 x y z
     
     
     
     
     
     

 

Question 3 x y z
     
     
     
     
     
     

 

Question 4 x y z
     
     
     
     
     
     

Question 2

Correct answer A and C. Please note that if you fill in more than two lozenges then you will score 0.

There are four possible answers:

  • Assembly language is easier for humans to read and understand.
  • A human programmer is less likely to make mistakes in assembly language as it is eaasier to read.
  • It is easier for a person to remember the assembly instructions than the binary codes.
  • Assembly language instructions can be given labels to help readability for programmers.

Note that answers such as "it is easier" will always fail to score marks.

Question 3

The code for the colour of the back pixels is 1 however that was not the question. How many black pixels had been counted at the start of the algorithm? num_of_black <- 0

x is a counting variable that is counting the number of rows that have been checked so far. So the number of rows must be less than or equal to the number of possible rows.

In this part of the algorithm the code is checking to see if the pixel is black (1) or white(0) so L3 must be 1.

Finally the number of the row being counted must go up by 1 so y <- y + 1.

Think of a grid like this ...

... and use the algorithm to count the black pixels.

Better still, here is the algorithm as a python program...

... and here is the output.

2. Copy and execute this code and then explain it in your exercise book.

Question 4

The answer is 600,000 bits; the units are important as the question asks for the "file size in bits".

The sound recording is 2 minutes long, that is 120 seconds. The sample rate is 1000 Hz that is 1000 samples per second. The sample uses a resolution of 5 bits per sample so that is 120 x 1000 x 5 = 600,000 bits.

3. In your exercise book calculate the file size in bits for a two and half minute sound recording that has used a sample rate of 800 Hertz (Hz) and a sample resolution of 6 bits. You should show your working.

Question 5

A B A or B
0 0 0
0 1 1
1 0 1
1 1 1

 

The first logic gate that results in X is an AND gate and the result is only 1 if both inputs are 1.

The second gate that results in Y is also and AND gate.

The last gate that results in X is a NOT gate. The results for Z are the opposite to the results for Y.

A B X Y Z
0 0 0 0 1
0 1 0 0 1
1 0 0 0 1
1 1 1 1 0

 

For F and B the result is true if either of F or B is true so this is an OR gate.

S and the result of F OR B must both be true for the result to be true so this is an AND gate.

When drawing a logic circuit you must take care with the shapes that you draw as the shapes themselves are meaningful.

4. Copy and complete this truth table into your exercise book.

F B F OR B S (F OR B) AND S
0 0   0  
0 1   0  
1 0   0  
1 1   0  
0 0   1  
0 1   1  
1 0   1  
1 1   1  

 

Question 6

There are three possible answers:

  • Hexadecimal numbers are easier for humans to read and understand.
  • A human programmer is less likely to make mistakes with hexadecimal numbers as it is eaasier to read.
  • Hexadecimal numbers take up less space than binary numbers so more complex expressions can be written.

Note that answers such as "it is easier" will always fail to score marks.

Question 7

128 64 32 16 8 4 2 1  
1 0 0 1 0 1 1 1  
128 0 0 16 0 4 2 1 151

 

5. In your exercise books, work out the following binary to decimal conversions:

  • 11001100
  • 10100101
  • 10010110
  • 10110101

Remember to show your working out.

There are two ways you can approach this, convert directly to hexadecimal or convert to binary and then to hexadecimal.

Firstly straight to hexadecimal, if the number is less than 256 then divide the number by 16;

125 / 16 is 7 remainder 13. 13 in decimal is the hexadecimal character D so the answer is 7D.

Secondly via binary ...

128 64 32 16 8 4 2 1  
0 1 1 1 1 1 0 1  
0 64 32 16 8 4 0 1 125

 

... converting 01111101 to hexadecimal is easy-ish. Group the binary characters in groups of four (from the right)

0111 and 1101 are 7 and 13 which as we know becomes 7D

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 1 2 3 4 5 6 7 8 9 A B C D E F

 

6. In your exercise books, work out the following decimal to hexadecimal conversions:

  • 140
  • 251
  • 99
  • 15

Remember to show your working out.

Question 8

2 to the power 7 is 128 different characters.

1, 2, 4, 8, 16, 32, 64 adds up to 127 but don't forget the 0 that makes 128 different characters.

7. In your exercise book write down what ASCII stands for and how many bits are required for "extended ASCII".

Question 9

8. Copy the three bit patterns into your book and using the same form of encoding write down the patterns in a binary code.

Question 10

Volatile memory is computer storage that only maintains its data while the device is powered. Most RAM (random access memory) used for primary storage in personal computers is volatile memory.

In contrast to volatle memory, the contents of non-volatile memory are not lost when the power is turned off so it is ideal to store the BIOS that is required for the computer to boot up.

There are four key factors about CPU architecture that affect its performance:

  • cores
  • clock speed
  • cache size
  • processor type

Cache is a small amount of memory which is a part of the CPU - closer to the CPU than RAM. It is used to temporarily hold instructions and data that the CPU is likely to reuse.

The CPU control unit automatically checks cache for instructions before requesting data from RAM. This saves fetching the instructions and data repeatedly from RAM – a relatively slow process which might otherwise keep the CPU waiting. Transfers to and from cache take less time than transfers to and from RAM.

The more cache there is, the more data can be stored closer to the CPU.

Cache is graded as Level 1 (L1), Level 2 (L2) and Level 3 (L3):

  • L1 is usually part of the CPU chip itself and is both the smallest and the fastest to access. Its size is often restricted to between 8 KB and 64 KB.
  • L2 and L3 caches are bigger than L1. They are extra caches built between the CPU and the RAM. Sometimes L2 is built into the CPU with L1. L2 and L3 caches take slightly longer to access than L1. The more L2 and L3 memory available, the faster a computer can run.

Not a lot of physical space is allocated for cache. There is more space for RAM, which is usually larger and less expensive.

Each CPU core has its own L1 cache, but may share L2 and L3 caches.

 

9. In your exercise book explain how the other three key factors can affect CPU performance.

10. Describe the boot process from POST to being able to log in to a computer..

Question 11

Attribute SSD (Solid State Drive) HDD (Hard Disk Drive)
Power Draw / Battery Life Less power draw, averages 2 – 3 watts, resulting in 30+ minute battery boost More power draw, averages 6 – 7 watts and therefore uses more battery
Cost Expensive, roughly $0.20 per gigabyte (based on buying a 1TB drive) Only around $0.03 per gigabyte, very cheap (buying a 4TB model)
Capacity Typically not larger than 1TB for notebook size drives; 4TB max for desktops Typically around 500GB and 2TB maximum for notebook size drives; 10TB max for desktops
Operating System Boot Time Around 10-13 seconds average bootup time Around 30-40 seconds average bootup time
Noise There are no moving parts and as such no sound Audible clicks and spinning can be heard
Vibration No vibration as there are no moving parts The spinning of the platters can sometimes result in vibration
Heat Produced Lower power draw and no moving parts so little heat is produced HDD doesn’t produce much heat, but it will have a measurable amount more heat than an SSD due to moving parts and higher power draw
Failure Rate Mean time between failure rate of 2.0 million hours Mean time between failure rate of 1.5 million hours
File Copy / Write Speed Generally above 200 MB/s and up to 550 MB/s for cutting edge drives The range can be anywhere from 50 – 120MB / s
Encryption Full Disk Encryption (FDE)Supported on some models Full Disk Encryption (FDE) Supported on some models
File Opening Speed Up to 30% faster than HDD Slower than SSD
Magnetism Affected? An SSD is safe from any effects of magnetism Magnets can erase data

 

Don't forget that the examiner said to ignore cost and storage capacity.

Question 12

A solid state drive will have smaller physical size, be faster to transfer data, uses less power, is quieter, produces less vibration and heat, is less prone to failure, can open files faster and is safe from the effects of magnetism.

A hard drive can have a much larger capacity than a solid state drive

Don't forget that the examiner said to ignore cost.

Question 13

The clock speed - also known as clock rate - indicates how fast the CPU can run. This is measured in megahertz (MHz) or gigahertz(gHz) and corresponds with how many instruction cycles the CPU can deal with in a second. A 2 gHz CPU performs two billion cycles a second. A faster CPU uses more energy and creates more heat.

A computer will normally have a maximum clock speed set by default, but it is possible to change this speed in the computer BIOS. Some people increase a CPU clock speed to try to make their computer run faster - this is called overclocking.

There are limits to how fast a CPU can run and its circuitry cannot always keep up with an overclocked speed. If the clock tells the CPU toexecute instructions too quickly, the processing will not be completed before the next instruction is carried out. If the CPU cannot keep up with the pace of the clock, the data is corrupted. CPUs can also overheat if they are forced to work faster than they were designed to work.

The other answer could be the number of cores or the processor type. See the answer to quesiton 10.

Question 14

In a phishing attack, a criminal sends a large number of consumers a deceptive email appearing to come from a respected brand — typically a financial service provider or an email service provider.

The email uses social engineering techniques to attempt to mislead the recipients to visit a web page appearing to belong to the impersonated brand, where the user will be asked to enter her username and password — and sometimes other information as well. Having stolen this information, the criminal now controls the victim’s account.

Unlike consumer phishing email campaigns (high volume, broad in scope), spear phishing attacks are highly targeted. These attacks use carefully crafted emails combined with social engineering tactics to convince the victim to open and engage with the email.

Spear phishers will often leverage data from breaches and social network sites, as well as public data about an organization and its employees. Their emails appear to come from a trusted sender, and ask the recipient to perform an action, which typically is to open a webpage and enter a password.

Once this action is taken, the cybercriminal is able to steal confidential information from the victim and the enterprise. According to a recent Gartner report, spear phishing is the most common targeted method of cyberattack. 

11. In your exercise book explain a Distributed Denial Of Sevice (DDOS) attack. Make sure that you include at least two examples.

Question 15

In Ghana, the global problem of e-waste has local consequences

Loads of mobile phones end up in Ghana, where they may or may not be recycled properly. 

Consumers have a nasty habit of throwing out their electronics as soon as newer, shinier models become available, and they rarely ever do so properly. Nearly 42 million tons of e-waste — everything from microwaves and electric shavers to washing machines, laptops, cellphones, TVs and computer monitors — entered the global garbage stream in 2014, according to a United Nations University report.

Like all trash, this stuff doesn’t just disappear. Instead, it stacks up in landfills. Unlike most trash, however, e-waste is often packed with valuable components — as well as toxic chemicals and materials that can cause real damage wherever they end up.

Ghana offers us a glimpse at some of the economic and environmental consequences of e-waste. In the West African nation’s capital of Accra, particularly the slum known as Agbogbloshie, large landfills are strewn with decades’ worth of discarded electronics. It’s one of the most concentrated e-waste sites in the world.

Enterprising locals have created a booming second-hand market around the (questionably legal) influx of old printers, TVs, computers and whatnot. Upon landing on Ghana’s shores, these devices enter into a vibrant network of repairmen, resellers and middlemen who pass them on to locals, who otherwise wouldn’t have been able to afford such products.

Much of the world’s e-waste ends up in Accra, Ghana.

Whatever is not salvageable for resale becomes part of an urban mining process, picked apart by hand for the valuable materials that can be recovered from the devices’ carcasses. That same United Nations University report says 2014’s e-waste contained about 16,500 kilotons of iron, 1,900 kilotons of copper and 300 tons of gold, along with silver, palladium and other precious metals worth an estimated $52 billion.

Unfortunately, not all of that waste gets properly processed or recycled, and many harmful substances get unleashed — lead, mercury, cadmium, chromium and chlorofluorocarbons, to name a few. Those who work to extract the valuable constituents, many of them children, get exposed to the harmful materials. Those not directly handling the hazardous e-waste still get exposed to it, most obviously by the common practice of burning things like wires and circuitboards to extract copper.

Without proper protection and processing methods, the marginal economic benefit of reselling precious metals or refurbished electronics comes with a major risk of contamination. There is serious concern about the lead levels that might be accumulating in residents’ blood, along with traces of iron and antimony from contaminated fish. High levels of PCBs have been detected in the breast milk of area women, while dangerous levels of aluminum, copper, iron, lead and zinchave been measured in the air and soil.

Agbogbloshie illustrates the importance of properly disposing of old electronics, whether to keep them working or to process their most hazardous components. Keeping gadgets working and in circulation, rather than tossing them, stops their toxic elements from seeping into the environment — and also creates opportunities for people to make use of them who might not have access to them otherwise.

12. In your exercise book, write an essay (about a page) about Green IT. Find out about 3 key issues. Begin with a general introductory paragraph, one paragraph for each of the three key ideas and a concluding paragraph. Take care to make your first and last sentences really good.

Set work

Useful links (AQA Guides)

Questions

These are questions that relate to the AQA guides above.

Revision

These are some revision topics and example questions that will aid revision for the year 10 examination on 23rd June 2017. Just because it is in this list does not mean that its in the exam and if it is not in the list it does not mean that the topic is not inthe exam.

Mock examination

Here are the answers to the mock examination that you took in the summer.

For many students the objective here is to understand how to answer questions, to see where silly mistakes were made that cost easy marks and to appreciate how the examiner can aske questions relating to the theory that you already know.

Coursework

Here is the information regarding your coursework as well as some worked examples to show you how coursework should be written up.

The coursework will be done twice, once with the example task for practice and then the real NEA task. You will only have 20 hours in which to complete the real task; there cannot be any extra time given.