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