CS251 - Computer Organization and Design - Spring 2008

Lecture 10 - Numbers


Practical Details

  1. Assignment 1, giving back.
  2. Assignment 2.
  3. Next Friday.
  4. Book sections, in order: 3.1 to 3.3, 2.5, B.5 (ignore verilog), 3.4, 3.6

SSRAM and SDRAM

The first `S' stands for synchronized.

DDR SDRAM

Double data rate


Numbers

Computers store and retrive data as words, which usually correspond to

The word length is usually the first decision a designer makes when designing a new CPU.

MIPS

The Word

  1. 32-bit word
  2. bits numbered 0, 1, ..., 31

The important issue is: how will we interpret these bits?

Bytes

Coded in ASCII

  1. 7 bits encode 128 characters

    8th bit usually used for parity

  2. Characters include

ASCII has served us well for thirty years, but may be on the way out

Characters coded as bytes will go with ASCII.

Unsigned numbers

abcdefghijklmnopqrstuvwxyzABCDEF, where each character is a binary bit means

Signed binary

The first idea was `signed-magnitude binary'.

  1. MSB is the sign
  2. numbers from -2^31 + 1 to 2^31-1.
  3. What if we add +5 to -5?

Two's complement

Interpret the MSB as -2^31 instead of 2^31. Then,

Negation

  1. Take an arbitrary two's complement number, y,
  2. Make a second two's complement number, x, by inverting all its bits
  3. Add them together
  4. y + x = -1 => -y = x + 1

Sign extension


Return to: