140 likes | 243 Views
Numbers and number systems. Lecture 2. Some material from the last lecture. Electronic computers represent information as voltage levels. To make the computer hardware simple and reliable, computers represent information in binary form.
E N D
Numbers and number systems Lecture 2
Some material from the last lecture • Electronic computers represent information as voltage levels. • To make the computer hardware simple and reliable, computers represent information in binary form. • example: voltages greater than 3V are interpreted as representing one value (called “1”), voltages less than 2V are interpreted as representing another value (called “0”). • In principle, could use more voltage levels. • example: 0 to .75V represents “0”, 1 to 1.75V represents “1”, 2 to 2.75V represents “2”, and so forth. • In practice, this is rarely done. • requires more complex circuits • circuits are more susceptible to noise, hence less reliable
5v 4v 3v 2v 1v 0v Undefined High Undefined High Low Low noise margin 3 V noise margin 1 V Some material from the last lecture • Computers, like all electronic systems, are affected by noise. • noise has various sources (nearby signal changes, thermal vibrations of molecules in semiconductor materials, . . . ) • in computers, noise can cause binary signals to be misinterpreted • The noise margin is the amountof noise that a system cantolerate and still correctlyidentify a logic high or low.
Radix number systems • Some number of positions and some number of symbols • The number of positions varies by context • The number of symbols is a property of the number system • Decimal -- 10 symbols • Binary -- 2 symbols • Octal -- 8 symbols • Hexadecimal -- 16 symbols
Start with whole numbers • Each position has a value • Each symbol has a value • Multiply the value of the symbol by the value of the position, then add • In decimal, 3874 means • 3 times 1,000 • plus 8 time 100 • plus 7 times 10 • plus 4 times 1
Decimal, binary, octal, hex • In decimal there are 10 symbols (0..9) and the value of each position is a power of 10. • 100 = 1 = value of the units position • 101 = 10 = value of next position to the left • etc. • In binary, there are 2 symbols, 0 and 1, and the value of each position is a power of 2. • In octal, 8 symbols, and powers of 8 • In hexadecimal, 16 symbols, and powers of 16
Most Significant digit Decimal Number: 378.4 Least Significant digit . is called the radix point 3 is the MSD 4 is the LSD
Least Significant bit Most Significant bit 110010012 = 127+ 126 + 123 + 120 = 201 Least Significant bit Most Significant bit 110010.012 = 125+ 124 + 121 + 12-2 = 50.25
K, M and G • 210 is referred as K (kilo) • 220 is referred as M (mega) • 230 is referred as G (giga)
Trinary Numbers Trinary number : 110010023 110010013 = 137+ 136 + 133 + 230 = 2945
Octal Numbers Octal number : 127.48 110010013 = 182+ 281 + 780 + 48-1 = 87.5
Hexadecimal Numbers Hexadecimal number :FA9H FA9H = 15162 + 10161 + 9160 = 4009
Things to do • Review from your class notes what we discussed today. • Conversions between Number Systems • Binary, octal and hexadecimal • Solve 1-6 before coming to the class