1 / 70

CHAPTER 1: Number Systems and Codes

CHAPTER 1: Number Systems and Codes. Introduction.

jirene
Download Presentation

CHAPTER 1: Number Systems and Codes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CHAPTER 1: Number Systems and Codes

  2. Introduction Digital circuits, processing discrete information, are found in an astonishingly wide rang of electronic systems. They have provided system designers with more functions contained in less space, thereby improving system reliability and increasing speed. Digital systems operate on numbers that represent some real logical or arithmetic function. It is the designer’s task to establish the relationship between the numbers and the task being performed. This chapter develops the use of numbers and how they represent real world conditions in digital system.

  3. 1.1 Digital and Analog: Basic Concepts • Continuous: Without breaks, smooth, no interruptions; a range of values forming a line or curve without gaps or discontinuities • Discrete: Broken down into pieces; opposite of continuous; a single part or point that can unambiguously be defined

  4. 1.1 Digital and Analog: Basic Concepts

  5. 1.1 Digital and Analog: Basic Concepts • Analog: Refer to something that is analogous, has a likeness, or is similar to something else. Analog electronic signals are continuous, whereas voltage(电压), current(电流), or some other electrical parameter is used to represent a physical parameter. For instance, voltage changes may represent changes in temperature. • Digital: Refer to digits or numbers in any radix; digital electronics usually involves binary or base-2 number systems. Digital signals are discrete, not continuous

  6. 1.1 Digital and Analog: Basic Concepts Vc(0)=0V, Initial voltage at t0 is 0V Vc=Va(1-e-t/RC)

  7. 1.1 Digital and Analog: Basic Concepts Discrete voltage values for time interval (a) Analog representation (b) Discrete representation

  8. 1.1 Digital and Analog: Basic Concepts Analog volt meter Digital volt meter

  9. Analog VS Digital

  10. Analog VS Digital • Digital Circuits over Analog Ones: -- Reproducibility of Results -- Ease of design, Flexibility and Functionality -- Programmability -- Speed, Economy and Steadily Advancing Technology

  11. 1.2 Digital Systems Overview

  12. 1.2 Digital Systems Overview SSI (small-scale integration) contains 0-9 gates MSI (medium-scale integration) contains 10-99gates LSI (large-scale integration) contains 100 or more gates VLSI (very large-scale integration ) contains more than 1000 gates

  13. 1.2 Digital Systems Overview

  14. 1.2 Digital Systems Overview

  15. 1.2 Digital Systems Overview

  16. 1.2 Digital Systems Overview

  17. 1.2 Digital Systems Overview

  18. 1.2 Digital Systems Overview

  19. 1.2 Digital Systems Overview

  20. 1.2 Digital Systems Overview

  21. 1.2 Digital Systems Overview

  22. 1.2 Digital Systems Overview

  23. 1.2 Digital Systems Overview

  24. 1.2 Digital Systems Overview

  25. Konica Minolta Magicolor 1650EN Printer ARM11 Processor Zoran Corporation Quatro 4230 Processor Amazon Kindle2 e-book reader ARM PoweredFreescale Nintendo DSi ARM9 and ARM7 Processors Zeebo Console ARM11 Processor and ARM9 Processor Qualcomm Palm Pre ARM Cortex A8 Texas Instruments OMAP3430 APSI M-480 PMP ARM11 Processor TI OMAP2530 Dual-Core CPU HP mv5150 Media Vault Pro ARM9 Processorr Marvell Orion (88F5182-A2) Processor Dell Latitude E4200 Notebook ARM Cortex M3 Broadcom BCM5880 iRiver Wave Home (Multimedia Communicator) ARM Powered TeleNav Shotgun ARM926 Processor SiRF Atlas III Kangaroo TV ARM926EJ-s Freescale i.MX21 Processor Parrot : Zikmu Wireless speakers by Philppe Starck ARM926 Processor Samsung LN40A750 40-Inch 1080p DLNA LCD HDTV ARM Powered

  26. 1.3 Introduction to Number System • Digital systems represented information in a discrete form, and Number systems provide the means of quantifying information for processing by digital system. • Positional Number Systems • Number system conversion • Binary Codes • Arithmetic

  27. Weight Number Systems - Decimal • “base” 10 (radix is 10) • 10 digits: 0..9 536.15910=(5×102)+(3×101)+(6×100)+(1×10-1)+(5×10-2)+(9×10-3) Radix or Base

  28. Number Systems – Decimal (cont.) • In general, a decimal number with n digits to the left of the decimal point, and m digits to the right of the decimal point is written as: An-1 An-2 … A1 A0 . A-1 A-2 … A-m+1 A-m where Ai is a coefficient between 0..9, and i denotes the weight (=10i) of Ai.

  29. Number Systems – General • “base” r (radix r) • r digits • N = An-1 ×rn-1 + An-2 ×rn-2 +… + A1 ×r +A0 + A-1 ×r-1 + A-2 ×r-2 +… + A-m ×r-m Least Significant Bit (LSB) Most Significant Bit (MSB)

  30. Positional Number Systems Let r=radix or base of a number system; Let c=character from the character set of the radix; Let N=number to be represented in radix; Let n=the number of digits in the integer portion of N Let m=the number of digits in the fractional portion of N (N)r=(cn-1rn-1+cn-2rn-2+…+c1r1+c0r0+c-1r-1+c-2r-2+…+c-mr-m) (N)r= ciri

  31. Number Systems – General (cont.) • e.g. let r = 6 (312.4)6= 3 × 62 + 1 ×61 + 1 ×60 + 4 ×6-1 = (116.66)10 • Conversion from n-radix (any system with radix n) to decimal follows similar process as above

  32. Number Systems (cont.) • Most common number systems for computers: • Binary (r = 2) • Octal (r = 8) • Hexadecimal (r = 16)

  33. Binary Numbers--Base 2 • Computers represent all data as “strings of bits”, each bit being either 0 or 1 • “base” 2, with 2 digits: 0 and1 e.g. (101101.10)2 = 1×25 + 0×24 + 1×23 + 1×22 + 0×21 + 1×20 + 1×2-1 + 0×2-2 (in decimal) = 32 + 0 + 8 + 4 + 0 + 1 + ½ + 0 = (45.5)10

  34. Powers of two Memorize at least through 216

  35. Octal Numbers--Base 8 • “base” 8 • with 8 digits: 0..7 Eg. 231.258=2×82 + 3×81+1×80+2×8-1+5×8-2 (in decimal) =153.32812510

  36. Hexadecimal Numbers--Base 16 • r = 16 • Digits (convention): 0..9, A, B, C, D, E, F • A=10, B=11, … , F = 15

  37. e.g1. (3FB)16 = 3×162 + 15×161 + 11×160 (in decimal) = 768 + 240 + 11 = (1019)10 e.g2. A59C.3A16 = (A×163)+(5×162)+(9×161)+(C×160)+(3×16-1)+(A×16-2)

  38. 1.3.2 Number System Conversion Decimal,binary,octal,and hexadecimal number

  39. Binary  Octal (011 010101 000 . 111 101 011 100)2 ( 3 2 5 0 . 7 5 3 4 )8 E.g. Convert the binary number 010011110111.1101010102to octal Solution 010,011,110,111.110,101,0102=2367.6528

  40. Binary  Hex ( 0110 1010 1000 . 1111 0101 1100 )2 ( 6 A 8 . F 5 C )16 E.g. Convert the binary number 010011110111.1101010102to hexadecimal Solution 0100,1111,0111.1101,0101,00002=4F7.D5016

  41. 1.3.2 Number System Conversion • hexadecimal and octal to Binary Conversion E.g. Convert the numbers F37A.B216,735.58 to binary Solution F37A.B2=1111,0011,0111,1010.1011,00102 735.58 =111,011,101.1012 Practice problem: convert 367.2368to binary then hexadecimal Solution 367.2368=011,110,111.010,011,1102 011,110,111.010,011,1102=0,1111,0111.0100,1111,02=F7.4F16

  42. 1.3.2 Number System Conversion • Binary to decimal Conversion 11001.0112 =(1×24)+(1×23)+(0×22)+(0×21)+(1×20) +(0× 2-1)+(1×2-2)+(1×2-3) =16+8+0+0+1+0+0.25+0.125 =25.37510

  43. 1.3.2 Number System Conversion • decimal to Binary Conversion • Successive Division Radix Conversion E.g. Convert 11910 to binary (LSB) Solution 11910=11101112 (MSB)

  44. 1.3.2 Number System Conversion • Decimal to Binary Conversion • Fractional Radix Conversion, Successive Multiplication E.g. Convert .7510 to binary Solution Multiply .75 by 2 (.75)2=1.5 1(MSB) Multiply .75 by 2 (.5)2=1.0 1 Multiply .75 by 2 (0)2=0.0 0(LSB) .7510=.110=(1)2-1+(1)2-2

  45. SolutionFirst, convert the integer part of the decimal number by successive division 5.Devide 5 by 2 1.Devide 95 by 2 (LSB) 6.Devide 2 by 2 2.Devide 47 by 2 3.Devide 23 by 2 7.Devide 1 by 2 (MSB) 4.Devide 11 by 2 9510=1·26+0·25+1·24+1·23+1·22+1·21+1·20 1.3.2 Number System Conversion • E.g. Convert 95.062510 to binary(con.)

  46. 1.3.2 Number System Conversion Second, convert the fraction • E.g. Convert 95.062510 to binary(con.) • (.625)2=0.125 0 (MSB) • (.125)2=0.25 0 • (.25)2=0.5 0 • (.5)2=1.0 1 (LSB) .062510=.00012 95.062510=1011111.00012

  47. 1.3.2 Number System Conversion • Decimal to Any Radix The conversion of decimal numbers to any other radix applies the successive division and successive multiplication algorithms e.g. Convert 23.62510 to octal (base 8) Solution Convert the integer portion by successive division Convert te fraction portion by successive multiplication 1.Divide 23 by 8 (.625)8=5.00 5 (MSB) (LSB) .62510=.58 2.Divide 2 by 8 (MSB) 23.62510=27.58 2310=278

  48. 1.3.2 Number System Conversion • Any Radix to Decimal e.g. Convert 324.25 to decimal Solution 3·52+2·51+4·50+2·5-1 =3(25)+2(5)+4(1)+2(1/5) =75+10+4+2/5 =89.410

  49. 1.3.2 Number System Conversion Practice problem: 1. Convert 345.26 to decimal 2.Convert 34.810 to base 5 Solution:1. 137.333……10 2. 114.45

  50. 1.3.3 Binary Codes • Natural Binary Coded Decimal Decimal to natural BCD e.g. Convert 9275.610 into BCD Solution: 9=1001 2=0010 7=0111 5=0101 6=0110 9275.610=1001,0010,0111,0101.0110 in BCD

More Related