This is a an exam. You may consult your notes, any book, and the Internet. You may not speak with any person other than Jeff Ondich, electronically or otherwise, about the content of this exam. If you obtain relevant information from any source other than yourself, cite your sources clearly.
This exam was designed to produce short answers for each question, although the justification of your answers (showing your work, showing a diagram if relevant, etc.) is still important. With that in mind, your submission should have the following structure:
Some answers don't require much explanation. However, when you get an answer wrong, showing your work can lead to significant partial credit if your reasoning is sound but you made a small mistake.
(6 points)
(10 points) Character encoding in Python 3. (That's Python 3, not Python 2--they're quite different for this material.)
You might find the Unix command hexdump -C filename handy in this problem, just for checking to make sure your files look right.
Use a text editor to save a file (including some non-ASCII characters) in the UTF-8 encoding with no BOM. (This can be done with lots of text editors, like Atom, Brackets, Sublime, BBEdit, etc. But note that MS Word is not a text editor, and does not save just the text in a file--it saves lots of formatting information as well. Also watch out for editors like macOS's TextEdit, which want to default to saving in Rich Text Format (.rtf). That's also not what you want.)
What code would you use to open your saved file and read its contents into a variable of type str? (This can be done in one short line of code, or two if you are stylistically picky.)
(2 points) Please recommend a podcast or blog for me, or, if you prefer, tell me a joke. Thank you.
(10 points) Consider our favorite datapath, Figure 4.17.
(6 points) As you learned during the most recent homework assignment, any digital circuit has a propagation delay. For our purposes, propagation delay works like this. Imagine that all the inputs to the circuit become stable at time T1. There is, then, a minimum time T2 at which the outputs of the circuit are guaranteed to be stable for as long as the inputs remain stable. The propagation delay is the difference T2 - T1. (A circuit's propagation delay is dependent on its physical properties, and for our purposes, we're going to consider those properties a big mystery. Want to clear up the mystery? Talk to a physicist.)
Let's do a much simpler propagation exercise than #2 from the homework. Consider this circuit (a D flipflop): which contains two of these (D latches): Assume that NOR, AND, and NOT gates have propagation delays of 3ns, 4ns, and 2ns, respectively. Then what's the propagation delay of the flipflop?