Update
This commit is contained in:
parent
1bdfbe36f8
commit
e94761138d
14 changed files with 1778 additions and 1768 deletions
|
@ -187,7 +187,8 @@ Bear in mind the main purpose of this quiz is for you to test your understanding
|
|||
84. What does [GNU](gnu.md) (Richard Stallman's project) stand for?
|
||||
85. Is political correctness and censorship ever justified?
|
||||
86. Firstly convert the expression *x + (1 + 2) / (3 - 4)* to [postfix notation](postfix.md) (also reverse Polish notation). State some major advantages of postfix notation against infix notation. Now please state disadvantage of postfix notation, especially that which would be significant if we e.g. use it for expression such as *myFunc(x,y,myFunc2(z))*.
|
||||
87. Did you enjoy this quiz?
|
||||
87. What does the [demultiplexer](demultiplexer.md) logic circuit do? Give an example of when it's used. How is it related to [multiplexer](multiplexer.md)?
|
||||
88. Did you enjoy this quiz?
|
||||
|
||||
### Answers
|
||||
|
||||
|
@ -205,7 +206,7 @@ Bear in mind the main purpose of this quiz is for you to test your understanding
|
|||
12. third
|
||||
13. *2 * N*. We can multiply the greatest values: *(2^N - 1) * (2^N - 1) = 2^(2 * N) - 2^(N + 1) + 1*; The greatest term *2^(2 * N)* in binary is 1 with *2 * N* zeros after it, subtracting *(2^(N + 1) - 1)* will always definitely shorten this number by at least one bit (1000... minus anything non-zero will shorten the number). So at most we will need *2 * N* bits for the result, but we can't use fewer because for example 11 * 11 = 1001 -- in this case fewer than 2 * 2 = 4 bits wouldn't suffice. So in general we need *2 * N* bits.
|
||||
14. two (try it, see coin rotation paradox)
|
||||
15. Bills: 9 mm, Steve: 5 mm.
|
||||
15. Bill: 9 mm, Steve: 5 mm.
|
||||
16. [capitalism](capitalism.md)
|
||||
17. B00B5
|
||||
18. It's not because of the distance from the [Earth](earth.md), the force of gravity is practically the same there (from the Earth's perspective they're really not significantly far away, even the Moon still feels Earth's gravity very strongly so that it doesn't fly away). It's because they are orbiting the Earth, the path they are taking makes them constantly be in a kind of free fall while also preventing them from hitting the Earth (similarly to a comet who is kind of falling towards the Earth but just narrowly misses it, the orbital path of ISS is just much closer to being a circle than an ellipse). I.e. they feel the same kind of weightlessness you will feel in an elevator that's falling down.
|
||||
|
@ -277,7 +278,8 @@ Bear in mind the main purpose of this quiz is for you to test your understanding
|
|||
84. GNU is Not Unix.
|
||||
85. no
|
||||
86. *x 1 2 + 3 4 - / +*; Advantages are for example not needing brackets at all and simple parsing and evaluation, for example we don't have to care about operator precedence. Disadvantages may be e.g. lower readability; we also have to know each operator's arity because from postfix notation it can't be deduced -- with infix notation expression *myFunc(x,y,myFunc2(z))* it is clear that *myFunc* takes 3 arguments and *myFunc2* takes 1, but if we convert it to postfix notation, we get *x y z myFunc2 myFunc3*, from which it isn't clear how many arguments each function takes.
|
||||
87. yes
|
||||
87. It's a circuit that on its input takes data and output address -- a number from 0 to *N - 1* -- and that sends the data to one of *N* output ports (identified by the given address). It can be imagined like a switch that redirects an input stream to one of *N* output channels. Its use may be for example to redirect input data, for example audio, to one of several output devices, for example speakers, headphones and audio recorders. Multiplexer is a circuit that does the opposite (i.e. chooses input from *N* channels that is then sent to a single output channel).
|
||||
88. yes
|
||||
|
||||
## Other
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue