Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.4 KB

20150127.md

File metadata and controls

30 lines (23 loc) · 1.4 KB

CS 251

Computer Organization and Design

1/20/2015

Elvin Yung

Data Representation and Manipulation - Part 2

  • Previously, we covered the two's complement numeral system (On 2015/01/24, I didn't go to class), which represents binary numbers such that the most significant bit represents a negative number. Then, for an n-bit binary number, a two's complement number can represent anything from -(2^(n-1)) to 2^(n-1) - 1.

Adders

Multiplication

Hexadecimal

  • Hexadecimal is a numeral system which is based on 16. The digits are 0123456789ABCDEF.
  • The advantage of hexadecimal is that each hex digit takes exactly four bits.

Representing Non-Integral Numbers

  • We can use scientific notation to represent floating point numbers.
  • There are two main parts to scientific notation: Sign, and significand (fraction, mantissa, exponent)
  • In normalized binary, the leading digit of the significand is always 1.

Floating-Point Representation

  • MIPS uses the IEEE 754 floating-point standard format.
  • It uses 1 bit to represent the sign, followed by 8 bits to represent the exponent, and 23 bits to represent the significand.
  • Exponent is stored in "biased" notation: most negative exponent is all 0s, most positive is all 1s.
  • "Biased notation stores a number N as an unsigned value N+B, where B is the bias. B is typically half the unsigned range, but doesn't have to be."