Engin112-F07-L03-numbers

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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
Background 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?
Background image of page 3

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

View Full DocumentRight 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
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/16/2008 for the course ENGIN 112 taught by Professor Ciesielski during the Spring '08 term at UMass (Amherst).

Page1 / 17

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

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online