1 / 27

Digital Design Fundamentals

Leiden Embedded Research Center , LIACS, Leiden University. Digital Design Fundamentals. Monday: 1:30 – 2.50 p.m. 3:10 – 4:30 p.m. Ed Deprettere LIACS/LERC Leiden University. www.liacs.nl/~cserc/courses/DITE/DITE2003/.

aliza
Download Presentation

Digital Design Fundamentals

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. Leiden Embedded Research Center, LIACS, Leiden University. Digital Design Fundamentals Monday: 1:30 – 2.50 p.m. 3:10 – 4:30 p.m. Ed Deprettere LIACS/LERC Leiden University www.liacs.nl/~cserc/courses/DITE/DITE2003/

  2. Course Organization • Class lectures and hands-on are fully integrated. • There is no ” practicum ” but: • towards the end of the course you get a final • design assignment for which you need • several small components you have been • designing during the course. • Course is divided in two parts: • September-October : lectures/hands-on = 1 • November-December : lectures/hands-on = .5 • Mid-term exam after first part; you must take • that exam. • Several home works will be given. You must • turn them in. Digital Design Fundamentals Ed F. Deprettere Leiden University

  3. Course Organization (cont’d) All you need to know, you’ll find on the course website: 1. You must attend the classes, 2. You must make and turn-in the home works, 3. Home work instructions are posted on the internet (I don’t tell you), 4. You must turn-in your hands-on assignments, 5. You must take the mid-term exam, 6. You must take the January exam. See course website for all information and instructions; again, I don’t tell you. No compromises, No excuses. I teach, you learn. Digital Design Fundamentals Ed F. Deprettere Leiden University

  4. What is the course teaching you? • All you need to know to understand the • What, • Why, and • How, • of digital processors, processor operation, • and processor design. Digital Design Fundamentals Ed F. Deprettere Leiden University

  5. storage control unit data path cpu input/output Basic Digital System Structure cpu: central processing unit data path: arithmetic and logic operations control unit: make sure that the sequence of data path operations is correct storage: no memory = no system input/output: keybord, microphone/speaker,… Digital Design Fundamentals Ed F. Deprettere Leiden University

  6. For Modern Computers

  7. Not only for computers Digital Design Fundamentals Ed F. Deprettere Leiden University

  8. Every language is based on an alphabet. The Roman alphabet consists of 26 characters. The decimal number system consists of 10 digits. Characters and Digits are but two examples of Symbols. Early digital computers were used mostly for numeric computations: the digits were the symbols used (and hence the name). But that is not important: important is that a digital system manipulates discrete elements of information Digital means digit-wise ? Digital Design Fundamentals Ed F. Deprettere Leiden University

  9. drain source if g = 1 then switch is closed else ( g = 0) switch is open N gate N-switch If g = 0 then switch is closed else ( g = 1 ) switch is open drain source P o P-switch gate The digital system alphabet is binary your desktop, laptop, or mobile phone know but one alphabet with symbols 0 and 1. Why? Because they have a basic building block, called a switch, that can only be on or off. The physical switch is called the transistor. Digital Design Fundamentals Ed F. Deprettere Leiden University

  10. An example: The Inverter Vdd (1) Vin Vout Pull up o 1 0 0 1 (from N) Vin Vout (from P) Pull down Vss (o) A simple example: Inverter Physically: Voltages are used: H(igh) and L(ow) Logically : Binary Numbers are used: 1 and 0. Physical N-transistor passes a 0 well and a 1 poorly; P-transistor does the opposite; to have both, use complementary switch(transmission gate): Digital Design Fundamentals Ed F. Deprettere Leiden University

  11. o o c Decimal – Binary - Decimal. Called Transmission Gate One step back: your desktop, laptop, cell phone, do understand your symbols but convert them immediately into their own symbols. How? That is not too difficult, once we understand how all number systems, not only the decimalone (0-9), but also the binaryone (0-1) have a similar formal representation. Here is how. Digital Design Fundamentals Ed F. Deprettere Leiden University

  12. addition: subtraction: 1 1 1 1 3 2 5 5 2 1 + 1 9 6 - 1 9 6 5 2 1 3 2 5 Familiar things first 555.5 is a decimalnumber in positional code. The meaning of each 5 depends on its position. five hundreds fifty five and five tenths 5 { 0, 1, 2, .. ,9 } isdigit set 10 is baseor radix Digital Design Fundamentals Ed F. Deprettere Leiden University

  13. base is r digits are most significant digit least significant digit Example: 36 6 1 Base 6 Decimal Meaning Base 10 Why not other base ? you could take any base: positional notation Digital Design Fundamentals Ed F. Deprettere Leiden University

  14. character ASCII code A a 0 0100 0001 0110 0001 0011 0000 B b 1 0010 0010 0001 O o 2 1111 1111 0010 P p 3 0101 0000 0111 0000 0011 Z z 9 1010 1010 1001 ( [ { 0010 1000 0101 1011 0111 1100 NULL ESC LF 0000 0000 0001 1011 0000 1010 Bits and Bytes and Words A bit is a quantity b with a value in {0, 1}. A byte is a sequence of eight bits. A word is a sequence of 2,3,4, .. bytes. a bit: 1 a byte: 01110001 a word : 00111101 01001101 Digital systems read and write in a binary code called ASCII (American Standard Code for Information Exchange). They are the so-called alphanumeric characters. Each of them is represented by a unique byte. Digital Design Fundamentals Ed F. Deprettere Leiden University

  15. What about the decimals? decimal digit binary coded decimal digit 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 The decimal digits can be represented by half a byte. Binary-Coded Decimals (BCD code) Does that make sense? It does: This is the binary number system (base 2) Digital Design Fundamentals Ed F. Deprettere Leiden University

  16. is 1K (kilo) is 1M (mega) is 1G (giga) Burn this table into your memory Digital Design Fundamentals Ed F. Deprettere Leiden University

  17. What about negative numbers? Since we do not have anything but bits, we use a bit to identify the sign of a binary number. For example like this, 0 | 1001 (+9) 1 | 1001 (-9) This is called the signed-magnituderepresentation. But we can do it differently, using signed-complements. Either r’s complement (2’s) or (r-1)’s complement (1’s). An example: +9 and three representations of -9 encoded in a single byte: +9 0000 1001 -9 signed magnitude 1000 1001 -9 signed-1’s complement 1111 0110 (how to get it?) -9 signed-2’s complement 1111 0111 (how to get it?) The signed-2’s complement system is the only one having only one representation of zero (0| 0), which is always positive. Digital Design Fundamentals Ed F. Deprettere Leiden University

  18. Decimal Binary 1’s complement 2’s complement 0 1 2 3 4 0 | 0 0 0 | 0 1 0 | 1 0 0 | 1 1 1 | 1 1 1 | 1 0 1 | 0 1 1 | 0 0 0 | 0 0 1 | 1 1 1 | 1 0 1 | 0 1 1 | 0 0 -4 + 3 2’s complement system is not symmetric 3 + 1 = - 4 3 2 1 0 -1 -2 -3 -4 - 4 –1 = + 3 More about negative numbers flip bits 1’s complement + 0 | 0 1 Digital Design Fundamentals Ed F. Deprettere Leiden University

  19. 1 1 9 7 2 6 1 1 1 0 | 1 0 0 1 1 0 | 0 0 1 1 1 0 | 1 1 0 1 0 + + 1 1 1 1 0 | 0 0 1 1 1 1 | 0 1 1 0 1 1 | 1 0 1 0 0 0 | 7 1 | 81 1 | 88 + + 0 | 0 1 1 0 0 - 12 Binary addition and subtraction addition: subtraction: (7 - 19) = - (19 -7) = - 12 = 7 + (-100 + 81) = - 100 + 88 = -12 Digital Design Fundamentals Ed F. Deprettere Leiden University

  20. Octal number system Hexadecimal number system base 8 base 16 Other useful number systems Conversions Apart from the ordinary binary number system, computers do use also the These systems have a more compact representation of binary quantities. The octal system has digits in {0, 1, .., 7}, the hexadecimal system has digits in {0, 1, .., 15} warning: we don’t use the symbols 10, 11, .. ,15 in the base-16 system we use the letters A, B, .. , F instead. All what is left is: Digital Design Fundamentals Ed F. Deprettere Leiden University

  21. Another table to exercise D e c im a l (10) B in a ry (2 ) O c t al (8) H e x (16) 7 0111 07 7 8 1000 10 8 9 1001 11 9 10 1010 12 a 11 1011 13 b 12 1100 14 c 13 1101 15 d 14 1110 16 e 15 1111 17 f Digital Design Fundamentals Ed F. Deprettere Leiden University

  22. Conversions • Group bits • Binary to octal or hex: start at binary point 1101010.012 to octal (groups of 3): 001 101 010 . 0102 = 152.28 1101010.012 to hex (groups of 4): 0110 1010.01002 = 6a.416 • Octal to binary: a digit at a time 127.48 = 001 010 111.1002 = 1010111.12 • Hexadecimal to binary : a digit at a time b65f16 = 1011 0110 0101 11112 = 10110110010111112 • Hexadecimal to octal or octal to hex: • Hex —> binary —> octal • Octal —> binary —> hex Digital Design Fundamentals Ed F. Deprettere Leiden University

  23. Remains 2-to-10 and 10-to-r 2-to-10 is easy: use expansion 10-to-r Decimal integers to Octal. (25)10 25/8 = 3 + 1/8 remainder = 1 3/8 = 0 + 3/8 remainder = 3 (31)8 Decimal fractions to Octal. (0.26)10 0.26 x 8 = 2.08 integer = 2 0.08 x 8 = 0.64 integer = 0 (0.20)8 (approximate) Digital Design Fundamentals Ed F. Deprettere Leiden University

  24. storage control unit data path cpu input/output Back to basic structure The conversion from base 10 to base r can be programmed for execution on a digital computer like this one. I’ll give a program in a high-level language. We will see later how that language is translated to the computer’s binary language. Digital Design Fundamentals Ed F. Deprettere Leiden University

  25. storage control unit data path cpu input/output (0.N)10 = (0.A-1A-2…..A-n)r • we know the procedure, and here is an program • k = -1; • while (k >= -n) { • tem = N*r; • A[k] = Int(tem); • N = Fract(tem); • k = k-1; • } end Digital Design Fundamentals Ed F. Deprettere Leiden University

  26. Number ranges. • Three bit binary number 1112 = 7 • Two digit octal number 778 = 6310 • General case? • 111112 + 1 = 100000 = 25 • 111112 = 25 - 1 = 32 - 1 = 31 • Largest n-bit (binary) number = n ones = 2n - 1 • Largest n-digit radix r number = n (r-1)’s = rn - 1 • Example: largest 3 digit decimal number = 103 - 1 = 1000 - 1 = 999 • What about smallest n-bit binary fractions? Digital Design Fundamentals Ed F. Deprettere Leiden University

  27. Can we also talk binary? RF wave modulated by the bits speech in what happens in here? This speech is sampled at 8000 samples per second and each sample is coded as a single byte. The cost is 64 Kbit/sec which is way too much. Speech processing techniques (digital signal processing) allow us to bring this amount down to as low as 2.4 Kbit/s. What about image and video? Digital Design Fundamentals Ed F. Deprettere Leiden University

More Related