{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Engin112-F07-L03-numbers

Engin112-F07-L03-numbers - Engin112 Lectures 3,4 Number...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Maciej Ciesielski Department of Electrical and Computer Engineering 09/10/2007 Engin112 – Lectures 3,4 Number Systems Engin112 – 09/10/2007 2 Digital Systems Digital systems operate on discrete elements of information y Numbers (e.g., pocket calculator) -> “digits” -> “digital” y Letters (e.g., word processor) y Pictures (e.g., digital cameras) For a digital systems to operate on a continuous data, it needs to quantize (digitize) that data first y Covert data into digital representation Topics: y How are numbers represented in digital systems y How computer performs basic arithmetic operations
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Engin112 – 09/10/2007 3 Numbers Numbers in base 10 y Ten different digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 y Number is represented by a sequence of digits: a n a n-1 … a 1 a 0 y Value of number is: a n × 10 n +a n-1 ×10 n-1 +…+a 1 ×10 1 +a 0 ×10 0 Common numbering system is “base10” Why? Positional notation y General equation: y May contain a decimal point y Negative index for digits after decimal point × i i i a 10 Examples y 1234.56 – if ambiguous, write (1234.56) 10 y Leading zeros cause no problems: 00001234.56 Engin112 – 09/10/2007 4 Number Systems General form, with base r : Base r is also called radix y In decimal system r = 10; in binary r = 2 Coefficients in positional notation are: 0,1,…, r-1 . What is the range of values of an n -bit number in radix r ? y Minimum value: 0 y Maximum value: r n -1 y Number of different values: r n × i i i r a
Image of page 2
3 Engin112 – 09/10/2007 5 Binary Numbers Base 2 number use only two digits: 0, 1 y Why? Digits need to be represented in a system y Electronic systems typically use voltage levels y Representing 10 different voltages reliably is difficult y Binary decision is much easier (On, Off) Binary representation is ideal y Minimal number of digits y Easily represented in voltages Catch: humans require training Engin112 – 09/10/2007 6 Examples for Binary Numbers What value is represented by (01001) 2 ? y Leading zero makes no difference y (1001) 2 translates into 1×2 3 +0×2 2 +0×2 1 +1×2 0 =8+0+0+1=(9) 10 Same process for numbers with decimal point y What is the value of (1001.1001) 2 ? y (1001.1001) 2 = 1×2 3 +0×2 2 +0×2 1 +1×2 0 +1×2 -1 +0×2 -2 +0×2 -3 +1×2 -4 = 8+0+0+1+1/2+0+0+1/16=(9.5625) 10 y Important: it’s NOT (9.9) 10 ! Can you count binary? y How far can you count with 10 fingers?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Engin112 – 09/10/2007 7 Binary Number Terminology Base is also called “radix” Binary numbers are made of b inary digit s ( bit s ) Groups of four bits are called “nibbles” y E.g., (1101) 2 Groups of eight bits are called “bytes” y E.g., (01001101) 2 What is the range of values of an n -bit binary number? y Minimum value: 0 y Maximum value: 2 n -1 y Number of different values: 2 n Powers of 2 are important in ECE Engin112 – 09/10/2007 8 Powers of 2 You must memorize all powers of 2 up to 2 16 ! Other important powers of 2: Trick to simplify estimation: y 2 10 =1024 1000=10 3 y Example: 2 32 =4×2 30 4×10 9 =4 billion Prefixes: y kilo (10 3 2 10 ), Mega (10 6 2 20 ), Giga (10 9 2 30 ), Tera (10 12 2 40 ), … y In computer systems typically based on powers of 2 65536 32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 18446744073709551616 4294967296 16777216 65536 256 64 32 24 16 8
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern