The Student Room Group

WJEC A2 Computing CG3 - Tuesday 23rd June 2015 [Exam Discussion Thread]

Scroll to see replies

Okay - floating point is really starting to confuse me - in one of the papers it asks you to convert 22.75 to floating point form with a 16 bit mantissa and a 4 bit exponent, so this is what i do (and how i was taught, and how the zigzag guide explains it also)

1) convert the number to fixed point - 010110.11
2) move the decimal point to the right of the last 1 (when going from right to left) - 01.011011
3) count how many spaces it moved, in this case 4 - this is the exponent (0100)
4) done

so my answer was this:

01011011000000000100

but the mark scheme says this:

01011011000000000101 or
0101 1011 0000 0000 0101 or
010110 11 00000000 0101 etc (spacing unimportant)

Where have i gone wrong? :s-smilie: why is my exponent incorrect?
Reply 241
Original post by jamietopp21
Okay - floating point is really starting to confuse me - in one of the papers it asks you to convert 22.75 to floating point form with a 16 bit mantissa and a 4 bit exponent, so this is what i do (and how i was taught, and how the zigzag guide explains it also)

1) convert the number to fixed point - 010110.11
2) move the decimal point to the right of the last 1 (when going from right to left) - 01.011011
3) count how many spaces it moved, in this case 4 - this is the exponent (0100)
4) done

so my answer was this:

01011011000000000100

but the mark scheme says this:

01011011000000000101 or
0101 1011 0000 0000 0101 or
010110 11 00000000 0101 etc (spacing unimportant)

Where have i gone wrong? :s-smilie: why is my exponent incorrect?


When you move the decimal point you need the binary number to start with 0.1 or 1.0. You're lacking one more movement. Which is the extra 1 on the exponent.
Original post by jamietopp21
Okay - floating point is really starting to confuse me - in one of the papers it asks you to convert 22.75 to floating point form with a 16 bit mantissa and a 4 bit exponent, so this is what i do (and how i was taught, and how the zigzag guide explains it also)

1) convert the number to fixed point - 010110.11
2) move the decimal point to the right of the last 1 (when going from right to left) - 01.011011
3) count how many spaces it moved, in this case 4 - this is the exponent (0100)
4) done

so my answer was this:

01011011000000000100

but the mark scheme says this:

01011011000000000101 or
0101 1011 0000 0000 0101 or
010110 11 00000000 0101 etc (spacing unimportant)

Where have i gone wrong? :s-smilie: why is my exponent incorrect?


Your Exponent should be 5 not 4 (0101) not (0100) ^^
- Convert it into fixed point form ( 010110.11)
- Add the rest of the zero's on until you make up the mantissa
- Move the decimal place to the point of the last 1 (move 5 spaces)
-Convert 5 (your exponent) to binary
- Put it on the end

You need to move the decimal one more place . Might have just counted wrong :smile:
Original post by 0110 1001
Your Exponent should be 5 not 4 (0101) not (0100) ^^
- Convert it into fixed point form ( 010110.11)
- Add the rest of the zero's on until you make up the mantissa
- Move the decimal place to the point of the last 1 (move 5 spaces)
-Convert 5 (your exponent) to binary
- Put it on the end

You need to move the decimal one more place . Might have just counted wrong :smile:


Ahh i see, i have been moving my decimal point to the right of the last 1 every time, as thats what the resources i have tell me to do, thank you :smile:
Original post by jamietopp21
Ahh i see, i have been moving my decimal point to the right of the last 1 every time, as thats what the resources i have tell me to do, thank you :smile:


You're welcome :h: In the ZigZag revision guide it says to move the binary point to the left of the left most non zero bit. It's a tricky topic to grasp ^^
Reply 245
Does anyone know if we need to know how to represent a negative hexadecimal number?!
Original post by 0110 1001
You're welcome :h: In the ZigZag revision guide it says to move the binary point to the left of the left most non zero bit. It's a tricky topic to grasp ^^


Ahhh the one i have said the right of the most non zero bit, mine must be an older copy, its a good job i asked!
Reply 247
Negative hex has never been asked for in any of the papers.
Spec says:
Describe and use the binary number system and the hexadecimal notation as a shorthand for binary number patterns.
Explain the representation of positive and negative integers in a fixed-length store using both two’s complementation and
sign/magnitude representation.
Reply 248
Original post by jamietopp21
Ahhh the one i have said the right of the most non zero bit, mine must be an older copy, its a good job i asked!


You're looking to get the fractional point to the right of the sign bit, so positive numbers start 0.1 and negatives start 1.0
Reply 249
@CD223


I don't believe we do. I also do electronics and that has a lot more focus on binary, hex ect since the programming language for the exams uses Hex. It isn't on the syllabus there so doubt it will be for computing.
Reply 250
Original post by DerRm
Negative hex has never been asked for in any of the papers.Spec says:biggrin:escribe and use the binary number system and the hexadecimal notation as a shorthand for binary number patterns.Explain the representation of positive and negative integers in a fixed-length store using both two’s complementation andsign/magnitude representation.


Original post by 8472
@CD223
I don't believe we do. I also do electronics and that has a lot more focus on binary, hex ect since the programming language for the exams uses Hex. It isn't on the syllabus there so doubt it will be for computing.


Thanks guys :smile:

Had a mini-panic. I don't mind number systems but I was imagining tough possible questions.

Is the hardest they could go a negative mantissa with a negative exponent?

Hoping they don't make us use examples of recurring binary numbers.
Reply 251
Original post by CD223
Thanks guys :smile:

Had a mini-panic. I don't mind number systems but I was imagining tough possible questions.

Is the hardest they could go a negative mantissa with a negative exponent?

Hoping they don't make us use examples of recurring binary numbers.


Pretty much, in which case both the mantissa and exponent should start with a 1 i.e. mantissa is 10xxxxxxxx and exponent is 1xxxxx
Original post by CD223
Thanks guys :smile:

Had a mini-panic. I don't mind number systems but I was imagining tough possible questions.

Is the hardest they could go a negative mantissa with a negative exponent?

Hoping they don't make us use examples of recurring binary numbers.


The hardest question they can is is giving a floating point and wanting denary.
Reply 253
Original post by fitsasa
The hardest question they can is is giving a floating point and wanting denary.


Here's a question sheet for that if you want. Also has the answers. You could use the answer sheet to practice converting back to floating point by covering up the question too.
I have a quick question regarding the marking of BNF questions on the exam papers.

I've just done a question with this as the answer:

<amountofmoney> ::= <integer> . <digit> <digit> | ( <integer> . <digit> <digit> )
In the mark scheme they've included the brackets and the decimal point in the definition where as I have done it like this

<amountofmoney> ::= <integer> <point> <digit> <digit> | <bracket> <integer> <point> <digit> <digit> <bracket>

I have correctly defined the entities. is this still correct and will i be awarded full marks?
Original post by Nerinom
I have a quick question regarding the marking of BNF questions on the exam papers.

I've just done a question with this as the answer:

<amountofmoney> ::= <integer> . <digit> <digit> | ( <integer> . <digit> <digit> )
In the mark scheme they've included the brackets and the decimal point in the definition where as I have done it like this

<amountofmoney> ::= <integer> <point> <digit> <digit> | <bracket> <integer> <point> <digit> <digit> <bracket>

I have correctly defined the entities. is this still correct and will i be awarded full marks?


I did this exactly the same!! I'm sure you will be given full marks as long as the rest of your definitions are correct i.e. <integer> ::= <digit> | <digit> <integer> etc
Reply 256
Has anyone made a 'cheat sheet' for this like with CG1? (It has all the commonly asked questions and their answers)
Original post by DerRm
Here's a question sheet for that if you want. Also has the answers. You could use the answer sheet to practice converting back to floating point by covering up the question too.


These are bloody difficult in my opinion xD as far as I'm aware the only decimals they ask about are .25, .5 or .75, so if you can do the questions on those sheets you're more than prepared!
Original post by jt663
Has anyone made a 'cheat sheet' for this like with CG1? (It has all the commonly asked questions and their answers)

They ask way too much for this :smile:
i'm massively struggling with algorithm questions where you create them with pseudo-code, can anyone provide any help for these as they're pretty much guaranteed to come up.

Thanks

Quick Reply

Latest