[Music] [Music] [Music] [Music] [Music] [Laughter] [Music] so so [Music] so [Music] [Music] so [Music] so so [Music] tip [Music] [Music] so [Music] [Applause] so [Music] [Music] [Applause] [Music] [Music] [Music] [Applause] [Music] [Music] [Music] [Music] [Music] [Applause] so [Music] [Music] hello everyone and welcome to tonight's live stream where we're hopefully going to save you from absolutely crashing your computer science gcse ah money joking hopefully the revision you've done we'll smash it anyway but let's see where we go now not a great amount of time for us tonight to just have a chat so i'm going to go straight into it but i do want to start with telling you a little bit about what we know so far about the exam you've sat some you know there's a wild mixed bag of what's happening in computer science we've had exactly one exam so far the a.s exam and whilst they said the same things that they've said to you no surprises they have reworded about a third of the questions on the paper that does mean that it might seem a little tough but you just need to take your time really read those questions and see what they're asking about i mean the positive thing we've got is we've got a list of exact topics that we need to look at and i'll just jump over and we'll have a look at that put myself up here so on the screen is just a simple print screen of what the wjcf said will be in your exam tomorrow we've had this since january you've seen it before and certainly it is something that you you are aware of certainly my class i've popped this on the google classroom for you as accommodations 2022 and it's been there for a while although they say that you should teach it all and of course we have gone through everything this is apparently what they will assess on their exam now a few people are saying stuff like basically everything it's not honestly this is a massive uh reduction in the amount of content there's not quite as much there and a lot of it is the classics we'll go through all of this tonight within the hour just as a quick refresher but do go and practice your stuff each of these sections is smaller than it would be if we were teaching it all and of course some of them there's barely anything to teach in them anyway so let's go through let's have a look i suppose before we start i just need to be 100 clear with you they could ask questions that are not in this list they could ask questions from anything hopefully they won't but if they do it's worth having a quick read through everything a quick flick through so you're at least aware of it but this is the stuff that they say you should concentrate on so let's get started with our first section hardware i'm going to work through all of these tonight in that order that we've just seen them finishing up on environmental issues okay so what you see in front of you is the cpu the main part of the computer the bit that does all the processing the cpu is the big purple square and we've got three different parts to it that you need to know about the shapes might be important so it's well worth remembering the shapes the upside down trousers are the alu the arithmetic and logic unit this bit does all of the maths and all the logic comparisons so whenever we've done an if statement that is the component that has worked out we've also got the control unit in the circle there that is the bit that controls the speed of the computer and particularly the clock speed so this is the bit that's going next instruction next instruction next instruction it's keeping the speed of the computer going by maintaining the clock speed now if we want to overclock our processor that's what we need to change to increase the rate at which it tells the computer to do the next instruction our registers as well are small bits of memory they are the smallest bit of memory in the computer they are the size of a word space and a word space is the amount of bits that your computer runs at so 32 or 64. and there's lots of them there's some speciality ones like the alu the um cir stuff like that that you would have looked at but as long as as you remember the registers are the memory you'll be in a good place now aside from that i'll just bring this one up we can have the slides i'll pop the slides in google classroom after this i'm going straight into an a level live stream after yours so it might be a little bit later but i'll get them to as soon as i can so aside from just the parts we've also got the buses now the buses are just you can imagine them as little cables they're they're not actually cables they're what we call traces which are directly on the silicon but they are cables in essence that can carry the data around the computer you've got your data bus which carries the data and you've got the address bus which carries the address and you've got the control bus which carries the control signal all those send that information around the computer so aside from that all of these instructions i'm talking about are part of von neumann architecture you know john von neumann is my favorite mathematician but he invented this style of architecture where the instructions which are these things on the left here and the data this stuff on the right looks the same they're in the same format they're going to be going through and seeing all that the address on the right hand side is literally the location in memory and as far as we're concerned it is one of these lines here in machine code von neumann architecture is based around the three parts the fetch decode and execute cycle fetch means we get the next instruction from memory so we pick up the next one of these decode means we pull in that entire line and we work out what we should be doing and execute means we're actually going to do it now this machine code is made of two parts the instruction or the technical term is the op code is the left hand side and the operand or the memory location is the right hand side so the first one could be anything really it could be like add add this memory location into the accumulator and pick up on ben's hilarious joke here because yes ben he is as you well know he is a singer and he's one of my favorites as well different newman though gary newman not john von anyway hardware volume architecture that's what's running on the processor these individual instructions are what are stored in the registers these are what have been processed by the alu when we do the execute part of the code and the control signal is the bit that goes next next next on the fetch decode and execute cycle clock speed then is controlled by the control unit and it's the number of those fetch decodes and executes that can be done per second that's measured in hertz or instructions per second we are in the gigahertz region most cpus are around about three gigahertz that you buy on a desktop nowadays roundabout that means three billion fetch decode execute cycles per second the faster the clock speed the more of those cycles it will do and the faster the computer will run but it will use more heat and use more battery power so it's important that you keep that in mind if they ask you to compare those things storage is also important because a cpu can have cache memory the registers the fastest part of memory on the computer is only really very small we're talking maybe in the region of megabytes or kilobytes here so not a lot of space really the cache is a place where we can copy the most frequently used instructions and keep them close to the register if we've got a big cache we'll be able to store more of those more recently used instructions and pull them into the register a bit faster if we have a small cache there will be fewer of those more often used instructions available to the register and it won't be able to find them as often that's called a cache miss and if there's a cache miss we have to go out to the next level of memory to get the instructions a cpu can also have multiple cores if a cpu's got one core like on the left it can do one thing at a time literally one of those fetch decode execute cycles one at a time if we've got four cores we can do four at the same time and therefore if we can break the job down into four parts and we can do all four parts at the same time and all four parts are about the same size we can theoretically do it in a quarter of the time now this isn't always true because not every job is parallelizable which is the key word you need to keep in your mind when you see that back to our cpu then well our cpu is connected to our ram ram is our random access memory it is volatile when the power goes off the data goes off it but there's plenty of it there's a couple of gigs of this so we can store all the instructions that the computer currently needs everything the computer is currently doing at the moment is stored in that ram quick question what jobs aren't parallelizable parallel thingable paralyzable non-paralyzable jobs are jobs where you rely on what you've just worked out to work out the next thing this is things like working out prime numbers uh even doing um calculations that require the previous value to work out the next one anything like that it's not parallelizable because we have to wait for the previous thing to be done before we can do this so they're the sort of things we're talking about luckily for us though things that are paralyzable are things like graphics uh audio video all the things we actually like using our computers and our phones for are parallelizable so all the things your computer is currently doing is stored on the ram and everything else long-term storage is stored on the hard drive now keep in mind this your ram is your primary storage that is where everything that your computer is currently doing needs to be primary if we need to get anything else like we need to load photoshop we need to take it from the secondary storage which is the hard drive or the ssd that is non-volatile and if we save stuff to that it will be saved forever but the difference is is the speed this is really slow compared to the ram and the ram is really slow compared to the registers our cache then exists between those two so the cache is keeping copies of the most recently used instructions that would normally be in the ram so that our registers can get them faster and aside from that on the left hand side we've got the input devices and the output devices that is what a computer system is made of input output processing and storage input devices things like mice keyboards cameras heat sensors stuff like that send information into the processor if the processor's sending information out like a video signal for a screen or audio we'd have it in the output all of those things you need to talk about when we're talking about hardware my last ish slide on hardware is about how memory changes as we get further away from the cpu so the best form of memory is this register regis the fastest memory the computer can access but it's very very expensive it's volatile meaning if the power goes off it disappears and it is very very small because it's expensive so we can't put much of it on there to make up for that we have the cash which is a little slower but it's cheaper so we can have more of it going out from there it's the ram which is much cheaper so we can have lots of it but it is volatile which means the power goes off it loses its data going all the way out to the right-hand side where we've got our hard drive or our ssd which is non-volatile which means that we will be able to save data on it and keep it there permanently it is very very cheap compared to ram compared to any of the rest of it it's bigger in capacity and that's a key word there it's bigger not that it's bigger it's bigger than capacity but it is slow slow slow slow memory you wouldn't want to be loading things from your hard drive the last thing is the sizes they could ask you to put these things in order or give you a selection of them we start with bits which is a one or zero four of those is a nibble eight bits is a bite and that's where nibble comes from because the nibble is a small bite you see comedy gold in computer science we are anyway after that point they're going up in thousands now they're really going up in thousand and twenty fours because binary but as far as you're concerned at gcse you can assume they're going up in thousands so a thousand bytes in a kilobyte a million bytes in a megabyte or a thousand uh a billion in a gigabyte a trillion in a terabyte and so on now petabyte petabyte is roughly where we're sitting with servers at the minute petabytes of data are absolutely huge you probably have terabyte hard drives at home or you you may have bought your new fancy ps5 uh in a terabyte model to make sure you've got plenty of storage uh petabyte is a thousand of those uh exabyte is a thousand of those zettabytes a thousand of those and yottabyte is a thousand of those they think that all of human history all of human conversation everything can be stored in a yottabyte and there's hardware now it's a very quick summary of hardware but that's hard way the next one though is when you need to go off and practice this is your logical operations and just to remind you the gates you need to know about not gates which is where we have the symbol with a line over it if we put a value in and the values that can go in are one and zero we get the opposite out so if a zero goes in and one comes out one goes in zero comes out worth remembering that not gate an and gate has two inputs a and b it only gives us a one out the other side if they are both on as we go into it so if a and b are on they're ones we'll get a one out otherwise it's zero now this is the one where it starts to get a bit weird because that is a dot an and is a dot and it's weird because the or you'll remember is a plus which is quite difficult to pass in your head because you normally say and for that in your head and it gets confusing so the plus is or an or gate either of those should be on and that includes both of them so basically if either a or b is turned on or both of them are turned on we're going to get a one out the other side which is brilliant but the really cool one the xor gate the x standing for exclusive and again the reason we use xor gate and not e or gate is because an eor gate is what keeps donkeys in the field right we're cooler than that we've got the xor gate the xor gate is an or gate but it only turns on if only one of them is on so have a look at the truth table down there when they're both off it's off when they're both on it's off but if only one of them is on you can a quick question do we need to know the sign for the xor gate yes you do although it's most likely they will write it in full if they use it like it is on the top there but it's just the or symbol with a little circle around it so i'm sure you'll be fine with that okay here's an example question of a truth table and i've nicked this from uh a level so if you can do this you can do anything and it's reasonably straightforward and i'll run through it really quickly you'd get a question like this and the idea yours would be smaller but i just want to show you this to show you how straightforward it is diagrams you don't need to know the diagrams i don't think for any of those gates it's always the logic symbols as far as i've seen i say that now knowing arluck will get the symbols in the exam but they are all very straightforward they're all in this presentation we'll talk about simplification in a minute but i just want to go through this truth table so the first one is this a or c we're looking at column a and we're looking at column c and if either of them have a one in it we'll put a one in here so no no yes yes yes yes yes yes okay so we've done a column the next one is b and c so we're talking about this one and this one both of them need to be a one to get a one out of it because it's an end so no no no no no yes no yes now this is where it starts to look a bit crazy but actually a or c is this column b and c is this column and we're just xoring it so we're xoring these two columns here xor if they're different we get a one if they're the same we get a zero so same same different different different same different same finally this one that entire expression there is this column not letters have the opposite so it's literally giving the opposite to this column one one zero zero zero one zero one okay there we go so that is truth table that is reasonably easy to do yours will be significantly significantly shorter than that and probably worth about four marks make sure you know what you're doing i'm getting onto graphics and stuff in a minute this question i'm going to jump to my top down camera for that one because i move myself over here this is about simplifying building expressions and you need to know the laws for this i'll pop up the cheat sheet in a minute which you can print screen if you want but it is reasonably straightforward if you get something like this what you need to do is start applying the laws now i can't see anything obvious that would simplify down here so i'm going to multiply up the brackets treat it like expanding the brackets in maths so to expand this side i'm doing q and q or q and p or p and q or p and p now there are some laws that i can see there straight away but what you've got remember is that the and the dot is glue essentially that means that each of those are their own little separate entity so you have to treat them separately so first of all if we've got repetition with an and we can just put the single symbol so that's true for the p as well now q and p or p and q within that little box we can swap the symbols around so actually what we've got is q or p or q or p we can swap those symbols around again in these chunks now we've got repetition the repetition means that we can remove a copy of them so we're back to q or q and p or p and we're mostly there this would be a four marker that is more or less there but there is one more step what i'm going to do is try and take q out of this side so i'm going to factorize out q again this is just maths this is really just that same sort of maths you've done before we're going to pull out the q or the q and from this part so q out of q gives us 1 just like you get in math so you take the term out it gives you a one q out of q and p gives us p and of course this bit has to come down at the end now this is gold the moment we've got something in a bracket that's a number a one or a zero that means something nice is going to happen to this now this is an or an or where one side of it is always one which means that that entire bracket is just one now an and with a one it's just the term so that entire thing boils down to q or p now i'm gonna pop on the screen for you just view the print screen and please do take the time to do this a cheat sheet print screen that and make sure you've got that for your notes today that is the sort of thing you should be running through your head before you go into the exam in particular these here the and the or rules are the things that simplify down the expressions so they're the things you should be running through in your head if you think about what that means as a circuit you should be able to work it out yourself for instance a and one means that it's an and gate one of the sides is always on so that means that that side doesn't matter so it's just a and if you can remember these eight rules there and again you need to remember them forever remember them long enough to scribble them down on the outside of the exam paper when the time starts that's fine scribble them down get them in there and you're good to go the rest of the laws around the side to be honest are just applying it they're the they're the factorization law rules really so you can pretty much ignore them for most of it it's those ones in the middle the ands and the oars that are worth remembering because they do allow you to simplify down things okay we've done two of it two parts of it in most of the time so i'm gonna try and speed up a little bit because networks protocols you need to know about all of that on there tcp the transmission control protocol and the internet protocol that's the bit that lets you connect to a different computer http the hypertext transfer protocol transfers web pages and their resources images video sounds across the internet https is the same thing and it is secure which means that we get encryption as part of that ftp file transfer protocol is the transferring of files the difference between http and ftp by the way is that ftp just fires the data at you and doesn't check to see if it got there in any good piece whereas ftp sends the information across and double checks that you've got every single thing pop the post office protocol is what we use to receive email but that's an old-fashioned one if you take the email off the server you can't see it anywhere else so if you picked it up on your phone you wouldn't be able to get that email then from a computer imap the internet mail sorry forgotten what that one is but access protocol um i think it's internet mail access protocol you might want to double check that but what it does is it's the more modern version of pop it keeps all your email on the server and when you go and look at the things there you can see the same view from everything from your phone from your computer from your tablet because everything is still there in the same place smtp the simple mail transfer protocol is the bit that sends the email that's all it does it sends the email to a server not to the person to the server that's the bit after the app and the server deals with it from there okay networks key to networks is that they let you share data they let you share peripherals things like printers and connections to other networks in other words they let you share your internet connection which is exactly the point of them that's why they're so good there are two key types of network you need to know about a local area network which has a small geographic area in other words it's usually over a building or a couple of buildings or a wide area network which is over a big area like countries or the entire earth because the internet is the exact exact version of a wide area network that we want to talk about okay types of network ring network this is how you label a diagram for it okay bunch of circles they're the computers or the nodes you label them one of them workstations you'd label one of them with server you need to make sure you've got the arrows going in the same direction this is because in a ring network the data only flows in one way what happens if we take one of those nodes off well if we unplug one of these computers everything goes off because the data is trying to flow around in a circle but the data can't collide with the data exactly one cable breaks the entire thing goes down in a ring network it is only really good if you've got a couple of computers it is very very cheap very very easy to set up you probably wouldn't want to build this properly bus network this is a great one for rolling out temporarily because what you've got is this bus cable across here the bus cable is a really chunky really powerful high bandwidth cable and you make everybody plug into that so this would be good for like rolling out in a imagine you've got like a video games competition or something or even bringing their laptops and they want to plug into ethernet you'd roll out this bus cable everyone plug in you'd have a really good connection if any one computer goes off the network the network keeps going on the edges you've got these two things called terminators um and what they do is if data gets to one side of them they send them back the other direction so data's going both ways on this cable so you do have the opportunity for data to have a collision and to corrupt on that on that bus cable now the point of having two terminators is if you send a message from this computer and it goes to the left and it's sent back all the way to the right and it's sent back all the way to the left again well the computer it's looking for isn't there so if it's not there the terminator destroys that data so it's not just pinging back and forth forever this is the exact diagram you need to draw for bus and if you're asked about what what network is great for temporarily rolling out this is the best one star network's the best network for like most situations you have your server and your workstation and everything's plugged into a switch a switch is a clever device that roots traffic so if a message is going from my workstation to my server it goes to the switch and then straight to the server if i'm sending a message from the server to the top right one it goes from the server to the switch sorry the switch and straight up to the right all of that network system is designed to be nice and efficient and to root traffic around it no part of that network is going to cause problems to happen unless we disconnect the um the server which is always gonna cause a problem that's the most robust but it's expensive switches of that level really really really expensive so star network the best i can disconnect anything apart from the server and it'll keep working i can add more in very very easily but expensive okay i made this diagram didn't really realize it looked like a pentagram until just now so apologies but this is a mesh network in a mesh network every computer connects to every other network on that diagram so there are multiple ways for us to get the information from one computer to another it's the best type of network because there's multiple ways of us connecting every computer is directly connected to another but that's not the way most networks work this would be the most expensive thing in the world if we did this in school because every computer would need you know if they're if they're what um something like 400 computers just in in the downstairs part of our school every computer then would need 399 cables coming out of it into everything else this is more what we have in the real world this is a partial mesh network so the computers are all connected together but indirectly if i want to get a message from this computer to this computer it has to pass through this one this one and get back up here and that seems familiar because that's the internet the internet is a partial mesh network where every computer is connected together but you might have to send it through four other computers to get to it and those computers might be all over the world so that's what you get are layers lots of people hate layers it's not that bad if you think about the top end as being the program sending the message and the bottom side is being the raw data that's going to come out of it like physically ones and zeros as electrical pulses or or radio waves and that's the best thing to remember you may have to remember the names of them so it's worth going over again this is one of those things that i would have printed out as i'm walking into the exam and i'd be going over it and overwritten over it stick it in your bag go over it over and over and over it and the moment the lesson the moment the exam starts i'd be jotting it down in the blank piece of paper as quick as i could get it out of my head onto something useful because it's hard to remember so if an email application wants to send an email it talks the application layer the application layer goes cool this is an email i'm going to send it via smtp pass it down to the transport layer the transport layer is the bit that breaks it into packets it goes push push push push here we go passes it down the network layer is the bit that goes right where are these packets going let's find the best direction let's find the correction for them cool the data link layer then that's job is finding the best possible path and combining them together into a sort of a group that it can send and finally the physical layer is the bit that actually does the turning it into ones and zeros it turns it into the raw data and sends it so across the internet then this raw data travels and it arrives at your computer and your computer gets it at the physical layer converts it back up into a chunk of data the data link layer breaks that up back into the packets and the protocols and stuff and sends it back up to the network layer network layer checks those packets puts them back together transport layer goes it's a file again back up to application layer application layer goes oh this is an email here you go email program have it so all of that stuff is important now you do have this those of you in my class you do have this new google classroom go to the communications one go to the layers part and re-read through what each of them does because i've simplified it a lot here just to make it simple in the time we've got it's not simple you need to go practice that one please do just in case right lots to do 20 minutes to do it organization structure of data we're going to bomb through this you need to know your conversions binary to dainery daenerys our number system binary is this you might see it written down as a number with a little 2 on it that means binary a number with a little 16 is hex and the number the little 10 is this idenary number system the one we use because we have 10 fingers and thumbs so we are used to counting in tens how do we convert from binary to january it's very very easy we put our place values up remember the place values always go from right to left we start with one and we double it as we go so that's an eight bit byte there and the ones basically mean where we've got a one those place values are added up so we just add up those place values where there's a one and you get your thenary number all together this good example for you there again my lot on google classroom you've got all the workbooks and all the qr codes to scan to see that if you want to practice it as much as you want okay doing it the other way around turning from daenery to binary draw out your table with your place values and go from left to right and every time you're moving you're saying can i take that away from the number i've got on the left hand side i can't take 128 away but i can take 164 so i can take 64 away if i take 64 away that means i've used it so [Music] take 64 away from the number and that's what we're working with can i take 32 away from 29 i can't can i take 16 away i can so let's use 16 13 left can i take eight away from 13 i can i've got five left four away from five i can one left can i take two away from one nope can i take one away i can you'll know it's right because you end up with a zero boom there's your binary in addition reasonably straightforward those numbers on the top are what i'd write down you need to write down the binary version of zero one two and three so 0 is 0 1 is 1 2 is 1 0 and 3 is 1 1 and then what we do is we work through the sum from right to left and we do it just normal so 1 plus 1 is 2. now 2 can't be written in binary it's one zero so we bring down the zero and carry the one in the next column then i've got zero zero one which is one final column one plus zero is one simple as that you have eight of them to do that thing to remember about binary addition though is we can get to a situation where we've got this thing the overflow so what's happened here is that the sum needs an extra bit it's gone over the eight bits that we need to hold it in and if that's the case we can't actually store that this isn't normal math this is a computer those eight bits are a physical circuit that we've got to deal with so at this point that one is actually lost it's overflowed and we can't see it quick question i'll be like calculator is in the exam you are so please bring them with you you are allowed calculators please do bring them with you i will have some ready to go in case you've forgotten them but they'll be miss viners and she will break my legs if i lose them so i'll leave them back if you're borrowing mine okay and they are very low tech calculators best bring your own fancy scientific one okay you could have binary subtraction works just like normal subtraction except we need 0 1 two and three at the top to remember it so if i do one take away one that gives us zero now zero take away one i can't do so i have to borrow from the left hand side if i borrow from that i end up with zero and what i'm left with on my side is one zero which is two two take away one is one and on the end zero take away zero is zero boom you're done i've never seen a question of binary subtraction i'd be surprised it popped in there but it is in your spec so it could technically happen okay hexadecimal key thing about hexadecimal is it uses base 16 there are 16 values in any one place that means when we get past 9 we need to use letters to represent them we use a to represent 10 and we go to f as long as you remember a is 10 and f is the last letter you can just write this out in your margin and work it out for yourself a is 10 b is 11 c is 12 d is 13 e is 14 f is 15. in this example what we're saying is we have e lots of 16 and one lot of nine because the place values are different in a base 16 number system in binary they doubled because it was base two in this one every time we move to the left it times it by 16 which is why you only need to know two so e16s is actually 14 16s sixteens which you all know off the top of your head surely is 224 224 plus nine gives us 233 nice and straightforward hopefully other way around this is the most difficult method but it's reasonably straightforward if you can get your head around it what we need to do is find out how many 16s are in this number so 213 divided by 16. that gives us 13.375 don't care about the decimal i want the whole number in that box 13 doesn't fit so that means i need to put the letter version the letter version of 13 is d so what i've said is i've used 13 16. well let's see what i've used 13 16 is 208 so 213 minus 208 is 5. that number goes in the right hand box boom done simple that is the most straightforward way you can do it either dividing by 16 the whole number goes on the left work out how many of you you've used whatever's left that goes in the right hand side smashing financial hex is where the magic happens because the reason we need to know both is because one hex bit is four binary bits so one hex bit is a nibble so to convert them you do this [Music] split them in two instead of treating it like one big thing you split it into two right and what you do with that is you work out what each of them are in denery so one zero one one is eleven zero zero one zero is two you're going to write the number 11 on the left hand side the number two on the right hand side of course 11 doesn't fit so 11 is b b2 other way around is just as easy split them work out what they are in denery a is 10 f is 15. represent them as two four bit nibbles one zero one zero on the right hand side one one one one then you just go push them back together that's it you're done i'm gonna pick up on something from the chat see because a few people are asking about calculators wjc is allowing calculators i don't think educash educas and the english boards do certainly that's not my memory from when i was teaching in england but wjc definitely calculators are good okay bit wise or shifting if they ask you to shift to the left you're basically moving it to the left three places one two three notice we've overflowed we've lost some of that data it's gone out of the boxes what do we put in the blank ones [Music] zeros that simple if it says shift to the left cross out the left numbers to that amount and add zeros on the opposite side to the same amount shift to the right we're gonna move it to the right five one two three four five and fill the blanks with zeros again i'd be crossing off the five numbers on the right hand side and adding five zeros on the left simple easy straightforward text text is represented by every letter every symbol having a unique binary value in unicode that's a 32-bit byte so 4.2 billion possible numbers that means we can include emojis the pile of poo emoji is actually the number 128 169. so when a computer sees that it goes and loads that image into memory and goes there we go images are stored in things called bitmaps they're a bit more complicated it's basically a grid and for every bit we store the color values this is a black and white one so it's going to be ones and zeros but if we store the color value of each pixel that will mean that we get a little bit more flexibility in what we can show and of course we can show full color images but each pixel wouldn't be one bit then it's probably going to be at least 32 bits to store the red green blue and the the light and the darkness of each pixel to get that data in sounds of course are waves in the real world so what we need to do is represent that wave we take samples of it or recordings of the amplitude that's just the volume many times second the more the more times we take it the higher the sample rate the better we can represent that here's an example of a wave on the left and the recreation on the right now clearly that's going to sound terrible look how blocky it is the more samples we take the better the quality of audio and just so you know the level of samples that you need to take to make music is 44 000 per second each sample is stored as a 32-bit value which means that we need a significant amount of data and a significant bit depth to store audio properly data types you know this from programming but we've got our numbers integers and real numbers integers are whole numbers real numbers have a decimal part we've got characters which are letters strings which are collections of characters boolean which is true or false and date and time now date and time although that's a data type you wouldn't really use it in programming it's more for databases arrays are lists and we've got two types we've got our 1d array on the left so if i wanted to access maths i'd access it by saying the name of the array square brackets and the row number notice we start from zero because they're indexes a 2d array i would always do the row first and then the column so in this it's different from geography it's different from maths we do the row first and then the column so this would be row two column one to get mrs james it's the row and the column for a 2d array but a 2d array is basically that exact thing it is the table types of validation and verification there's a big bunch there but the ones we've done the ones you you remember hopefully presence check is it their length check how many letters how many characters range check is it between two numbers look up is it part of a list format does it look a certain way type is it an int is it a float and then we've got a verification which checks something is correct it has been added correctly and that would be dual entry we type it in twice like a password and proofreading the chat looks like it's on a little bit quiet so if somebody could say something to me in the chat just so i know it's working that would be amazing okay three to go in 12 minutes ah this is a bit of a tight one programming construction this is a weird one good thank you chad i know you're still there so on the right hand side of this screen okay we've got our low level code it's our ones and zeroes that are being run by the processor this is machine code to update a screen with a million pixels which isn't a lot to update a screen with a million pixels we have to have about eight million instructions in machine code because we need to load the color value of each pixel and push it to the screen that's a lot of machine code machine code is hard to read for a human so we have a version of that called assembly code which is where instead of 1101 as the instruction we have a mnemonic a word to represent it things like add to represent addition that to represent data and imp to represent input instead of binary numbers it's easier to read but for every line of machine code we need one line of assembly so again if we're putting images on a an image that's a million pixels in size we need a million lines of assembly code we call that low level code because it's close to the cpu now we don't write in that we write in high-level code something like python where each line of code could be two million lines of machine code so the question is why do we write in high-level code and what does it do well high-level code is easier for humans to read it's more like human language now the types of programs we need to make that work there are two types the assembler over here is what turns assembly code into machine code and it's a really reasonably dumb program it's taking each of these and just translating them into the binary our interpreters and our compilers turn high-level code into machine code so again for each line of this they could be outputting possibly two million lines of machine code so that's a bit cleverer and there are two types there's an interpreter which does it live it does it line by line as you go or there's a compiler which does it in advance think about it this way it's the difference between having somebody with you as you walk around paris translating everything somebody says into french and english for you and a compiler is somebody that's gone and translated a book for you in advance and just hands it to you the difference is really really subtle really an interpreter you can run it anywhere as long as we've got the code with the compiler you need to compile it for every type of cpu so you need to compile for each games console the pc the mac different phones which is a massive absolute faff but what you do get is just machine code so compiled code runs really really fast jeopardy code runs quite quite slow but slower so if you're building a video game you want compiled code compilation takes this process um i'm not 100 sure this will be in the exam but it is part of compilation so i thought i'd bring it up we take our code and we do lexical analysis which is where we take all the words and we separate them into what we call tokens so basically each word is a separate thing we then look at our keywords like for and if and stuff like that and mark those up and we get our identifiers our variable names and we store those we also get rid of the white space the tabs the spaces all that sort of stuff so we're left with a bunch of tokens list of keywords list of identifiers we pass it on to the syntax analysis syntax basically says are these in the right order have you got keyword bracket variable if so cool we'll pass it on if not we're going to error and stop semantic analysis semantic analysis semantic meaning meaning good little joke there but it tries to understand what you were writing and it goes does this make sense are you trying to glue together a letter a number or are you trying to add seven to a video like does it make sense if it doesn't make sense it's gonna error and it's gonna pass it on now code optimization happens at this stage when we generate the code we're generating ones and zeros this is the bit that takes that one line of machine of sorry high level code and turns it into a million lines of code generation at this point it tries to make it a bit more efficient and tries to put in a few little cheats to make that run better so instead of outputting three million lines it might only output a hundred thousand to make it a bit quicker but using some clever tricks okay two more seven minutes this is gonna be tough security and data management there's a mass of this am i definitely muted what's happening here let me have a look please let me know if my audio is still working it seems to be transmitting so i'm going to keep going good thank you right security and data management i'm bombing through this very quickly so data security dangers you need to be wary of hackers malicious and accidental damage now what's the difference militia says i'm damaging something on purpose to cause problems for you accidental is i work for you whoops i've pressed delete and deleted all the orders or all the grades ah ransomware i install a piece of software it locks my computer and maybe encrypts my data until i pay them in bitcoin to have it back loss of anonymity as well on the internet you might be able to find out who i am from my online presence now disaster planning is something they might ask you about there are three stages to disaster planning and this happens with everything it's not just like what happens if somebody hacks us it's also what happens if the server gets flooded or it breaks or it's on fire we need to plan what's going to happen before during and after so beforehand we'll think about all the things and we put a plan in place when it's actually happening we'll look at that plan and we'll use it so who do we call what do we do what are the steps to notify people or to protect our data afterwards we have a plan action to get everything up and running again and get it all back to the way it was but also we do a little evaluation then and we see what can we do better how can we make that better long run long term so next time it happens it'll work perfectly data management is about backing up your files key thing of backups is you keep a copy that's the keyword a backup is a copy of some files in case it deletes or you remove it and you need to come back to it again backups tend to be generational and you remember this was grandfather father son the idea behind that is we always have three backups and whichever is the oldest we delete that and we put the newest one over that so the grandfather becomes the sun so we've always got three generations of backups the youngest the middling one and the oldest and we always take the oldest one delete it and put the new one on it so we've always got the three most recent backups archiving files that's different from backing up that's moving data from your computer somewhere else and it's data that you're not using much anymore good examples of this might be we'll take the students that have left this summer and put them on an archive disk we've still got that data but it's not clogging up the computer i'm currently using you've got you've got a better example i'm sure you've downloaded videos off the internet certainly legally and you probably don't want them clogging up your hard drive so possibly what you've done is you've moved them to like a usb drive or something like that okay network security then so what network security is is how we are dealing with um sorry one second there we go okay it's how we are dealing with um our network and making sure it's protected and that's limiting levels of access so different users have different levels of access i can save things other people can edit things and stuff like that um using strong passwords making sure our password isn't just like our name or password or welcome to with a capital w uh using encryption to making sure that our data is actually encrypted and then we've got things like network policies acceptable use policies that's what you sign you say yes to every time you sign into the computer you will do good things at the computer you won't bully anybody um backing up on our network making sure we've got backups if things get deleted we can restore them and our disaster recovery plan that's where that comes into mind um cyber security then very very quickly you need risks and protections key key things think about viruses software that will damage your computer i've said works there but i meant worms i'm sorry worms are self-replicating things on a computer they're not necessarily malicious but they will take resources spyware spies on you keyloggers the worst kind of spyware literally send your key presses up to the internet somewhere and trojans are a way of getting viruses and all these things that look like it's a nice piece of software or something good if you've downloaded adobe photoshop cracked.exe and you double click on it and nothing happens probably a trojan the protections then well you need antivirus software and that needs to be up to date you need an antivirus software works by identifying what looks like a virus and getting rid of it you've also got firewalls to stop people connecting to your computer you'd update your os and update your browser so you're not working with an operating system or browser with security problems and you're going to avoid phishing emails you get an email from a nigerian prince probably best not to answer it unless you know that nigerian prince very well right two minutes cyber attacks different kinds of attacks sql injection attacks where i type something into your website that looks like code and it takes over your website ddos you find an ip address and you get millions of computers to connect to it causing the server to reboot and you keep doing it password attacks trying to guess people's passwords but more complicated with programmatic ways ip spoofing pretending to be somebody else on a network social engineering the best one uh calling somebody up pretending to be a person and asking for their password to be changed how do we find these vulnerabilities while footprinting where we work out what a company is doing and we understand what data it shares and we can get an idea about the footprint of the company and where it extends into the real world ethical hacking where we get some good guy hackers to go and break into our systems and tell us what's wrong with it and then penetration testing where we get those same hackers to try and break into our network with our permission internally we'd also want to be designing for security when we're building our network so we're always constantly testing with these methods and we're always trying to use best practices so the only ethical immoral topic you've got to talk about and which is probably going to be your essay question at the end and just a reminder all of these questions you can answer with bullet point four sentences but the last question the essay question must be written if it was bullet point sentences as if it was an essay and it must flow it must read sensibly and make points it can't just be here are 15 things that i remembered about it they need to be structured in a way that you're making an argument and it's progressing so key things to think about are computers recyclable some of them are some of them aren't they should be recyclable apple computers are more recyclable than others but then you have to pay more for them if you are going to use computers like in our school we use ipads does that mean we don't use as much paper well it probably does but does that offset the electricity use and if we generate electricity with fossil fuels is that better we get deliveries for everything there with amazon and other companies is that good for the environment computer rooms need air conditioning is that good for the environment here's a good one though remote working your parents or you working from home means you have to drive to work you're not all in the city center there's less transport infrastructure there's less people smaller offices smaller electricity use all that sort of stuff would be good without having to travel and we're done good luck for tomorrow everyone go and do some revision now i'll get these slides on as quick as i can i've got just about five minutes till uh year 12 come on and start bothering me for things if you've got any questions please what about 30 seconds so stick them in the chat now and i'm gonna have to go then onto my other live stream for year 12 who'll be waiting with anticipation for me oh thank you guys i really appreciate it thank you all for tuning in there's many more of us watching that are actually in my class so all of you that popped along for a bit of extra vision thanks very much um but those of you in my class make sure you smash this exam tomorrow i do believe in you you're all brilliant people you can do this and more than that you can do it with star we can really get something cool going on um the vod will be available on twitch straight away after i'm going to turn the live stream off now because i do have to go to the year 13. thank you everyone and i shall see [Music]