Presentation is loading. Please wait.

Presentation is loading. Please wait.

電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號

Similar presentations


Presentation on theme: "電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號"— Presentation transcript:

1 電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
數位訊號 (digital signal) 指的是以預先定義的符號表示不連續的訊號 one bit 電腦裡的所有資料,包括文字、數據、影像、音訊、視訊,都是用二進位來表示的。 8 bits=one byte

2

3 數字系統 二進位系統 (binary system) 八進位系統 (octal system)
十六進位系統 (hexadecimal system)

4 十進位 二進位

5 馬雅人 (Maya) 的二十進位數字系统

6 binary to decimal decimal to binary

7 由於對人的閱讀來說, 二進位的數是因難的, 且容易出錯, 所以電腦的輸出常常會以八進位或十六進位來代替:
binary to octal (二進位換八進位): 5 5 = 558 binary to hexadecimal (二進位換十六進位): 2 D = 2D16 (2DH or 2Dh)

8 數值表示法 負數表示法 整數 (Integer) 使用第八個位元來表示負數 帶符號大小 (signed-magnitude)
1’s補數 (1’s complement) 負數是正數的相反 (inverse) 優點: 最左邊的位元可判定正負。 缺點: 有兩種 0 的表示法。 優點: 最左邊的位元可判定正負 負數是正數的相反, 所以相加為 0, i.e. +2-2=0 缺點: 有兩種 0 的表示法。

9 2’s補數 (2’s complement) 負數是1’s complement + 1 實際在電腦所採用的表示法
優點: 最左邊的位元可判定正負 加減可用簡單的邏輯運數達成. 只有一個 0 的表示法. 實際在電腦所採用的表示法

10 加法 減法 AND XOR 乘法 除法 AND

11 Logical operations the most fundamental operations are:
all calculations can be done by combinations of these operators.

12 Equivalent in NAND gates
Logical gate symbols Gate Equivalent in NAND gates NOT                                                                                         AND                                                                              OR NOR                                                                                                           NAND gate (Not AND) Input A Input B Output Q 1

13 Original logic system All logic system can be redesigned to use only NAND gates. Replaced by NAND gates X redundant NOT gate pairs Final logic system

14 Logic gates operations
OR AND NAND XOR

15 Addition of two bits XOR Sum (總和) XOR AND AND OR Carry (進位) A B CIN S
  COUT   1

16 實數 (real numbers) decimal x2 x2 x2 1/2 1/4 1/8 try: 0.312510 = 0.01012
1/ / /8 try: = = … try: = = another example: Normalization

17 sign bit exponent (-127~128) mantissa
浮點數表示 (floating point representation) IEEE format sign bit exponent (-127~128) mantissa =exponent + 127 32 bits 單精準 =exponent+1023 64 bits 雙精準

18 How does a single precision computer store this normalized number:
= + 6+127 other examples:

19 文字表示法 ASCII (7 bits) ASCII-8 (8 bits) EBCDIC 中文編碼系統-BIG5 Unicode

20 中文編碼系統-BIG5 16 bits 共定義了13659 個中文字


Download ppt "電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號"

Similar presentations


Ads by Google