n301/cs03numbers n301.tplt Notational conventions Decimal representation for numerical values using the 10 digits The 26 letters for textual information Sign/magnitude notation for signed numbers – numbers with a + or – sign Decimal notation for real numbers with a decimal point separating the whole number part from the fractional part Representation of information External representation
- the way humans understand information
- the way it is entered at a keyboard Internal representation
- the way it is stored in the memory of the computer
Computers Externally – computers use decimal digits, sign/magnitude notation and the alphabet But computers stores data, internally, using the binary numbering system Binary A base-2 positional numbering system The value of a digit depends not only on it absolute value but also on its specific position within a number Example: Base 10
3, 873 is (3*10^3) + (8*10^2) + (7*10^1) + (3*10^0) or
3000 + 800 + 70 + 3
Base-2 Same concept applies to base 2 Consists of two digits 0 and 1, referred to as bits Example: Base 2
111001 is
(1*2^5) + (1*2^4) + (1*2^3) + (0*2^2) + (0*2^1) + (1*2^0)
and evaluated to 32 + 16 + 8 + 0 + 0 + 1 = 57
Simple Table
2^82^72^62^52^42^32^22^12^0
2561286432168421
         
Converting Decimal to Binary Understanding how we get there by example Convert 67 to binary
- use the table as a tool for conversion