編碼:隱匿在計算機軟硬體背後的語言(勘誤)

2020-08-12 23:29:35

版權宣告:本文基於cainiao_23333的原創文章、參照Charles Petzold 的英文原版及英文原版的官方勘誤,修改整理,遵循 CC 4.0 BY-SA 版權協定,轉載請附上下面 下麪的出處鏈接和本宣告。

本文鏈接:https://blog.csdn.net/cg1985cg/article/details/107959696

cainiao_23333原文鏈接:https://blog.csdn.net/weixin_41876385/article/details/99736268

 

《編碼:隱匿在計算機軟硬體背後的語言》勘誤

版次:2012年10月第1版
印次:2020年4月第25次印刷


P73    第4行    享改爲亨
P105    倒數第2行 W上面少一個橫線
P167    第12行    非或門改爲或非門
P167    第13行    Q反改爲Q非
P177    倒數第6行,原英文版Page 171: Just below the center of the page, the sentence "The outputs of the second stage are inputs to the first stage." should read "The outputs of the first stage are inputs to the second stage." Thanks to Jonathan Gold for reporting this error.根據這一點,中文版的這個地方,也應該改爲:第一級R-S觸發器的輸出是第二級的輸入
P178    第1行,與英文原文意思不同,這樣翻譯更好:這改變了第一級觸發器的狀態,因爲(在第一級裡使用的)取反的時鐘輸入爲1。但是第二級觸發器狀態不變,因爲它使用的是未取反的時鐘輸入0。
英文原文:This changes the first flip-flop stage because the inverted Clock inputs is 1. But the second stage remains unchanged because the uninverted Clock input is 0.
P194    第5行     除數改爲被除數(注:事實上,255用16進製表示是FF,所以0-255數位除以16,商作爲高位,餘數作爲低位即可得到2位16進位制數位,書上這句話完全可以刪去,參看英文原版,作者並沒有這句話,應該是翻譯作者自己加上的)
英文原文:To calculate those two digits, divide the number by 16 to get the quotient and the remainder. Let's use an earlier example—the decimal number 182.
P198    倒數第5行,之後前面應該加上否則
英文原文:Further changes to the Data input don't affect the outputs until the Clock input goes to 1 again.
P222    倒數第9行,做完了這些工作,算得上萬事俱備只欠東風了……其實英文原版中沒有這個「萬事俱備只欠東風」,譯者加上後會讓人覺得事情剛準備好還沒有開始做,而其實這時只剩下最後一步「讓加法器停下來就可以了」,因此這句可以去掉,實在要改可以改爲「基本上算是大功告成了」。
英文原文:And after everything is done, we want the automated adder to simply stop so that the contents of the RAM array can be examined.
P231    表的倒數第2行的Subtract的c和t之間多了一個空格
P234    倒數第5行,TANSTAAFL,天下沒有免費的午餐,英文原文說是There Ain't No Such Thing As A Free Lunch. 懷疑英文原文也有問題,正確符合語法的表示應該是:There's no such thing as a free lunch。
P244    第3行,「這個位元組與地址001Eh儲存的值相加,所得的值恰巧是Halt指令,但同時它也是一個有效的數位」,這句話應該翻譯爲:「我們將再拿這個位元組與地址001Eh儲存的值相加。001Eh裡恰好是Halt指令,不過它也是一個有效的數位。」如果用原翻譯,會以爲加起來的值恰巧是Halt指令,容易讓人產生誤解。
英文原文:This byte is added to the value at location 001Eh. This happends to be the Halt instruction, but of course it's also a valid number.
P259    倒數第2段最後一句,沒有大毛病,爲了跟原文意思更接近,也更容易理解,可以加一個字,改爲:「雖然繼電器計算機被稱爲電動機械計算機,但真空管是第一臺電子計算機的基礎。」
英文原文:While relay machinese were known as electromechanical computers, vacuum tubes were the basis of the first electornic computers.
P261    倒數第2段,講香農的,「一片題爲……」,應該是「一篇題爲……」。
P266    第5行,Geoffrey Dummer,應該翻譯爲:傑弗裡,不是傑裡佛。
P271    第2行,「只不過此處我用的是互斥或門」,應改爲「只不過那裏我用的是或非門」。
英文原文:except that I used NOR gates.
P280    倒數第3行,多了一個逗號
P349    倒數第5行,下畫線改爲下劃線
P355    最後1行中間0D 0A 33 30 39 31 31 0D 0A(原來第一個31位元置錯寫成3)
P361    第3-4行翻譯有問題,改爲:QDOS最終更名爲86-DOS,並由微軟公司授權。
英文原文:QDOS was eventually renamed 86-DOS and licensed by Microsoft Corporation.
P390    倒數第2行,將for語句會一次爲a賦值中的一次改爲依次
//下面 下麪一處錯誤爲cainiao_23333原文中提及,2020年4月第25次印刷版本中沒有出現
//P390    第2行JEPG應改爲JPEG   注:JPEG是Joint Photographic Experts Group(聯合影象專家組)的縮寫
P417    第3行MPEG 應爲 Moving Picture Experts Group(該組織官方網址 https://mpeg.chiariglione.org/)

參考資料:

英文原版的勘誤:https://www.charlespetzold.com/code/

Errata - Hardcover Edition

Page 28: The inventor of the battery was Count Alessandro Volta, not Volto. Thanks to Larry Smith for reporting this error.

Page 53: The second sentence should read "Follow down and across to get the sum." Thanks to Noor-Allah Noorani for reporting this error.

Page 63: The last plus sign on the page should not be there. Thanks to Noël Verhoeven for reporting this error.

Page 146: Under the line that begins with "Step 1," the first number in the subtraction should be all 1's like this:

            11111111
          - 10110000
          ----------
            01001111

Thanks to Michael Broschat for reporting this error.

Page 167: The Q-bar in the function table should be Q. The table should be identical to the one on 191, like this:

 

Inputs Output
D Clk Q
0 1 0
1 1 1
X 0 Q

Thanks to Jonathan Gold for reporting this error.

Pages 167 and 191: Actually, the function tables on pages 167 and 191 should probably show both outputs:

 

Inputs Outputs
D Clk Q Q-bar
0 1 0 1
1 1 1 0
X 0 Q Q-bar

Page 171: Just below the center of the page, the sentence "The outputs of the second stage are inputs to the first stage." should read "The outputs of the first stage are inputs to the second stage." Thanks to Jonathan Gold for reporting this error.

Page 197: In the bottom paragraph, S1 should actually have a bar over the S. Thanks to Jonathan Gold for reporting this error.

Page 264: In the third paragraph, last sentence, the statement "aaaa indicates a 32-bit memory address" should read "aaaa indicates a 16-bit memory address." Thanks to Luis Alonso Ramos for reporting this error.

Page 271: The two lines of code towards the bottom of the page that use MOV instructions should instead use MVI instructions:

          MVI A,27h
          MVI B,94h
          ADD A,B

Page 272: The last full paragraph on the page should read "The shift instructions come in handy when you're multiplying a number by 2 (that's a shift left) or dividing a number by 2 (a shift right). Thanks to Thomas Schaefer for reporting this error.

Page 279: In the first two lines of code, the MOV instructions should be MVI instructions:

          MVI A,25h
          MVI B,12h
          CALL Multiply

Thanks to Erik Larismaa for reporting this error.

Page 291: The headings in the second table should be ASCII Figure rather than Baudot Figure. Thanks to Thomas Schaefer for reporting this error.

Page 308: In third full paragraph below the diagram, the sentence "The data output signal of the 2102 chip goes into this third state when the CS-bar input is 0." should be "when the CS-bar input is 1. Thanks to Erik Larismaa for reporting this error.

Page 322: In the code examples, the CMP instruction should be CPI. The two ADD instructions should be ADI. The AND instruction should be ANI. That ANI instruction should actually be the first instruction of the NibbleToAscii subroutine. Thanks to Erik Larismaa for reporting these errors.

Page 331: In the code examples, the three MOV instructions should be MVI. Thanks to Erik Larismaa for reporting this error.

Page 343: In the formula in the second bulleted item, the exponent of the 2 should be -126 rather than -127:

  • (-1)s × 0.f × 2-126

Thanks to Erik Larismaa for reporting this error.

Page 347: In the third paragraph, first sentence, the phrase "uses many of the same signals as the 8086 and 8087 chips" should read "uses many of the same signals as the 8086 and 8088 chips." Thanks to Demian Johnston for reporting this error.

Page 356: In the last full paragraph on the page, the statement "While ALGOL uses a slash (/) for mulitplication" should, of course, read "While ALGOL uses a slash (/) for division." Thanks to Larry Smith for reporting this error.

 

Ambiguities and Clarifications

Page 6: In the second full paragraph, the last sentence is: "The receiver sees the short blink and the long blink and knows it's an A." Actually, the receiver doesn't know what letter is being sent until the pause that indicates the end of the letter. Thanks to Larry Smith for reporting this flaw.

Page 7: In the first paragraph I state: "SOS isn't an abbreviation for anything -- it's simply an easy-to-remember Morse code sequence." Many people are under the mistaken impression that SOS stands for "Save Our Ship" or "Save Our Souls." However, this meaning appears to be spurious; I can find no evidence that the letters SOS were chosen to stand for anything. For example, the Oxford English Dictionary, 2nd edition, volume XVI, page 34 says of SOS: "The letters so, and s, chosen because easily transmitted in Morse code."

Chapter 3: The discussion of Braille was not meant to be exhaustive. In particular, Grade 2 Braille also includes 76 short-form words, such as "imm" for "immediate". These include "ab" for "about" (so it would require only two symbols rather than the 4 shown on page 19) and "Brl" for "Braille," implicitly including a capital. The example of Louis Braille's name in Braille would thus require only 3 symbols for the last name rather than the 8 shown on page 20. Thanks to Ed Godfrey for this information.

Page 26: The first paragraph indicates that the negative terminal of a battery is called an anode and the positive terminal is called the cathode. Some readers have questioned whether this is correct, since it seems opposite from other uses of the words anode and cathode. The terminology used in Code was taken from:

Linden, David, ed. Handbook of Batteries, 2nd edition. New York, NY: McGraw-Hill, Inc., 1995, page 1.3.

The perspective inside the battery corresponds more closely to other uses of the words.

Page 29: The penultimate paragraph contains the statement "the current (I) is 1.5 divided by a large number." The current is not 1.5. The voltage is. The statement might be better written as: "the current (I) equals 1.5 volts divided by a large number." Thanks to Habib Heydarian for reporting this ambiguity.

Page 49: In the last paragraph the statement occurs: "when adding two Roman numerals, you simply combine all the symbols from both numbers and then simplify the result using just a few rules." The passage should have mentioned that this only works well when Roman numerals are written without using the subtraction principle, for example, without using IV to mean 4. The subtraction principle was a comparatively modern enhancement to Roman numeration. Thanks to Larry Smith for reporting this omission.

Page 284: The last paragraph states: "The x86 family continued in 1985 with the 32-bit 386 chip, in 1989 with the 486, and beginning in 1993, with the Intel Pentium line..." Somehow the 186 and 286 were omitted. The sentence should begin: "The x86 family continued in 1982 with the 186 and 286 chips, in 1985 with the 32-bit 386 chip..." Thanks to Luis Alonso Ramos and Larry Smith for reporting these omissions.

Page 343: About a third of the way down the page appears the statement "If e equals 255 and f equals 0, the number is positive or negative infinity, depending on the sign s." This statement implies that infinity is a number, which it is not. The statement might be better phrased "If eequals 255 and f equals 0, the value is positive or negative infinity, depending on the sign s." Thanks to Jonathan Gold for pointing this out.

Page 355: In the last full paragraph, the sentence occurs: "The print statement -- like many ALGOL statements (but not begin or end) -- must be followed by a semicolon." Actually, a semicolon is not required before the end statement, although it doesn't hurt to have one. Thanks to Larry Smith for clarifying this.

Page 382: The first paragraph contains the sentence: "Java programs must be compiled, but the result of the compilation isn't machine code. It's instead Java byte codes." That's the usual case. However, Java source code can be compiled into machine code if a platform-independent binary is not required. Thanks to Larry Smith for clarifying this.