View
250
Download
10
Embed Size (px)
Citation preview
電腦的基本單位• 類比訊號 (analog signal) 指的是連續的訊號• 數位訊號 (digital signal) 指的是以預先定義的符號表示不連續
的訊號
10001010one bit
8 bits=one byte
• 電腦裡的所有資料,包括文字、數據、影像、音訊、視訊,都是用二進位來表示的。
數字系統• 二進位系統 (binary system)• 八進位系統 (octal system)• 十六進位系統 (hexadecimal system)
二進位
十進位
binary to decimal
decimal to binary
• 實數 (real numbers)
1/2 1/4 1/8
decimalx2 x2 x2
another example:
Normalization
數值表示法 負數表示法• 帶符號大小 (signed-magnitude)
• 1’s 補數 (1’s complement)
• 2’s 補數 (2’s complement)
方便邏輯運數,但有兩種 0 的表示法。
實際在電腦所採用的表示法 :
整數 (Integer)
• 浮點數表示 (floating point representation) IEEE format
sign bit exponent (-127~128)
mantissa
32 bits
64 bits
=exponent + 127
=exponent+1023
How does a single precision computer store this normalized number:
+ 6+127 01000111001
other examples:
文字表示法• ASCII
• ASCII-8
• EBCDIC
• 中文編碼系統• Unicode
http://web.cs.mun.ca/~michael/c/ascii-table.html
Logical operations
• the most fundamental operations are:
• all calculations can be done by combinations of these operators.