Content
Overview of the book
- Encode information by binary code and relative operation
- Physical layer (electron to transistor) and combine them to form the more complicated device
- Combine these structure to von Neanamm machine (in this book: LC-3 aka. little computer 3)
- program in LC-3 using our own language
- program in LC-3 using assembly language
- program in LC-3 using data structure
- deal with the I/O in LC-3
- C/C++ language
Two core notion in this book
- The notion of abstraction
- Don't treat hardware and software sperately
Two very important ideas
- All computer can do the same things if enough memory is given
- Problem should be transformed for computers to solve
Exercise Solution
Made by myself. I'm not sure if it's correct.
1.1
- All computer can do the same things if enough memory is given
- Problem should be transformed for computers to solve
1.2
No, no matter what language you use. You can't express more than the ISA.
1.3
It's difficult to premote the precision.
1.4
maybe, yeah, It's maybe.
1.5
- a and x to the x-box, their output to the +-box with b.
- 4 +-box with ordered input w,x,y,z.then their output along with 1/4 to the x-box.
- One +-box with input a and b, then, their output to the x-box along with itself.
1.6
I do like him.
I do/ like him. I do what he does.
I do like/ him. I really like him and I can't lose him:(.
1.7
When there is only one airport in the city, it saves time.
When there are lots of airports and we don't want to the nearest airport. It cause negative consequences
1.8
- I use telescope to see the man in the park.
- I see a man in the park and he take a telescope with him.
It doesn't meet the property of definiteness
1.9
Yes, but it should be definiteness finteness and effective computability.
1.10
Finiteness : the process should end in the finite time.
Effect computablity : all the step of the process should be computable
Definiteness : the step should be describe in the precisious way.
1.11
Finiteness:
if you reach a, then go to b, if you reach b then go to a.
Effect computablity :
she is a girl
Definiteness :
select the best one in the candidate
1.12
a.not Definiteness
b.not finiteness
c.yes
d.no maybe infinite
e.yes
1.13
The same. Subtract = add and negetive
1.14
a.120
b.C++, x86, x86-microArch1,2,3
c.still the same
1.15
More readable but less efficient
1.16
opcode, oprand, address mode
1.17
ISA define the code and it's operation. Microarchitecture implement the opearation.
1.18
One, Infinite
1.19
Problem (Sort) ->Alogrithm (Quick Sort) ->Program (QuickSort.cpp) ->ISA (x86) ->microarchitechture (Intel i7-7700H) ->Logic circuit (.....) ->Device (......)
1.20
Yes. The above layer don't need know the details of the lying layer to work.
1.21
High-level language if we buy the source code, we need compile the source code to the real program we can use. If we just buy the software, we just buy the ISA code.
1.22
The first, It's always difficult to solve the problem :(.
1.23
When you update the hardware, we don't need to change our software.The higer layer of the ISA don't need to change, because the ISA works fine at the new microarchitechture.