• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

SDD Marathon 2013 (3 Viewers)

Shazer2

Member
Joined
Feb 16, 2012
Messages
439
Gender
Male
HSC
2013
Yeah it's basically just maths. I just wasn't sure about the result of 1 + 1 in this case, usually it's 0. And also AAB -> AB. We didn't cover boolean algebra much. Of course I know truth tables, was just confused on the missing +. :)
 

Drewk

Member
Joined
May 18, 2012
Messages
125
Gender
Male
HSC
2013
Doing the 2012 paper Q30 is weird it says their is a logic error in the code with order of IDString = IDString +IDCharacter it should be IDString = IDString+IDcharacter but i cant see anywhere in the question where it implies this ordering??? anyone see why????
 

xer0

Member
Joined
Aug 28, 2013
Messages
167
Location
Sydney     ATAR Aim:   85+      Penis Size:  9001
Gender
Male
HSC
2013
Doing the 2012 paper Q30 is weird it says their is a logic error in the code with order of IDString = IDString +IDCharacter it should be IDString = IDString+IDcharacter but i cant see anywhere in the question where it implies this ordering??? anyone see why????
Code:
[B]WHILE NOT EOF[/B]
   IDString = IDCharacter + IDString
   READ IDCharacter
END WHILE
It says while not "end of file", therefore it is starting form the beginning of the file. Hence the order.
 

Shazer2

Member
Joined
Feb 16, 2012
Messages
439
Gender
Male
HSC
2013
It cuts the list in half every time, after 4, the whole list is checked.
 

xer0

Member
Joined
Aug 28, 2013
Messages
167
Location
Sydney     ATAR Aim:   85+      Penis Size:  9001
Gender
Male
HSC
2013
Binary Search Question - http://snag.gy/klY4E.jpg
Why is the answer A????
The answer is log2(n) where n is the number of elements in the array.
Since no calculators are allowed you have to do it manually. Just keep cutting in half (rounding down to a whole number) and check if the number you're looking for is less or greater than the number you land on.


how would you cut if the number of boxes are even? i.e. middle is 35 and 37
If I remember correctly, you always round down to a whole number. Eg. 7/2 = 3.5 = 3
 

Drewk

Member
Joined
May 18, 2012
Messages
125
Gender
Male
HSC
2013
The answer is log2(n) where n is the number of elements in the array.
Since no calculators are allowed you have to do it manually. Just keep cutting in half (rounding down to a whole number) and check if the number you're looking for is less or greater than the number you land on.



If I remember correctly, you always round down to a whole number. Eg. 7/2 = 3.5 = 3
Thanks for the clarification
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
The answer is log2(n) where n is the number of elements in the array.
Since no calculators are allowed you have to do it manually. Just keep cutting in half (rounding down to a whole number) and check if the number you're looking for is less or greater than the number you land on.



If I remember correctly, you always round down to a whole number. Eg. 7/2 = 3.5 = 3
It depends on the algorithm, if its an integer operation most computers (and languages) will round down. An Int() function will also round down, round() will round up.

In this case both give the same answer
 

Shazer2

Member
Joined
Feb 16, 2012
Messages
439
Gender
Male
HSC
2013
is there any difference between number(5) and number[5]?

also what does it mean when a program is like

begin program(read, write)

??
I don't think it really matters how you index your arrays in pseudocode as long as you're consistent. As for the second thing, that's the opening line of a subroutine that takes the parameters read and write.
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
oh okay...also i checked past hsc answers for algorithms and most of them are like wtf....are we supposed to even get 80% the structure/complexity for sample answers algorithms?


also standard algorithms provided by BOS, do we have to know these? like

BEGIN LoadArray
Let i = 1
Read DataValue
WHILE DataValue < > “xxx”
Let Element (i) = DataValue
i = i + 1
Read DataValue
ENDWHILE
Let NumElements = i
Display “ There are” NumElements “ items loaded into the array” END LoadArray
Yes, you have to write something that does the same thing, in a similar way.

In terms of arrays BTW the course specs use, (), but it shouldn't matter.
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
You have to know how to write them, I would learn how they work and then just reproduce them rather than memorising them. (The exam is tomorrow, there is no way you can memories all of them in that time).

Focus on the sorts, because the others are all pretty obvious.
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
Ok here's a hard question from the hardware option:

1. Draw a full-adder (3)
2. Complete a truth table for a full adder (2)
3. Write the formula for a full-adder in boolean algebra (2)
 

xer0

Member
Joined
Aug 28, 2013
Messages
167
Location
Sydney     ATAR Aim:   85+      Penis Size:  9001
Gender
Male
HSC
2013
Ok here's a hard question from the hardware option:

1. Draw a full-adder (3)
2. Complete a truth table for a full adder (2)
3. Write the formula for a full-adder in boolean algebra (2)
Woah easy there bro. I really doubt they'd ask anything near that in the exam. That's way too hard. Did you look at last year's hardware section?
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
They wouldn't do all three together. Each question by itself could easily be done.
2. Is actually very easy if you think about it
 

hjed

Member
Joined
Nov 10, 2011
Messages
211
Gender
Undisclosed
HSC
2013
They could ask any of those questions.
It's more likely that if they ask 3 they'll give you a diagram to base it off.
1 is unlikely, but could be in there (I swear something similar was in a past paper). If it is in there it will be the hardest question in the option
 

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Top