5 → is a symbol for an idea (the number 5)
312 → another symbol
300 + 10 + 2 = 312
we use base 10
1 1 0 1
x x x x
2^3 2^2 2^1 2^0
8 + 4 + 0 + 1 = 13
- all info on comp is stored using 1s and 0s
112.625
binary numbers
- but positions in an n bit ninary number: 2^n-1 2^n-2 ...2^0
- ex: 1101
floating-point numbers
- the real number 1234.56 can be represented as 1.23456e3
- (1.23456 x 10 ^3)
- in scientific notation, the numbers are normalized so only one digit appears to the left of the decimal point
- -0.00099 is represented as -9.9e-4 (-9.9 x 10^4)
floating point notation
- sign-bit, exponent, mantissa (fractional part)
IEEE double-precision floating-point representation (64 bits)
- sign bit (first bit)
- exponent (next 11 bits) is 110