Download presentation
Presentation is loading. Please wait.
Published byClaude Underwood Modified over 8 years ago
1
Revision – part one
2
Starter – keywords...
3
Revision list Data Representation Units of data
4
Lets start with the basics… Bits in a byte = Historically: Why do we measure things as a byte? Name of this system? Why did the system have to change? What’s a better system?
5
Lets start with the basics… Bits in a byte = Number of bits in a 10 megabyte = Number megabytes in 2 gigabytes = Number of megabytes in 2 terabytes = (Most importantly – how do you work it out?)
6
Lets start with the basics… How would you measure: a)A full length HD movie b)ASCII characters c)Mp3 music file d)Typical hard disk in a modern laptop (Most importantly – how do you work it out?)
7
Quick one… Going from analogue to digital is…
8
Lets start with the basics…images A picture is made of … The number of these affect the … This is the amount of … in a …. Each of these … has an amount of space allocated to it. This is the … The size of the … affects the amount of … the pixel can hold An image with a 2 bit … can have … colours An image with an 8 bit … can have … colours
9
Lets start with the basics…sound A sound is made of … The number of these affect the … Its measured in … This is the amount of … in a …. Each of these … has an amount of space allocated to it. This is the … The size of the … affects the amount of … the …
10
Work out… Work out file size: ((height x resolution) x (width x resolution)) x colour depth 3 inch by 4 inch image 300 pixels per inch (ppi) 8 bit colour depth
11
So… What affects the size of an image file
12
Add these bad boys… 0001 0100 0001 0001 0101 1111
13
Data types…
14
Error handling Three main types of error when programming errorWhat causes it
15
3 debugging tools 1. 2. 3.
16
For a … error, you might use a …
17
Example 1 nextnumber1number2number3 for next in range(1,10,2): number1 = next number2 = next * next number3 = next / 2 Are you happy with this function?
18
Example 1 nextnumber1number2number3 1110.5 3391.5 55252.5 77493.5 99814.5 for next in range(1,10,2): number1 = next number2 = next * next number3 = next / 2
19
Example 2 A = 3 B = 3 For C = 1 to 4 B = B*C A = A+C Next C CAB
20
Example 2 (Psueudocode) A = 3 B = 3 For C = 1 to 4 B = B*C A = A+C Next C CAB 143 266 3918 41372
21
Example 3 Variable LineABComment 1 2 3 4 5 6 7 8 9 10 Pseudocode A=4 B=7 1Input A 2Input B 3If A=B Then 4 B = 2 5Else 6 While B>A 7 B=B-A 8 End While 9 A = B + 5 10End IF
22
Example 3 Variable LineABComment 14 247 347False: goto 6 4 5 647True: continue 743 843 983 1083 Pseudocode A=4 B=7 1Input A 2Input B 3If A=B Then 4 B = 2 5Else 6 While B>A 7 B=B-A 8 End While 9 A = B + 5 10End IF
23
Bugs can be hard to find...
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.