Hsc 2002 Q. 25 C (1 Viewer)

somborac

Member
Joined
May 28, 2004
Messages
148
Gender
Male
HSC
2004
Guys, I dont know how to do this, the school ended before our teacher had time to teach us it so we missed such section and it looks confusing. Can anyone help me do that question 25.c before tomorrow arvo? thanks
 

acmilan

I'll stab ya
Joined
May 24, 2004
Messages
3,989
Location
Jumanji
Gender
Male
HSC
N/A
Ill do 25(c)(i) because its the only one i can really do without having to actually thoroughly read the question.

The first stream is 0101100101

The second bit give X direction, 1 = Left

The next 7 bits give movement = 0110010 = 50 mm

So it moves 50 mm to the left

The second stream is 0110100111

The second bit give Y direction, 1 = up

The next 7 bits give movement = 1010011 = 83 mm

So overall the toy moves 50 mm to the left and 83 mm upwards
 

Doogsy

Member
Joined
Feb 1, 2004
Messages
76
I'm also having a bit of troulbe with it. Its quite a big question (2 pages) so heres a link:
2002 Paper page 21.
I was wondering, whats an acceptable method of extracting the binary string into an array?
Would it be acceptable to say,
WHILE there are more characters in the string
read next character
StringArray(index)=next character
Increment index
END WHILE
or is it acceptable to assume the string is already an array of characters?

PS. i think you might be asking a little much if you want someone to write the entire algorithm. Go to the markers comments to see what some of the better students were able to do.
 
Last edited:

Seraph

Now You've done it.......
Joined
Sep 26, 2003
Messages
897
Gender
Male
HSC
N/A
Just a query you would have to convert the binary to decimal in your algorithm to determine the direction

in the excel book i've noticed to do such matters all they do is

Variable = Read 8 bits and Convert to Decimal

lmao :D , which i guess is great if this is acceptable

but i woudlve thought you would have to create a loop
and for each position in the binary number , starting from the lowest you wuld have to go
binary(index) x 2^(index)
and increment this....
 

Doogsy

Member
Joined
Feb 1, 2004
Messages
76
Seraph said:
Just a query you would have to convert the binary to decimal in your algorithm to determine the direction

in the excel book i've noticed to do such matters all they do is

Variable = Read 8 bits and Convert to Decimal

lmao :D , which i guess is great if this is acceptable

but i woudlve thought you would have to create a loop
and for each position in the binary number , starting from the lowest you wuld have to go
binary(index) x 2^(index)
and increment this....
yes, you would have to do a loop, the markers guidlines said
A significant number of candidates included the logic necessary to convert the binary data in each packet to its decimal equivalent, although many candidates ignored this requirement altogether, or used a generic function such as Convert, but with no detailed logic provided.
 

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

Top