reset password
Author Message
Ishah
Posts: 2
Posted 20:58 Jul 08, 2015 |

In Quiz of Chp 16 set 1 Q 4 in variable and fixed binary question.By going the textbooks way binary length code will be 300 and by variable we get 224.
So the difference should be 76 which is not an option.
How do we get 576?

 

jparikh
Posts: 4
Posted 21:00 Jul 08, 2015 |
Yeahh i have the same question in that how do we get 576 ?
kjangad
Posts: 6
Posted 21:02 Jul 08, 2015 |

Even I have the same doubt, because as per the textbook method we get binary length code is 300. I also got 224 as the answer. I don't know how do we get 576?

savanes5
Posts: 8
Posted 21:11 Jul 08, 2015 |

I'm assuming they calculated each character as 8 bits, considering each letter in UTF-8 is 8 bits (or 1 byte). Since there's 100 total frequency of characters x 8 = 800. And 800 - 224 = 576. This question should be omitted considering it was not specified with which character encoding is implied.

Ishah
Posts: 2
Posted 21:11 Jul 08, 2015 |

But there is no such case in the cormen in which we are doing the conversion of bytes and bits.

Last edited by Ishah at 21:12 Jul 08, 2015.
savanes5
Posts: 8
Posted 21:14 Jul 08, 2015 |

I feel your pain. Many of the questions on the quizes seem incomplete and very confusing. It seems as if most of the class is doing poorly on the quizzes due to the confusion and lack of instructions.

Last edited by savanes5 at 21:14 Jul 08, 2015.
raylongma1018
Posts: 81
Posted 21:38 Jul 08, 2015 |

if you google search those quiz questions they are copy and paste from other websites and different website use different textbook and different references, some questions looks incomplete because they might be part of other questions and some questions have worng solutions because they use different techniques. 

jpatel30
Posts: 18
Posted 21:54 Jul 08, 2015 |

Yes the question is from other website .

But it is common sense in computer science that character is converted into bits and each character is represented as 8 bit .

So that was the simple twist in the question .

Moreover it is asked that you need to write the number of bits saved in memory so u need to answer that.

savanes5
Posts: 8
Posted 22:08 Jul 08, 2015 |

I have to completely disagree with the common sense part of the questions. You guys state to follow the book, then pull up questions from around the internet. Just a quick google search on Unicode will tell you the size depends on which encoding is used. UTF-16 for example represents them as 16 bits, so which is the correct assumption?

 

jpatel30
Posts: 18
Posted 22:10 Jul 08, 2015 |

If you calculate the answer using 16 bit unicode their is no option which will match to that assumption of yours 

So it was just you need to take character as 8 bit .

savanes5
Posts: 8
Posted 22:16 Jul 08, 2015 |

I don't want to argue with you, but how many of the students got that questions right? I'm pretty sure it much less than 50%.

plakhan
Posts: 37
Posted 22:19 Jul 08, 2015 |

Well, while putting this question on the quiz we thought of the possibility of 8 bit and 16 bit and that is the reason the options are all around 8 bit calculations.