============================
= Lec-2-HW-1, Solution
= PP, chp1: 2, 3, 5, 10,  12a-d, 13, 18, 21-23
= PP, chp2: 28-29, 30be, 31-32, 33be
============================

1.2 No, all languages that are Turing complete are equivalent in the results they can 
produce. Turing complete is also called, universal.

1.3 Of course, digital machines are special cases of analog machines; so, 
it is not quite true that there is any inherent difference. However, the 
typical idea of an analog machine entails using some form of continuous 
physical process as the numerical operations. Analog computation has its 
advantages; however, any physical system has a finest precision of 
measurement, details below the smallest measurable scale cannot be detected. 
This can be overcome, but rearranging the calculation to accommodate 
higher-precision is more complex than restructuring computation on a 
digital machine to use more bits in its number representation and thereby 
increase its precision: a digital machine can be reprogrammed in software.

1.5
(a) Form (a X x) and use its output y to form (y + b).
(b) Form (w + x), (y + z) and feed their outputs to (* + * ) whose output 
feed to (0.25 X *).
(c) As the expressoin is equal to (a+b) X (a+b), split the output of 
(a + b) and feed both branches to (* X *). 
NB--Strictly speaking, (c) is not possible since there is no device to 
split an output.

1.10 Definite/unambiguous, step-wise effectively doable, guaranteed to 
terminate. Well, this is not precise, and in fact lots of  interesting 
thought could be spent trying to figure what these terms mean. Overall, 
these define (sort of) effectively computable. Also, what's a good name 
for something that lacks the termination condition?

1.12
(a) not definite, which row?
(b) lacks finiteness, how many primes?
(c) Hmm, probably, but how definite is "vector" and "so forth"?
(d) might get matching HH or TT indefinitely

1.13 A - B = A + (-B): equivalent machines.

1.18 One could say "usually one ISA per microarchitecture" and 
"often many microarchitectures per ISA". On the other hand, an ISA is 
almost always modified from one generation of processor to the next 
or from one maker to another. So we could perhaps say, "each microarchitecture 
defines its own ISA". Of course, plenty of effort goes into making 
sure the new version is backward compatible with previous versions of 
the ISA. So, maybe we could also say, "a single microarchitecture supports multple ISAs",

1.21 Most often, software we buy is in machine code; for instance, in the 
ISA of a MIPS processor or Intel x86 processor. Notice that we never need 
to compile the code we buy; so, the software is certainly not source code. 
One advantage for the software company is that machine code cannot be 
backwards engineered easily.

1.22 Every level has its unique challenges, so "hardest" might be difficult 
to pin down. I would say the most difficult is from problems to algorithms. 
There are many problems whose algorithmic solutions have eluded us.

1.23 The immense investment in software that has been made makes it very 
difficult to change ISAs in the market.