    Next: Fixed-Point Arithmetic (ธวฤ๊พฎฟ๔ลภ) Up: ALU Architecture (I) - Previous: ALU Architecture (I) -

## Number Systems (ฟ๔คฮษฝธฝ)

• the positional notation of an m-digit, base b number (bฟสฟ๔) is • its value is • the largest value that can be represented is bm-1
• Example: an 8-digit, base 2 (binary) number (0-255) • fixed-point numbers have the radix point (พฎฟ๔ลภ) at a specific position • Example: an 8-digit, base 2 (binary) fixed-point number • shifting a number one position to the left corresponds to multiplying the number by the base b

• shifting a number one position to the right corresponds to dividing the number by the base b

Example • overflow (ฅชกผฅะฅีฅํกผ) is always possible

• binary negative numbers are usually represented in 2's complement (2คฮสไฟ๔ทฯ) or 1's complement (1คฮสไฟ๔ทฯ), because arithmetic operations are easier; 2's complement is useful for calculations while 1's complement is easier to compute

 8-bit 2's complement 8-bit 1's complement Number Representation Number Representation 0 0 0 0 or 255 0 < x < 128 x 0 < x < 128 x 256-|x| 255-|x|

Examples (8-bit numbers)

 Decimal 2's Complement 1's Complement 37 00100101 00100101 -37 11011011 11011010    Next: Fixed-Point Arithmetic (ธวฤ๊พฎฟ๔ลภ) Up: ALU Architecture (I) - Previous: ALU Architecture (I) -
David Asano
2001-05-29