ENGIN 112 Homework 1 Solutions PDF
Document Details
Uploaded by ThumbUpTonalism
2015
Tilman Wolf
Tags
Related
- 22618_Emerging_Trends_in_Computer_Engineering_&_Information_Technology_120421.pdf
- King Saud University Computer Engineering Department Homework 5 PDF
- CHED CMO 87-2017: Bachelor of Science in Computer Engineering PDF
- computer-engineering-drafting-and-design-modules.pdf
- Unit 1 - Basic Computer Engineering PDF
- Communication Fundamentals PDF
Summary
This document contains homework solutions for a computer engineering course (ENGIN 112). It includes various problems related to converting decimal numbers to binary, and binary to decimal, along with performing arithmetic operations on binary numbers.
Full Transcript
ENGIN 112 Homework 1 Please submit your answers on Gradescope via the course page on Canvas. You can write your answers electronically or by hand and submit a scan or photos. Note that you must submit a single PDF file on Gradescope. Question 1 Watch 10 minutes of your favorite movie or TV show tha...
ENGIN 112 Homework 1 Please submit your answers on Gradescope via the course page on Canvas. You can write your answers electronically or by hand and submit a scan or photos. Note that you must submit a single PDF file on Gradescope. Question 1 Watch 10 minutes of your favorite movie or TV show that takes place (roughly) in the current time (science fiction or historical shows are unsuitable for this assignment). Note what systems or devices related to Electrical and Computer Engineering (ECE) you can observe. Answer the following questions: a) What movie or TV show did you watch? b) List all the ECE systems you observed. c) For 5 of the ECE systems listed in (b), briefly describe their functionality (as far as you can guess). For example: “Thermostat: Measures room temperature and controls heating or cooling.” Solution: a) Monk b) Mobile phone (feature phone), computer, digital camera, high rise window cleaning system, TV, police radios c) i) Digital camera: It captures the light coming in from the objects, often captures partial scenes at a time and then it processes all the light to compose digital images. ii) High rise window cleaning system: A motor drives the ropes attached to the cart that goes up and down along the high rise building windows. It is controlled by a panel available to the workers in the cart. iii) TV: It receives the electromagnetic signals encoding video and audio traveling over the air or the cable, and then decodes them to produce video and audio. iv) Police radios: They record sound, convert it into electromagnetic waves for broadcasting. They also capture electromagnetic waves from other radios in their vicinity and decode them to produce sound. v) Mobile (feature) phone: It performs similar functions as to a police radio, however, the electromagnetic waves are not broadcast to everyone rather a tower cell which transmits sound and video over long distances. On the other end, a tower cell broadcasts the same electromagnetic waves for a specific user. © 2015–24 Tilman Wolf Question 2 Go to the website of a computer manufacturer (e.g., HP, Lenovo, etc.). Identify a low-end, middle-of-the-line, and high-end desktop/workstation computing system offered. (If the website requires customization to derive a complete system, choose appropriate custom options.) Create a table with a column for each system and the rows listed below that compare the specifications of each of these systems. Table rows: Manufacturer Model number Processor model Number of cores Processor clock speed Memory (RAM) size Storage (disk) size Graphics card model Price Solution: Specification Low End Computer Mid Range High end computer Computer Manufacturer Lenovo Lenovo Lenovo Model Number Legion Tower 5i Gen Legion Tower 5i Gen Legion Tower 7i Gen 8 with RTX 4060 8 (Intel) with RTX 8 (Intel) with RTX 4070 Super 4080 Super Processor Model 14th Generation 14th Generation 14th Generation Intel® Core™ i5- Intel® Core™ i7- Intel® Core™ i9- 14400F Processor 14700F Processor 14900KF Processor Number of cores 10 20 24 Processor clock E-cores up to 3.50 E-cores up to 4.20 E-cores up to 4.40 speed GHz P-cores up to GHz P-cores up to GHz P-cores up to 4.70 GHz 5.30 GHz 5.60 GHz Memory (RAM) size 16 GB 32 GB 32 GB Storage (Disk) size 1 TB SSD 1 TB SSD 2 TB SSD Graphics card NVIDIA® GeForce NVIDIA® GeForce NVIDIA® GeForce model RTX™ 4060 8GB RTX™ 4070 SUPER RTX™ 4080 SUPER GDDR6 12GB GDDR6X 16GB GDDR6X © 2015–24 Tilman Wolf Price $899.99 $1649.99 $2449.99 Question 3 Perform the following conversions and additions using decimal and binary numbers. Please show how you derive your answers (i.e., do not just type this into MATLAB and show the answer). a) Convert (211)10 into binary. b) Convert (1100010111)2 into decimal. c) Convert (104)10 and (92)10 into binary and perform an addition of these numbers in binary. Convert the result into decimal and verify the correctness of your addition. Optional question (no bonus—just for kicks): Repeat (c), but convert into hexadecimal (i.e., base 16) instead of binary. Solution a) © 2015–24 Tilman Wolf © 2015–24 Tilman Wolf Question 4 Assume you have a large collection of physical books and can store them on a large shelf. Your friends, who also like to read but do not have the same books as you, often come to you to borrow (and hopefully eventually return) books. a) When borrowing books, assume that your friends ask for a book with a specific title. How would you organize the books on your shelf so that you can find the requested title quickly? How would you search for the requested title in your collection based on the organization of the books you have chosen? © 2015–24 Tilman Wolf b) Assuming that you follow the process described in a), a friend one day asks you for all the books you have from one particular author. How would you go about finding those books? c) What improvements could you make to find the books in b) faster? What could you do if there were many other types of queries (e.g., all books from a specific genre, all books published in a particular year)? Solution: a) I would arrange the book in alphabetical order of their titles. To find the book, I would check the title in the middle of the shelf. If it does not match, I would check if the title is on the left or the right half of the shelf (check if the title, I am looking for, comes before the title at the middle of the shelf when they are arranged alphabetically). Assuming it is in the left half of the shelf, I would check the title in the middle of the left half of the shelf (not at the center of the whole shelf), if it does not I would see if it should be in the left or the right half of this section of the shelf. I would repeat these steps until I found the book. b) Since the books are not sorted by the author names, I would check all the books from left to right and check their author names. c) To find the books in b) faster, I would arrange books in alphabetical order of their author names. Furthermore, for each author I would sort books alphabetically using their title. This would allow me to use methods described in a) to b) as well. To support faster search using other categories such as genre, I would categorize books into their genre alphabetically and then sort by author names and titles. Question 5 Assume you try to solve a sorting problem with a computer. You have Program A, which is an implementation of an O(n2) algorithm that takes on average 0.15s to sort a data set with 1,000 items. You also have Program B, which his an implementation of an O(n log n) algorithm that takes on average 0.4s to sort a data set with 1,000 items. Assume that the running times of programs increase exactly proportional to their complexity (i.e., an O(n) algorithm requires 2× the running time if the problem size is 2×; an O(n2) algorithm requires 4× the running time if the problem size is 2×; for logarithms, please use base 10 (i.e., log10)). a) How long does it take to run Programs A and B for a data set of size 2,000? b) How long does it take to run Programs A and B for a data set of size 10,000? c) Which program do you think is the better choice in practice? © 2015–24 Tilman Wolf Solution © 2015–24 Tilman Wolf c) For smaller input sizes (