Computing pre-release material AQA A

Computer Science and ICT discussion, revision, exam and homework help.

Announcements Posted on
Please change your TSR password 23-05-2013
Enter our travel-writing competition for the chance to win a Nikon 1 J3 camera 20-05-2013
IMPORTANT: You must wait until midnight (morning exams)/4.30AM (afternoon exams) to discuss Edexcel exams and until 1pm/6pm the following day for STEP and IB exams. Please read before posting, including for rules for practical and oral exams. 28-04-2013
Sign in to Reply
  1. 101101's Avatar
    • Benevolent Member
    • Posts: 835
    Re: Computing pre-release material AQA A
    Could somebody please explain what to expect from section C?
  2. h2shin's Avatar
    • Adored and Respected Member
    • Posts: 596
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Could somebody please explain what to expect from section C?
    Previously, 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.
  3. compy's Avatar
    • Full Member
    • Posts: 114
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Could somebody please explain what to expect from section C?
    http://en.wikibooks.org/wiki/A-level...code/2012_Exam
  4. 101101's Avatar
    • Benevolent Member
    • Posts: 835
    Re: Computing pre-release material AQA A
    Can anybody help me with hamming code?
  5. D-Box's Avatar
    • Adored and Respected Member
    • Posts: 458
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Can anybody help me with hamming code?
    Ok, so you have a table like this and you're told it uses even parity:

    Click image for larger version. 

Name:	hamming.png 
Views:	81 
Size:	3.4 KB 
ID:	148307

    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)
  6. 101101's Avatar
    • Benevolent Member
    • Posts: 835
    Re: Computing pre-release material AQA A
    (Original post by D-Box)
    Ok, so you have a table like this and you're told it uses even parity:

    Click image for larger version. 

Name:	hamming.png 
Views:	81 
Size:	3.4 KB 
ID:	148307

    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)
    Thank you, but how do you know what boxes that you have to skip?
  7. D-Box's Avatar
    • Adored and Respected Member
    • Posts: 458
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Thank you, but how do you know what boxes that you have to skip?
    It should have the table already drawn in the paper and will probably make clear where the parity bits are.
  8. 101101's Avatar
    • Benevolent Member
    • Posts: 835
    Re: Computing pre-release material AQA A
    (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.
    Thanks for the help, lets just hope they give us the table
  9. compy's Avatar
    • Full Member
    • Posts: 114
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Can anybody help me with hamming code?
    Lots of practice questions here: http://en.wikibooks.org/wiki/A-level...n/Hamming_code
  10. alphadawg's Avatar
    • Full Member
    • Posts: 114
    Re: Computing pre-release material AQA A
    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.
  11. D-Box's Avatar
    • Adored and Respected Member
    • Posts: 458
    Re: Computing pre-release material AQA A
    (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.
    Go 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.
  12. A Wise Ninja's Avatar
    • Full Member
    • Location: Yeovil, Somerset
    • Posts: 136
    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?"
  13. h2shin's Avatar
    • Adored and Respected Member
    • Posts: 596
    Re: Computing pre-release material AQA A
    (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?"
    I'd definitely go for that...
  14. Tomk14's Avatar
    • New Member
    • Posts: 3
    Boundary error in JAVA
    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!
  15. iCiaran's Avatar
    • Exalted and Worshipped Member
    • Location: Wirral
    • Posts: 1,236
    Re: Boundary error in JAVA
    (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!
    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...
  16. Tomk14's Avatar
    • New Member
    • Posts: 3
    Re: Boundary error in JAVA
    (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...
    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 :
    Code:
    if (playerPosition.noOfCellsSouth >= (N_S_DISTANCE - 5))
    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.

    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.
  17. iCiaran's Avatar
    • Exalted and Worshipped Member
    • Location: Wirral
    • Posts: 1,236
    Re: Boundary error in JAVA
    (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 :
    Code:
    if (playerPosition.noOfCellsSouth >= (N_S_DISTANCE - 5))
    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.

    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!
    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] = '*';
    	}
  18. Tomk14's Avatar
    • New Member
    • Posts: 3
    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!
  19. iCiaran's Avatar
    • Exalted and Worshipped Member
    • Location: Wirral
    • Posts: 1,236
    Re: Boundary error in JAVA
    (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!
    No problem
  20. moogoomonkey's Avatar
    • Full Member
    • Posts: 112
    Re: Computing pre-release material AQA A
    (Original post by 101101)
    Thank you, but how do you know what boxes that you have to skip?
    Hi there!

    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
Sign in to Reply
Share this discussion:  
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.