PHIL 發問時間: 社會與文化語言 · 1 0 年前

計算機概論問題 2題

1.What are the steps in the fetch-execute cycle?

2.What is the huffman encoding?

請用中文回答!!

感謝!!

1 個解答

評分
  • Sam
    Lv 5
    1 0 年前
    最佳解答

    1.What are the steps in the fetch-execute cycle?

    An instruction cycle (also called fetch-and-execute cycle, fetch-decode-execute cycle (FDX) is the time period during which a computer reads and processes a machine language instruction from its memory or the sequence of actions that the central processing unit (CPU) performs to execute each machine code instruction in a program.

    The name fetch-and-execute cycle is commonly used. The instruction must be fetched from main memory, and then executed by the CPU. This is fundamentally how a computer operates, with its CPU reading and executing a series of instructions written in its machine language. From this arise all functions of a computer familiar from the user's end.

    圖片參考:http://homepages.feis.herts.ac.uk/~msc_ice/fe2/pra...

    2.What is the huffman encoding?

    Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.

    圖片參考:http://upload.wikimedia.org/wikipedia/commons/thum...

    2008-04-15 15:47:49 補充:

    指令周期,又稱機器周期或讀取-執行周期(fetch-and-execute cycle)是指CPU要執行指令經過的步驟。

    取得指令:CPU內有程式計數器(PC),它儲存了下個要執行的指令的地址。處理器按PC儲存的地址,經主記憶體取得指令的內容,PC加1,經資料匯流排將指令存入指令暫存器(IR)。

    解碼指令:將IR內的指令譯成機器語言。

    執行指令

    儲存結果

    2008-04-15 15:50:25 補充:

    哈夫曼編碼(Huffman Coding)是一種編碼方式﹐以哈夫曼樹─即最優二叉樹﹐帶權路徑長度最小的二叉樹﹐經常應用於數據壓縮。

    在計算機信息處理中﹐“哈夫曼編碼”是一種一致性編碼法(又稱"熵編碼法")﹐用於數據的無損耗壓縮。這一術語是指使用一張特殊的編碼表將源字符(例如某文件中的一個符號)進行編碼。這張編碼表的特殊之處在於﹐它是根據每一個源字符出現的估算概率而建立起來的(出現概率高的字符使用較短的編碼﹐反之出現概率低的則使用較長的編碼﹐這便使編碼之後的字符串的平均期望長度降低﹐從而達到無損壓縮數據的目的)。

    參考資料: www.wikipedia.org; Google, Wikipedia; google, Wikipedia;google
還有問題?馬上發問,尋求解答。