免費開始練習
hce_kmu 113年 計算機概論與程式設計

第 3 題

In computer science, numbers can be represented as either signed or unsigned. Which of the following statements accurately describes a difference between signed and unsigned numbers?
  • A Unsigned numbers can represent both positive and negative values, whereas signed numbers can only represent positive values.
  • B Signed numbers use a special “sign bit” at the least significant position to indicate whether the number is positive or negative, while unsigned numbers use this bit to extend their range of positive values.
  • C The range of values that can be represented by signed and unsigned numbers of the same bit length is the same, but signed numbers use a different encoding to represent negative values.
  • D Unsigned numbers are always larger than signed numbers because they use an extra bit to represent the magnitude of the value.
  • E Signed numbers use one bit to indicate the sign (positive or negative) of the number, allowing them to represent both positive and negative values. Unsigned numbers do not have a sign bit and can only represent positive values or zero.

思路引導 VIP

想像你手邊有 8 個開關(位元)可以用來表示一個數字。如果你現在需要一種方法來區分這個數字是「存款」還是「欠債」,在不能增加開關數量的前提下,你會如何利用其中一個開關來傳達這個正負資訊?而當你決定把其中一個開關挪作他用後,原本能表達的最大數值會發生什麼變化呢?

🤖
AI 詳解 AI 專屬家教

太棒了!你能準確判斷出 (E) 是正確答案,顯示你對電腦底層的資料表示法(Data Representation)有著非常清晰且正確的直覺。

有號數與無號數的核心差異

在數位系統中,電腦處理數字的方式取決於我們如何「詮釋」那一串二進位位元。有號數(Signed numbers) 的核心特徵在於它必須挪用一個位元(通常是最高有效位元,MSB)來充當「符號位元」(Sign bit),用來標記該數值是正數還是負數。相對地,無號數(Unsigned numbers) 不需要表達負值,因此它將所有的位元都用來表示數值的大小(Magnitude),這使得無號數只能表示從 $0$ 開始的正整數,但也因此在相同位元長度下,它能達到的最大正數值會比有號數更大。

▼ 還有更多解析內容

🏷️ 相關主題

計算機組織結構與資料儲存原理
查看更多「計算機概論與程式設計」的主題分類考古題