Computing pre-release material AQA A
Computer Science and ICT discussion, revision, exam and homework help.
-
Re: Computing pre-release material AQA APreviously, it was just implementing an algorithm in your language, like a linear search or bubble sort, then testing it, or explaining parts of the algorithm etc.(Original post by 101101)
Could somebody please explain what to expect from section C? -
Re: Computing pre-release material AQA Ahttp://en.wikibooks.org/wiki/A-level...code/2012_Exam(Original post by 101101)
Could somebody please explain what to expect from section C? -
Re: Computing pre-release material AQA AOk, so you have a table like this and you're told it uses even parity:(Original post by 101101)
Can anybody help me with hamming code?
You have to work out the values of P1,2,3,4
Even parity means that the number of 1's in each row must be an even number. That means that you can work out the value of the parity bits by counting up the 1s in the row.
This makes the values:
P1 - 1 (There are three 1's in the row, so make it a 1 to change the tally to 4 (which is even))
P2 - 1
P3 - 1
P4 - 0 (There are two 1s already) -
Re: Computing pre-release material AQA AThank you, but how do you know what boxes that you have to skip?(Original post by D-Box)
Ok, so you have a table like this and you're told it uses even parity:
You have to work out the values of P1,2,3,4
Even parity means that the number of 1's in each row must be an even number. That means that you can work out the value of the parity bits by counting up the 1s in the row.
This makes the values:
P1 - 1 (There are three 1's in the row, so make it a 1 to change the tally to 4 (which is even))
P2 - 1
P3 - 1
P4 - 0 (There are two 1s already) -
Re: Computing pre-release material AQA AIt should have the table already drawn in the paper and will probably make clear where the parity bits are.(Original post by 101101)
Thank you, but how do you know what boxes that you have to skip? -
Re: Computing pre-release material AQA AThanks for the help, lets just hope they give us the table(Original post by D-Box)
It should have the table already drawn in the paper and will probably make clear where the parity bits are.
-
Re: Computing pre-release material AQA ALots of practice questions here: http://en.wikibooks.org/wiki/A-level...n/Hamming_code(Original post by 101101)
Can anybody help me with hamming code? -
Re: Computing pre-release material AQA AGo to Here and click on Past question papers and mark schemes and select a year. For the Comp1 paper, just click on Unit 01 - Problem Solving, Programming, Data Representation and Practical Exercise Question Paper. Both sections A and B will be relevant to go over.(Original post by alphadawg)
Can anyone link to some relevant past papers? there are a whole bunch on the aqa site but im confused as to which are relevant to our exam this month. -
Re: Computing pre-release material AQA A
Not looking forward to this exam.. I feel that in computing you never really know what weird questions can come up.. especially parts of COMP2.
I can remember on one paper it asked 'What it is a Robot?'
Probably the safest answer is "A device sent back in time by John Connor to save humanity?" -
Re: Computing pre-release material AQA AI'd definitely go for that...(Original post by A Wise Ninja)
Not looking forward to this exam.. I feel that in computing you never really know what weird questions can come up.. especially parts of COMP2.
I can remember on one paper it asked 'What it is a Robot?'
Probably the safest answer is "A device sent back in time by John Connor to save humanity?" -
Re: Boundary error in JAVAJava's a bit more awkward with this compared to other languages, because Java arrays start at position 0 rather than the position 1 used by the other languages. However solving the border problem just involves some IF statements, in the makeMove method, you need to make it so if they are trying to move North they can't go beyond noOfCellsSouth 1, etc, I'll leave you with this for now, and if you still can't get it ask me again and I'll go into more depth, but it will help you more if you figure it out yourself, especially since this is almost guaranteed to come up...(Original post by Tomk14)
So i am coding Java currently, and along with everyone i have found the boundary error.
although i am having quite some difficulty figuring out how to solve it, any tips someone can give me?
would be a great help
thanks! -
Re: Boundary error in JAVAOk thanks a lot, ive looked into it and ive thought of a way in which i make a method which uses 2 if statements which check :(Original post by iCiaran)
Java's a bit more awkward with this compared to other languages, because Java arrays start at position 0 rather than the position 1 used by the other languages. However solving the border problem just involves some IF statements, in the makeMove method, you need to make it so if they are trying to move North they can't go beyond noOfCellsSouth 1, etc, I'll leave you with this for now, and if you still can't get it ask me again and I'll go into more depth, but it will help you more if you figure it out yourself, especially since this is almost guaranteed to come up...
This is because the N/S is 5 long and the N/S distance at first is set for 1 so if - 5 it should give position etc.Code:if (playerPosition.noOfCellsSouth >= (N_S_DISTANCE - 5))
although i al having a problem where i cannot decipher the difference between up and down, e.g. i print out a line saying i am out of bounds, and comes up with an error and the persons position is off the board
i want the persons position to be on the board so i am doing the opposite to the first command e.g. they go north straight away, ++ one on and hits boudry, then stays there?
i am sorry i am not good at explaining...
or am i over complicating it?
oh i forgot to mention this is in a boolean as being false (because the player isnt in the border)
Thanks a lot for the reply by the way, and it was fast!
Last edited by Tomk14; 18-05-2012 at 19:00. -
Re: Boundary error in JAVAI've taken the original makeMove here and just added what you need to do for the North direction, should make it easier for you to see what I mean... Anything in red is something I have added...(Original post by Tomk14)
Ok thanks a lot, ive looked into it and ive thought of a way in which i make a method which uses 2 if statements which check :
This is because the N/S is 5 long and the N/S distance at first is set for 1 so if - 5 it should give position etc.Code:if (playerPosition.noOfCellsSouth >= (N_S_DISTANCE - 5))
although i al having a problem where i cannot decipher the difference between up and down, e.g. i print out a line saying i am out of bounds, and comes up with an error and the persons position is off the board
i want the persons position to be on the board so i am doing the opposite to the first command e.g. they go north straight away, ++ one on and hits boudry, then stays there?
i am sorry i am not good at explaining...
or am i over complicating it?
oh i forgot to mention this is in a boolean as being false (because the player isnt in the border)
Thanks a lot for the reply by the way, and it was fast!
This just need altering slightly and repeating for the other 3 directions.
Code:void makeMove(char[][] cavern, char direction, CellReference playerPosition) { cavern[playerPosition.noOfCellsSouth][playerPosition.noOfCellsEast] = ' '; switch (direction) { case 'N': if(playerPosition.numberOfCellsSouth>1){ playerPosition.noOfCellsSouth--; } break; case 'S': playerPosition.noOfCellsSouth++; break; case 'W': playerPosition.noOfCellsEast--; break; case 'E': playerPosition.noOfCellsEast++; break; } cavern[playerPosition.noOfCellsSouth][playerPosition.noOfCellsEast] = '*'; } -
Re: Boundary error in JAVA(Original post by iCiaran)
I've taken the original makeMove here and just added what you need to do for the North direction, should make it easier for you to see what I mean... Anything in red is something I have added...
This just need altering slightly and repeating for the other 3 directions.
Code:void makeMove(char[][] cavern, char direction, CellReference playerPosition) { cavern[playerPosition.noOfCellsSouth][playerPosition.noOfCellsEast] = ' '; switch (direction) { case 'N': if(playerPosition.numberOfCellsSouth>1){ playerPosition.noOfCellsSouth--; } break; case 'S': playerPosition.noOfCellsSouth++; break; case 'W': playerPosition.noOfCellsEast--; break; case 'E': playerPosition.noOfCellsEast++; break; } cavern[playerPosition.noOfCellsSouth][playerPosition.noOfCellsEast] = '*'; }
ah yeah i understand i was trying to make a separate method and save code, but i was overcomplicating it
thansk a lot it was very helpful!
-
Re: Boundary error in JAVANo problem(Original post by Tomk14)
ah yeah i understand i was trying to make a separate method and save code, but i was overcomplicating it
thansk a lot it was very helpful!
-
Re: Computing pre-release material AQA AHi there!(Original post by 101101)
Thank you, but how do you know what boxes that you have to skip?
P1 - You skip all the even bit positions so check 11, 9, 7 etc...
P2 - Start from the beginning and check pairs of bits, so 11,10, skip 9 and 8, check 7 and 6 etc...
P3 - Check the bits 5,6,7
P4 - Check bits 9, 10, 11
Hope that helps