Alex Amado, HW3

pdf

School

Purdue University *

*We aren’t endorsed by this school

Course

10100

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

10

Uploaded by MinisterPartridge3587

Report
CS 10100 Homework 03 This is Question 1 on Page 1 CS 101 Homework 03 Due Thursday, 9/14, 11:59 pm Delete nothing from this file. Edit this file to add your typewritten answers to each question. When your answer includes a diagram make sure that it is clear and large enough to read. Ensure that your answer fits on the same page as its question. If you change the pagination of this file or if your complete answer to a question does not fit on the page with that question, then you may receive a lower score. Export your completed Word file to PDF. Upload your PDF file to Gradescope.com. It is your responsibility to upload this assignment to its correct place in Gradescope. You may upload multiple times. Your final upload will be scored. Use the download capability to check your upload. Uploading will be blocked after the due time (plus grace period). Max score = 10 points; 1 point per question. The above directions apply for all assignments uploaded to Gradescope. Why should your answer be on the same page with its question? Answer: Gradescope has been programmed to expect that your PDF file will have exactly one question and your entire answer to it on one page. This allows Gradescope to automatically find and display your answers to the instructional team for scoring. HW03 Q1. One bit can encode two patterns (the pattern 0 and the pattern 1). How many patterns can 5 bits encode? How many patterns can 2 bytes encode? 5 bits can encode 32 bits because 2 to the fifth power is 32. Finding how many patterns 2 bytes can encode is a little harder to determine. Firstly, since there are 8 bits in 1 byte, you have to times 8 by 2, since there are 2 bytes. Then, you have to put 2 raised to that number, so your equation would look like: 2^(2•8), which equals 2^16, which is equal to 65, 536 different values.
CS 10100 Homework 03 This is Question 2 on Page 2 HW03 Q2. Assume your computer stores integers using six-bit 2’s complement representation. a. What is the range of the integers your computer can represent? The computer would be able to store integers -32 through 31 b. What is representation of -10? 110110 c. What the representation of -31? 100001
CS 10100 Homework 03 This is Question 3 on Page 3 HW03 Q3. What is the binary result of the following arithmetic problems? a. 0111111 + 1010111 63 + 87 = 150 = 10010110 b. 111010 + 110110 58 + 54 = 112 = 1110000 c. 1100000 – 0011111 96 – 31 = 65 = 1000001
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CS 10100 Homework 03 This is Question 4 on Page 4 HW03 Q4. Uncle Bob wants to buy a new computer with a 1TB hard drive to store his movie collection. If each movie file is approximately 2GB in size, how many movies can Uncle Bob store on his new computer? If his storage is 1TB, and each file is 2GB in size, then he can hold 500 files. 1TB is equal to 1000GB, and 1000 divided by 2 is 500, so he can store 500 movies on his new computer.
CS 10100 Homework 03 This is Question 5 on Page 5 HW03 Q5. Each tweet on Twitter can have at most 300 characters, a username of at most 24 characters, and three integers (for number of likes, retweets, and comments). Assuming each character is ASCII, each integer is a 64-bit string, and knowing that for a traditional hard drive storage device, 1 GB is 10 9 bytes (in contrast to computer memory circuits where 1 GB is 2 30 bytes = 1.073741824 x 10 9 bytes), how many tweets can Twitter.com store on a 4 GB traditional hard drive? Each character is equal to one byte, so each tweet can have at most 324 bytes worth of characters (for the tweet itself and the username), and each integer is equal to 64 bits or 8 bytes. Therefore, the maximum size of a tweet on twitter is (8•3) + 324 bytes, or 348 bytes. If 1 GB is equal 10 9 bytes, and we are trying to find how many tweets 4GB can store, that means a 4GB hard drive can store 4•10 9 bytes. This means that a 4GB hard drive can store 1.149•10 7 tweets.
CS 10100 Homework 03 This is Question 6 on Page 6 HW03 Q6. Order the following from largest data size to smallest. You might write your answer on one line as “Smallest, <letter>, <letter>, <letter>, <letter>, Largest”. a. a 2000-song music library b. one 4K movie c. five computer science E-textbooks d. an Email from your professor smallest, d, c, a, b, largest
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CS 10100 Homework 03 This is Question 7 on Page 7 HW03 Q7. Your friend is considering buying a new phone with a possible lowest cost. And your friend wants to store 200 songs (assume that the average storage per song is 4MB), 10 2-hour SD movies (assume a movie is 1 GB), and 2000 photos (assume that the average storage per photo is 3MB). The options of the phone storage are 8GB, 16GB, 32GB, 64GB. Which phone storage should your friend choose? How much storage will your friend have left over after loading the songs, movies, and photos? I think that the friend should chose the 32GB storage option, because if you add everything up, 16.8GB of storage will be needed, so 32 will give my friend enough room, without having too much extra storage. If my friend opted for the 32GB storage option, he would have 15.2GB left after the songs, movies, and photos. My friend would not be able to get a phone with 8GB or 16Gb of storage, and 64GB would be unnecessary because it would give a lot of storage remaining.
CS 10100 Homework 03 This is Question 8 on Page 8 HW03 Q8. Your friend is using Microsoft Excel to do his accounting homework analyzing a company's revenue where Product A is 41% of total, Product B is 25% of total, and Product C is the remaining 34% of the total. While checking by hand your friend notices that the Excel sheet is off by 1 cent. Your friend is worried they need to get their computer checked because it cannot add dollars and cents. What would you tell your friend? I would tell my friend that there is probably no issue with the computer and it’s ability to calculate dollars and cents, and that the discrepancy of just 1 cent is more likely just due to a rounding error more than anything. The computer not accurately calculate 1 cent, is such a minor error, and it is not worth getting the computer checked out. On the other hand, if the computer could not calculate much larger amounts of money, I would then tell him to get his computer check out.
CS 10100 Homework 03 This is Question 9 on Page 9 HW03 Q9. One night at dinner your dad begins complaining about his DVR. He says that just a few years ago he had over 350 hours of TV recorded, but now his DVR is saying that it’s full and it’s only at 160 hours of recorded TV. Assuming the DVR is working correctly, what might explain the “reduction” in storage? How might your dad be able to tell which shows will take up more room? The reduction in storage in the DVR can be explained by increased size of TV shows and movies. The reduction is because the size of each show or movie has increased due to higher resolution and pixel quality. The storage size the DVR can hold has not changed, but instead the video files have grown substantially, due to inovations in video industry.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CS 10100 Homework 03 This is Question 10 on Page 10 HW03 Q10. Your friend is an author of novels, works of fiction literature that consist only of text (no sound, no images). Your friend needs a new computer to store their documents that will become books. The computer store clerk shows your friend two models of computer: one has a 2 GHz processor and the other has a more powerful 4 GHz processor. The clerk recommends the computer with the substantially more expensive 4 GHz processor. The clerk says that the extra processing power will help once your friend has stored many files and that the bigger processor has no downside at all. Which computer do you recommend to your friend? Is processor power related to storage? Will a 4 GHz processor really have “No downside”? Explain. I would recommend that my friend gets the computer with the 2Ghz processor. I think he would suffice from the 2GHz processor because not only is it less expensive than the 4GHz processor, but it would be perfectly fine for just text files. A processor is not related to storage, and in this case, my friend would benefit from getting a computer with a 2GHz processor, but also with larger storage options. A 4GHz processor does in fact have downsides, those being an increase in power being drawn from the laptop, which could cause the computer to have a shorter battery life and for it to get hotter.