CSC 340 - Assignment 1
CSC 340 - Assignment 1
Assignment 1
First Name
Last Name
ID#
Email Address
(please do not convert to other file formats e.g. PDF, ZIP, RAR, …).
Question 1:
In what ways are hardware and software different? In what ways are they the same?
Answer:
Hardware will ordinarily wear down over time; yet, software does not. We all
know software can have issues like glitches or performance bugs and require
trouble-shooting or updates.
Additionally, they both form the key important parts of a computer system.
Without them together, the computer system will not operate properly.
Finally, they both are reliant on each other to work correctly. That means
without hardware, software cannot run; and, without software there is no use for
hardware.
Question 2:
a) How many milliseconds (ms) are in 1 second?
b) How many microseconds (µs) are in 1 second?
c) How many nanoseconds (ns) are in 1 millisecond?
d) How many microseconds are in 1 millisecond?
e) How many nanoseconds are in 1 microsecond?
f) How many kilobytes (KB) are in 1 gigabyte (GB)?
g) How many kilobytes are in 1 megabyte (MB)?
h How many megabytes are in 1 gigabyte (GB)?
i) How many bytes are in 20 megabytes?
j) How many kilobytes are in 2 gigabytes?
Answer:
Question 3:
Briefly explain two breakthroughs in the history of computing.
Answer:
Even more incredible than Zuse’s design was the invention of the
“modern” personal computer. In 1958, Mr. Jack Kilby (from Texas
Instruments) invented the integrated circuit computer. It involved two
transistors together on a single silicon wafer. By using semiconductor
material, this design was smaller, faster and more reliable than before.
Question 4:
Suppose a transistor on an integrated circuit chip were 2 microns in size. According to
Moore's Law, how large would that transistor be in 2 years? How is Moore's law relevant to
programmers?
Answer:
Part 1:
Based on slide #20 of Week-1’s class lesson, Gordon Moore’s Law states:
“The density of transistors in an integrated circuit will double every year.”
This prediction is conveyed today to mean that the density of transistors will
shrink by a factor of 2 every 18 months or ~ about 2 years.
Part 2:
Moore’s law is relevant to programmers in that they use Moore’s law to predict
the changes in advancing technology and writing useful code.
Question 5:
In the von Neumann model, explain the purpose of the:
a) processing unit
b) program counter
Answer:
Question 6:
Under the von Neumann architecture, a program and its data are both stored in memory. It
is therefore possible for a program, thinking a memory location holds a piece of data when it
actually holds a program instruction, to accidentally (or on purpose) modify itself. What
implications does this present to you as a programmer?
Answer:
This presents a scenario for the programmer. It can and will be a challenge.
What do I mean? Well, modifying instruction will likely lead to a program
crashing. It could also mean that a “actual” instruction is built but executed to
lead to a significant error.
The bottom line here is that both of these scenarios might be very tough to
resolve. As a precaution, more focus and diligence has to be maintained when a
program and data are stored within the same physical location.
Question 7:
Explain why modern machines consist of multiple levels of virtual machines.
Answer:
Answer:
Question 9:
Explain what it means to “fetch” an instruction.
Answer:
The term “fetch” an instruction has a specific meaning. It means to read or load
the instruction from the nearby memory. In order for an instruction to be
executed, it has to first bet fetched. Fetching the instruction is “step 1.”
Now, a program counter controls the sequence of instructions. Then it will
communicate to the CPU on what specific instructions have to be fetched.
Question 10:
The technologist's notion of Moore's Law is that the number of transistors per chip doubles
approximately every 18 months. In the 1990s, Moore's Law started to be described as the
doubling of microprocessor power every 18 months. Given this new variation of Moore’s
Law, answer the following:
a) After successfully completing your computer organization and architecture class, you
have a brilliant idea for a new chip design that would make a processor six times faster
than the fastest ones on the market today. Unfortunately, it will take you four and a
half years to save the money, create the prototype, and build a finished product. If
Moore’s Law holds, should you spend your money developing and producing your chip
or invest in some other venture?
b) Suppose we have a problem that currently takes 100,000 hours of computer time using
current technology to solve. Which of the following would give us the solution first: (1)
Replace the algorithm used in the current solution by one that runs twice as fast and run
it on the current technology, or (2) Wait 3 years, assuming Moore’s law doubles the
performance of a computer every 18 months, and find the solution using the current
algorithm with the new technology?
Answer:
or…
<2> WaitTime + SolveTime= 3 years+ 100,00/4 hours
26280 hours+25000hours
51,280 hours
The solution is found more quickly with the new algorithm (Option
1).
The end