Computer Science Canada Computer Science stuff |
Author: | JWHooper [ Thu Mar 20, 2008 5:40 pm ] |
Post subject: | Computer Science stuff |
Okay, so these are the questions that came from my computer science textbook, and I answered them on my own, but the textbook does not give out the answers for these questions. I want to know if I answered these right. Any suggestions would be appreciated. 1. Suppose that only 50GB of your personal computer's 120GB hard-disk drive is empty. Would it be reasonable to use CDs to store all the material you have on the drive as a backup? What about DVDs? I answered: It would be reasonable to use CDs, because information is recorded in them by creating variations in their reflection surfaces. But, not really DVDs, because they usually work very well for multimedia and entire motion pictures. 2. How many bytes of storage space would be required to store a 400-page novel in which each page contains 3500 characters if ASCII were used? How many bytes would be required if Unicode were used? I answered: 1 character in ASCII = 8 bits = 1 byte, 1 character in Unicode = 16 bits = 2 bytes (400)(3500) = 1400000 characters Thus, 1400000 bytes for ASCII, and 2800000 bytes for Unicode. 3. What values have binary representations in which only one of the bits is 1? List the binary representations for the smallest six values with this property. I answered: Possible binary representations: 0001, 0010, 0100, 1000, 10000, 100000 Therefore 1, 2, 4, 8, 16, and 32. |
Author: | JWHooper [ Thu Mar 20, 2008 5:42 pm ] |
Post subject: | Computer Science stuff (continued) |
Any suggestion would be appreciated. 1. What would be the hexadecimal representation of the largest memory address in a memory consisting of 4MB if each cell had a one-byte capacity? I answered: (didn't answer, because I don't know the answer) 2. If the message xxy yyx xxy xxyy were compressed using LZW with a starting dictionary whose first, second, and third entries were x, y, and space, respectively, what would be the entries in the final dictionary? I answered: 112322134342 3. One means of transmitting bits over traditional telephone systems is to convert the bit patterns into sound, transfer the sound over the telephone lines, and then convert the sound back into bit patterns. Such techniques are limited to transfer rates of 57.6 Kbps. Is this sufficient for teleconferencing if the video is compressed using MPEG? I answered: Since 40Mbps = 40 x 10^6 bps = 40000 x 10^3 bps = 40000Kbps, hence the answer is no (not sufficient for teleconferencing). 4. Encode the following sentence in ASCII using one byte per character. Use the most significant bit of each byte as an (odd) parity bit. 100/5 = 20 I answered: 00110001 10110000 10110000 00101111 10110101 00100000 00111101 00100000 00110010 10110000 |
Author: | JWHooper [ Thu Mar 20, 2008 5:43 pm ] |
Post subject: | Another Computer Science stuff |
Any suggestions would be appreciated. 5. The following message was originally transmitted with odd parity in each short bit string. In which strings have errors definitely occurred? I answered: 11001, 10011, 10110, 11111, 10001, and 10101. 6. Suppose a 24-bit code is generated by representing each symbol by three consecutive copies of its ASCII representation (for example, the symbol A is represented by the bit string 010000010100000101000001). What error-correcting properties does this new code have? I answered: Have three odd parity every third interval of string, if required. 7. In the following case, the different bit strings represent the same value but in different numeric encoding systems. Identify each value and the encoding systems used to represent it. 11111010 0011 1011 I answered: (didn't answer, because I don't know the answer to it) |
Author: | Tony [ Thu Mar 20, 2008 5:51 pm ] |
Post subject: | RE:Computer Science stuff |
1. completely wrong. Wrong answer, and the reasoning isn't even relevant to the question asked (also faulty on its own). 2,3 seem alright. |
Author: | JWHooper [ Thu Mar 20, 2008 5:53 pm ] |
Post subject: | Re: RE:Computer Science stuff |
Tony @ Thu Mar 20, 2008 2:51 pm wrote: 1. completely wrong. Wrong answer, and the reasoning isn't even relevant to the question asked (also faulty on its own).
2,3 seem alright. Any suggestions to number 1? |
Author: | Tony [ Thu Mar 20, 2008 5:55 pm ] |
Post subject: | RE:Computer Science stuff (continued) |
where are you getting 40 Mbps from? That's 10 times as fast as Sympatico's high-speed broadband. |
Author: | Tony [ Thu Mar 20, 2008 5:56 pm ] |
Post subject: | RE:Computer Science stuff |
Yeah, look up the difference between CDs and DVDs, and figure out how many of each it will take to back up all your data. |
Author: | JWHooper [ Thu Mar 20, 2008 6:10 pm ] |
Post subject: | Re: Computer Science stuff |
Okay, I just looked up CDs and DVDs section in my computer science textbook, and it says that CDs have capacities in the range of 600 to 700MB, and DVDs have capacities of several GB. Since MBs are smaller then GB (1MB < 1GB), I will assume that CDs are not good enough for storing 50GB of memory. DVDs might work, since they can store GBs. I don't know if I answered right this time, but please help a little bit. |
Author: | JWHooper [ Thu Mar 20, 2008 6:13 pm ] |
Post subject: | Re: RE:Computer Science stuff (continued) |
Tony @ Thu Mar 20, 2008 2:55 pm wrote: where are you getting 40 Mbps from? That's 10 times as fast as Sympatico's high-speed broadband.
My computer science textbook said, Quote: Using MPEG techniques, video presentations can be successfully relayed over communication paths that provide transfer rates of 40 Mbps. |
Author: | Tony [ Thu Mar 20, 2008 6:16 pm ] |
Post subject: | RE:Computer Science stuff |
You are storing data (space), not memory (memory is in RAM). You are also backing up more than 50 GB of data (it's a somewhat of a trick question). CDs are obviously not reasonable, but how many DVDs will it take? |
Author: | Tony [ Thu Mar 20, 2008 6:19 pm ] |
Post subject: | RE:Computer Science stuff (continued) |
Well then, I guess I should stop watching streaming videos on websites, such as YouTube... |
Author: | JWHooper [ Thu Mar 20, 2008 6:19 pm ] |
Post subject: | Re: RE:Computer Science stuff |
Tony @ Thu Mar 20, 2008 3:16 pm wrote: You are storing data (space), not memory (memory is in RAM). You are also backing up more than 50 GB of data (it's a somewhat of a trick question).
CDs are obviously not reasonable, but how many DVDs will it take? Well, since DVDs can have several GBs, I will assume 3~4 GBs. Then, it will need about around 17 DVDs? |
Author: | Tony [ Thu Mar 20, 2008 6:25 pm ] |
Post subject: | RE:Computer Science stuff |
so now the question becomes, do 17 DVDs seem reasonable? It's kind of subjective... the answer might be influenced by the speed of your DVD writer. |
Author: | Nick [ Thu Mar 20, 2008 6:42 pm ] |
Post subject: | RE:Computer Science stuff |
btw it's 70GB you're trying to store plus there's always compression to take into account |
Author: | Dan [ Thu Mar 20, 2008 7:15 pm ] |
Post subject: | Re: Another Computer Science stuff |
JWHooper @ 20th March 2008, 5:43 pm wrote: Any suggestions would be appreciated.
5. The following message was originally transmitted with odd parity in each short bit string. In which strings have errors definitely occurred? I answered: 11001, 10011, 10110, 11111, 10001, and 10101. Well a parity bit makes the set of bits either have a even number of 1s or an odd number of 1s depending on what kind of parity bit it is. So in this case if it is an odd parity bit then all sets of bits should have an odd number of 1s, if it does not there is an error. It should be noted that a simple VRC will only detect errors in some cases. If the error make an odd number of 1s then you will not detect the error (with an odd parity bit). JWHooper @ 20th March 2008, 5:43 pm wrote: 6. Suppose a 24-bit code is generated by representing each symbol by three consecutive copies of its ASCII representation (for example, the symbol A is represented by the bit string 010000010100000101000001). What error-correcting properties does this new code have? I answered: Have three odd parity every third interval of string, if required. It does not ask what error correction could be used (btw a parity bit on it's own is not error correction it is error detection), it asks what error-correcttion properties does it currently have. (The awser is not none). JWHooper @ 20th March 2008, 5:43 pm wrote: 7. In the following case, the different bit strings represent the same value but in different numeric encoding systems. Identify each value and the encoding systems used to represent it. 11111010 0011 1011 I answered: (didn't answer, because I don't know the answer to it) Well look up the diffrent encoding systems, if they are asking this question i am prity sure your text will have a section on it. Also viewing the number in diffrent bases might help for some. Also i am starting to get a bit consered that you are almost asking us to do your home work for you by posting all thess questions (even tho some have soultions). Your realy should be trying a bit harder to find the soultion on your own first (by looking in your text book or using google) befor posting. I personaly am trying to give you more tips and set you in the right direction rather then just given out anwsers, however if other users do then you will not learn much. |
Author: | CodeMonkey2000 [ Thu Mar 20, 2008 8:37 pm ] |
Post subject: | RE:Computer Science stuff |
Why did you make so many threads, and why are you asking us this? |
Author: | rdrake [ Thu Mar 20, 2008 8:37 pm ] |
Post subject: | RE:Computer Science stuff |
Clearly you should be using two Bluray discs. |
Author: | JWHooper [ Thu Mar 20, 2008 9:05 pm ] |
Post subject: | Re: RE:Computer Science stuff |
Thanks for sharing your ideas on the questions. CodeMonkey2000 @ Thu Mar 20, 2008 5:37 pm wrote: Why did you make so many threads, and why are you asking us this?
If I put all of the questions on one thread, it makes it look long, thus people would not bother to read it. Thus, I try to make it look little shorter, making people want to read it. I'm asking this, because... umm... isn't this a computer science forum? |
Author: | JWHooper [ Thu Mar 20, 2008 9:11 pm ] |
Post subject: | Re: Another Computer Science stuff |
Quote: Also i am starting to get a bit consered that you are almost asking us to do your home work for you by posting all thess questions (even tho some have soultions). Your realy should be trying a bit harder to find the soultion on your own first (by looking in your text book or using google) befor posting. I personaly am trying to give you more tips and set you in the right direction rather then just given out anwsers, however if other users do then you will not learn much.
Well, I don't have computer science class in school, I just study them at home. I try to read the information on the textbook, but I guess I just needed a little help on it. But, I will try to use the google next time. |
Author: | btiffin [ Thu Mar 20, 2008 9:19 pm ] |
Post subject: | Re: Computer Science stuff |
Question 2 part 2 is not quite right. A Unicode character is not always necessarily 16 bits. UTF-8 for instance, holds ascii 0-127 in a byte and anything else in as many bytes as it takes to resolve the glyph. The byte to character count is encoding dependant. 16 bits would cover a Windows implementation perhaps, with UTF-16 but other encodings will vary. But I like how you got the last question bang on. The answer could also be stated as "powers of 2" Cheers, Brian |
Author: | md [ Thu Mar 20, 2008 9:23 pm ] |
Post subject: | Re: Computer Science stuff |
[quote="JWHooper @ 2008-03-20, 5:40 pm"]Okay, so these are the questions that came from my computer science textbook, and I answered them on my own, but the textbook does not give out the answers for these questions. I want to know if I answered these right. Any suggestions would be appreciated. 1. Suppose that only 50GB of your personal computer's 120GB hard-disk drive is empty. Would it be reasonable to use CDs to store all the material you have on the drive as a backup? What about DVDs? I answered: It would be reasonable to use CDs, because information is recorded in them by creating variations in their reflection surfaces. But, not really DVDs, because they usually work very well for multimedia and entire motion pictures. JWHooper @ 2008-03-20, 5:40 pm wrote: oper @ 2008-03-20, 5:40 pm"]2. How many bytes of storage space would be required to store a 400-page novel in which each page contains 3500 characters if ASCII were used? How many bytes would be required if Unicode were used?
I answered: 1 character in ASCII = 8 bits = 1 byte, 1 character in Unicode = 16 bits = 2 bytes (400)(3500) = 1400000 characters Thus, 1400000 bytes for ASCII, and 2800000 bytes for Unicode. Wrong. ASCII is actually a 7bit code; despite that all modern computers implement it as 8 bits. Futhermore UTF-8 is a strict superset of ASCII, as is a distinct part of the Unicode standard. Thus ASCII requires 7 bits per character and Unicode requires 8. JWHooper @ 2008-03-20, 5:40 pm wrote: 3. What values have binary representations in which only one of the bits is 1? List the binary representations for the smallest six values with this property. I answered: Possible binary representations: 0001, 0010, 0100, 1000, 10000, 100000 Therefore 1, 2, 4, 8, 16, and 32. Right! Also, next time don't make so many threads. One will do perfectly. |
Author: | JWHooper [ Thu Mar 20, 2008 9:24 pm ] |
Post subject: | Re: Computer Science stuff |
btiffin @ Thu Mar 20, 2008 6:19 pm wrote: Question 2 part 2 is not quite right. A Unicode character is not always necessarily 16 bits. UTF-8 for instance, holds ascii 0-127 in a byte and anything else in as many bytes as it takes to resolve the glyph. The byte to character count is encoding dependant.
16 bits would cover a Windows implementation perhaps, with UTF-16 but other encodings will vary. So, you're saying that a Unicode character can have a different values of bits? I was reading my computer science textbook few days ago, and I thought it says that Unicode takes about 16 bits per each symbol. But now, the UTF-8 thing just confuses me. Can you explain in more details? |
Author: | md [ Thu Mar 20, 2008 9:28 pm ] |
Post subject: | RE:Computer Science stuff |
Tada! Merged... and quite possibly broken |
Author: | md [ Thu Mar 20, 2008 9:30 pm ] |
Post subject: | RE:Computer Science stuff |
Unicode has three different encodings - UTF-8 which uses 8 bits and can represent all of ASCII plus 128 extended symbols, UTF-16 which is the basic encoding - it can represent basically everything, and UTF-32 (IIRC) which is not used. |
Author: | OneOffDriveByPoster [ Thu Mar 20, 2008 10:14 pm ] |
Post subject: | Re: RE:Computer Science stuff |
md @ Thu Mar 20, 2008 9:30 pm wrote: Unicode has three different encodings - UTF-8 which uses 8 bits and can represent all of ASCII plus 128 extended symbols, UTF-16 which is the basic encoding - it can represent basically everything, and UTF-32 (IIRC) which is not used. btiffin got the UTF-8 description I think. I think you, md, got UTF-8 mixed up with ISO-8859-1. |