Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECEN 248: INTRODUCTION TO DIGITAL DESIGN

Similar presentations


Presentation on theme: "ECEN 248: INTRODUCTION TO DIGITAL DESIGN"— Presentation transcript:

1 ECEN 248: INTRODUCTION TO DIGITAL DESIGN
Lecture Set A Dr. S.G.Choi Dept. of Electrical and Computer Engineering

2 Instructor: Office 333G WERC Office Hours MWF 10-11 AM
Lab Page:

3 Required textbook: Required Textbook: "Fundamentals of Digital Logic Design" by Brown and Vranesic. VERILOG VERSION Supplemental texts: "Digital Design: Principles and Practices" by John Wakerly. "Contemporary Logic Design" by Randy Katz.

4 Course info Mailing list: Course website
s will be sent periodically to neo accounts Announcements: Lecture cancellations Deadline extension Updates, etc. Course website All slides, labs, assignments, etc.

5 Grading Policy: Assignments and Labs 25% 3 Hour Exams No Final Exam
20% for 1st exam 25% for 2nd 30% for 3rd No Final Exam Quizzes: Each quiz 1% of the final Taken into account only if it improves the final grade Can improve the grade, but no extra points Final grading may or may not be curved up

6 Quizzes: 3-6 quizzes Multiple choice questions 10-15 minutes
Each quiz 1% of the final No quiz makeups

7 Grading scale A standard grading scale will be utilized. The tentative grading scale for the course is:  A       % B         80-89% C        70-79% D         60-69% F        Below 59%

8 Course Goals Study methods for
Representation, manipulation, and optimization for both combinatorial and sequential logic Solving digital design problems Study HDL description language (verilog)

9 Topics Number bases Logic gates and Boolean Algebra
Gate –label minimization Combinational Logic Sequential logic (Latches, Flip-flops, Registers, and Counters) Memory and Programmable Logic HDL language (Verilog)

10 Attention over time! t

11 Attention over time! ~5 min t

12 Peer Instruction Increase real-time learning in lecture, test understanding of concepts vs. details Complete a “segment” with multiple choice questions 1-2 minutes to decide yourself 3 minutes in pairs/triples to reach consensus. Teach others! 5-7 minute discussion of answers, questions, clarifications

13 The Evolution of Computer Hardware
When was the first transistor invented? Modern-day electronics began with the invention in 1947 of the transfer resistor - the bi-polar transistor - by Bardeen et.al at Bell Laboratories For lecture

14 The Evolution of Computer Hardware
When was the first IC (integrated circuit) invented? In 1958 the IC was born when Jack Kilby at Texas Instruments successfully interconnected, by hand, several transistors, resistors and capacitors on a single substrate For lecture

15 The Underlying Technologies
Year Technology Relative Perf./Unit Cost 1951 Vacuum Tube 1 1965 Transistor 35 1975 Integrated Circuit (IC) 900 1995 Very Large Scale IC (VLSI) 2,400,000 2005 Ultra VLSI 6,200,000,000

16 The PowerPC 750 Introduced in 1999 3.65M transistors
366 MHz clock rate 40 mm2 die size 250nm technology

17 Layers of abstraction ECEN 248 Software Hardware
Application (ex: browser) Operating Compiler System (Mac OSX) Software Assembler Instruction Set Architecture Hardware Processor Memory I/O system Datapath & Control ECEN 248 Digital Design Circuit Design transistors

18 Technology Trends: Microprocessor Complexity
Itanium 2: 41 Million Athlon (K7): 22 Million Alpha 21264: 15 million Pentium Pro: 5.5 million PowerPC 620: 6.9 million Alpha 21164: 9.3 million Sparc Ultra: 5.2 million Moore’s Law 2X transistors/Chip Every 1.5 years Called “Moore’s Law”

19 DIGITAL SYSTEMS 19

20 Overview Logic functions with 1’s and 0’s. Truth tables.
Building digital circuitry. Truth tables. Logic symbols and waveforms. Boolean algebra. Properties of Boolean Algebra Reducing functions. Transforming functions. credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·

21 Digital Systems · Analysis problem:
Determine binary outputs for each combination of inputs Design problem: given a task, develop a circuit that accomplishes the task Many possible implementations. Try to develop “best” circuit based on some criterion (size, power, performance, etc.) Logic Circuit Inputs Outputs

22 Toll Booth Controller Consider the design of a toll booth controller.
Inputs: quarter, car sensor. Outputs: gate lift signal, gate close signal If driver pitches in quarter, raise gate. When car has cleared gate, close gate. Logic Circuit $·25 Car? Raise gate Close gate

23 Describing Circuit Functionality: Inverter
Truth Table A Y 1 A Y Symbol Input Output Basic logic functions have symbols. The same functionality can be represented with truth tables· Truth table completely specifies outputs for all input combinations. The above circuit is an inverter. An input of 0 is inverted to a 1. An input of 1 is inverted to a 0. credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·

24 The AND Gate A Y B This is an AND gate. So, if the two inputs signals
are asserted (high) the output will also be asserted. Otherwise, the output will be deasserted (low). Truth Table A B Y 1

25 The OR Gate A Y B This is an OR gate. So, if either of the two
input signals are asserted, or both of them are, the output will be asserted. A B Y 1

26 Describing Circuit Functionality: Waveforms
AND Gate A B Y 1 credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs· Waveforms provide another approach for representing functionality. Values are either high (logic 1) or low (logic 0). Can you create a truth table from the waveforms?

27 Consider three-input gates
3 Input OR Gate

28 Ordering Boolean Functions
How to interpret A · B+C? Is it A · B ORed with C ? Is it A ANDed with B+C ? Order of precedence for Boolean algebra: AND before OR. Note that parentheses are needed here :

29 Boolean Algebra A Boolean algebra is defined as a closed algebraic system containing a set K or two or more elements and the two operators, · and +· Useful for identifying and minimizing circuit functionality Identity elements a + 0 = a a · 1 = a 0 is the identity element for the + operation· 1 is the identity element for the · operation·

30 Commutativity and Associativity of the Operators
The Commutative Property: For every a and b in K, a + b = b + a a · b = b · a The Associative Property: For every a, b, and c in K, a + (b + c) = (a + b) + c a · (b · c) = (a · b) · c

31 The Distributive Property
For every a, b, and c in K, a + ( b · c ) = ( a + b ) · ( a + c ) a · ( b + c ) = ( a · b ) + ( a · c )

32 Distributivity of the Operators and Complements
The Existence of the Complement: For every a in K there exists a unique element called a’ (complement of a) such that, a + a’ = 1 a · a’ = 0 To simplify notation, the · operator is frequently omitted. When two elements are written next to each other, the AND (·) operator is implied… a + b · c = ( a + b ) · ( a + c ) a + bc = ( a + b )( a + c )

33 Duality The principle of duality is an important concept. This says that if an expression is valid in Boolean algebra, the dual of that expression is also valid. To form the dual of an expression, replace all + operators with · operators, all · operators with + operators, all ones with zeros, and all zeros with ones.

34 Duality The principle of duality is an important concept· This says that if an expression is valid in Boolean algebra, the dual of that expression is also valid· To form the dual of an expression, replace all + operators with · operators, all · operators with + operators, all ones with zeros, and all zeros with ones· Form the dual of the expression a + (bc) = (a + b)(a + c) Following the replacement rules… a(b + c) = ab + ac Take care not to alter the location of the parentheses if they are present·

35 Duality The principle of duality is an important concept· This says that if an expression is valid in Boolean algebra, the dual of that expression is also valid· To form the dual of an expression, replace all + operators with · operators, all · operators with + operators, all ones with zeros, and all zeros with ones· Form the dual of the expression a + (bc) = (a + b)(a + c) Following the replacement rules… a(b + c) = ab + ac Take care not to alter the location of the parentheses if they are present·

36 Involution This theorem states: a’’ = a
Remember that aa’ = 0 and a+a’=1. Therefore, a’ is the complement of a and a is also the complement of a’. As the complement of a’ is unique, it follows that a’’=a· Taking the double inverse of a value will give the initial value.

37 Absorption This theorem states: a + ab = a a(a+b) = a
To prove the first half of this theorem: a + ab = a · 1 + ab = a (1 + b) = a (b + 1) = a (1) a + ab = a

38 DeMorgan’s Theorem A key theorem in simplifying Boolean algebra expression is DeMorgan’s Theorem. It states: (a + b)’ = a’b’ (ab)’ = a’ + b’ Complement the expression a(b + z(x + a’)) and simplify. (a(b+z(x + a’)))’ = a’ + (b + z(x + a’))’ = a’ + b’(z(x + a’))’ = a’ + b’(z’ + (x + a’)’) = a’ + b’(z’ + x’a’’) = a’ + b’(z’ + x’a)

39 Postulates and Basic Theorems

40 Summary Basic logic functions can be made from AND, OR, and NOT (invert) functions. The behavior of digital circuits can be represented with waveforms, truth tables, or symbols. Primitive gates can be combined to form larger circuits Boolean algebra defines how binary variables can be combined. Rules for associativity, commutativity, and distribution are similar to algebra. DeMorgan’s rules are important. Will allow us to reduce circuit sizes. credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·

41 NUMBER SYSTEMS

42 Overview Understanding decimal numbers Binary and octal numbers
The basis of computers! Conversion between different number systems credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

43 Digital Computer Systems
Digital systems consider discrete amounts of data. Examples 26 letters in the alphabet 10 decimal digits Larger quantities can be built from discrete values: Words made of letters Numbers made of decimal digits (e.g ) Computers operate on binary values (0 and 1) Easy to represent binary values electrically Voltages and currents. Can be implemented using circuits Create the building blocks of modern computers credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

44 Understanding Decimal Numbers
Decimal numbers are made of decimal digits: (0,1,2,3,4,5,6,7,8,9) Number representation: 8653 = 8x x x x100 What about fractions? = 9x x x x x x x10-2 Informal notation -> ( )10 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

45 Understanding Octal Numbers
Octal numbers are made of octal digits: (0,1,2,3,4,5,6,7) Number representation: (4536)8 = 4x83 + 5x82 + 3x81 + 6x80 = (1362)10 What about fractions? (465.27)8 = 4x82 + 6x81 + 5x80 + 2x x8-2 Octal numbers don’t use digits 8 or 9 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

46 Understanding Binary Numbers
Binary numbers are made of binary digits (bits): 0 and 1 Number representation: (1011)2 = 1x23 + 0x22 + 1x21 + 1x20 = (11)10 What about fractions? (110.10)2 = 1x22 + 1x21 + 0x20 + 1x x2-2 Groups of eight bits are called a byte ( ) 2 Groups of four bits are called a nibble. (1101) 2 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

47 Why Use Binary Numbers? Easy to represent 0 and 1 using electrical values. Possible to tolerate noise. Easy to transmit data Easy to build binary circuits. AND Gate 1

48 Conversion Between Number Bases
Octal(base 8) Decimal(base 10) Binary(base 2) Hexadecimal (base16)

49 Convert an Integer from Decimal to Another Base
For each digit position: Divide decimal number by the base (e.g. 2) The remainder is the lowest-order digit Repeat first two steps until no divisor remains. Example for (13)10: Integer Quotient Remainder Coefficient 13/2 = a0 = 1 6/2 = a1 = 0 3/2 = a2 = 1 1/2 = a3 = 1 Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

50 Convert an Fraction from Decimal to Another Base
For each digit position: Multiply decimal number by the base (e.g. 2) The integer is the highest-order digit Repeat first two steps until fraction becomes zero. Example for (0.625)10: Integer Fraction Coefficient 0.625 x 2 = a-1 = 1 0.250 x 2 = a-2 = 0 0.500 x 2 = a-3 = 1 Answer (0.625)10 = (0.a-1 a-2 a-3 )2 = (0.101)2

51 The Growth of Binary Numbers
20=1 1 21=2 2 22=4 3 23=8 4 24=16 5 25=32 6 26=64 7 27=128 n 2n 8 28=256 9 29=512 10 210=1024 11 211=2048 12 212=4096 20 220=1M 30 230=1G 40 240=1T Kilo Mega Giga Tera

52 Binary Addition 1 1 1 1 1 1 carries 1 1 1 1 0 1 + 1 0 1 1 1
Binary addition is very simple. This is best shown in an example of adding two binary numbers… 1 1 1 1 1 1 carries Design state of art organization in 1990 1 1 1

53 Binary Subtraction 1 10 borrows 0 10 10 0 0 10 1 0 0 1 1 0 1
We can also perform subtraction (with borrows in place of carries). Let’s subtract (10111)2 from ( )2… borrows Design state of art organization in 1990

54 Binary Multiplication
Binary multiplication is much the same as decimal multiplication, except that the multiplication operations are much simpler… X Design state of art organization in 1990

55 Convert an Integer from Decimal to Octal
For each digit position: Divide decimal number by the base (8) The remainder is the lowest-order digit Repeat first two steps until no divisor remains. Example for (175)10: Integer Quotient Remainder Coefficient 175/8 = a0 = 7 21/8 = a1 = 5 2/8 = a2 = 2 Answer (175)10 = (a2 a1 a0)2 = (257)8

56 Convert an Fraction from Decimal to Octal
For each digit position: Multiply decimal number by the base (e.g. 8) The integer is the highest-order digit Repeat first two steps until fraction becomes zero. Example for (0.3125)10: Integer Fraction Coefficient x 8 = a-1 = 2 x 8 = a-2 = 4 Answer (0.3125)10 = (0.24)8

57 Summary Binary numbers are made of binary digits (bits)
Binary and octal number systems Conversion between number systems Addition, subtraction, and multiplication in binary credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

58 HEXADECIMAL NUMBERS

59 Overview Hexadecimal numbers
Related to binary and octal numbers Conversion between hexadecimal, octal and binary Value ranges of numbers Representing positive and negative numbers Creating the complement of a number Make a positive number negative (and vice versa) Why binary? credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

60 Understanding Hexadecimal Numbers
Hexadecimal numbers are made of 16 digits: (0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F) Number representation: (3A9F)16 = 3x x x x160 = What about fractions? (2D3.5)16 = 2x x x x16-1 = Note that each hexadecimal digit can be represented with four bits. (1110) 2 = (E)16 Groups of four bits are called a nibble. (1110) 2 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

61 Putting It All Together
Binary, octal, and hexadecimal similar Easy to build circuits to operate on these representations Possible to convert between the three formats

62 Converting Between Base 16 and Base 2
3A9F16 = 3 A 9 F Conversion is easy! Determine 4-bit value for each hex digit Note that there are 24 = 16 different values of four bits Easier to read and write in hexadecimal. Representations are equivalent!

63 Converting Between Base 16 and Base 8
3A9F16 = 3 A 9 F = 3 5 2 3 7 Convert from Base 16 to Base 2 Regroup bits into groups of three starting from right Ignore leading zeros Each group of three bits forms an octal digit.

64 How To Represent Signed Numbers
Plus and minus sign used for decimal numbers: (or +25), -16, etc. For computers, desirable to represent everything as bits. Three types of signed binary number representations: signed magnitude, 1’s complement, 2’s complement. In each case: left-most bit indicates sign: positive (0) or negative (1). Consider signed magnitude: = 1210 Sign bit Magnitude = Sign bit Magnitude

65 One’s Complement Representation
The one’s complement of a binary number involves inverting all bits. 1’s comp of is 1’s comp of is For an n bit number N the 1’s complement is (2n-1) – N. Called diminished radix complement by Mano since 1’s complement for base (radix 2). To find negative of 1’s complement number take the 1’s complement. = 1210 Sign bit Magnitude = Sign bit Magnitude

66 Two’s Complement Representation
The two’s complement of a binary number involves inverting all bits and adding 1. 2’s comp of is 2’s comp of is For an n bit number N the 2’s complement is (2n-1) – N + 1. Called radix complement by Mano since 2’s complement for base (radix 2). To find negative of 2’s complement number take the 2’s complement. = 1210 Sign bit Magnitude = Sign bit Magnitude

67 Two’s Complement Shortcuts
Algorithm 1 – Simply complement each bit and then add 1 to the result. Finding the 2’s complement of ( )2 and of its 2’s complement… N = [N] = Algorithm 2 – Starting with the least significant bit, copy all of the bits up to and including the first 1 bit and then complementing the remaining bits. N = [N] =

68 Finite Number Representation
Machines that use 2’s complement arithmetic can represent integers in the range -2n-1 <= N <= 2n-1-1 where n is the number of bits available for representing N. Note that 2n-1-1 = ( ) and –2n-1 = ( )2 For 2’s complement more negative numbers than positive. For 1’s complement two representations for zero. For an n bit number in base (radix) z there are zn different unsigned values. (0, 1, …zn-1)

69 1’s Complement Addition
Using 1’s complement numbers, adding numbers is easy. For example, suppose we wish to add +(1100)2 and +(0001)2. Let’s compute (12)10 + (1)10. (12)10 = +(1100)2 = in 1’s comp. (1)10 = +(0001)2 = in 1’s comp. Add carry Final Result Add Step 1: Add binary numbers Step 2: Add carry to low-order bit

70 1’s Complement Subtraction
Using 1’s complement numbers, subtracting numbers is also easy. For example, suppose we wish to subtract +(0001)2 from +(1100)2. Let’s compute (12)10 - (1)10. (12)10 = +(1100)2 = in 1’s comp. (-1)10 = -(0001)2 = in 1’s comp.

71 1’s Complement Subtraction
Step 1: Take 1’s complement of 2nd operand Step 2: Add binary numbers Step 3: Add carry to low order bit 1 1’s comp Add Add carry Final Result

72 2’s Complement Addition
Using 2’s complement numbers, adding numbers is easy. For example, suppose we wish to add +(1100)2 and +(0001)2. Let’s compute (12)10 + (1)10. (12)10 = +(1100)2 = in 2’s comp. (1)10 = +(0001)2 = in 2’s comp.

73 2’s Complement Addition
Step 1: Add binary numbers Step 2: Ignore carry bit Add Final Result Ignore

74 2’s Complement Subtraction
Using 2’s complement numbers, follow steps for subtraction For example, suppose we wish to subtract +(0001)2 from +(1100)2. Let’s compute (12)10 - (1)10. (12)10 = +(1100)2 = in 2’s comp. (-1)10 = -(0001)2 = in 2’s comp.

75 2’s Complement Subtraction
Step 1: Take 2’s complement of 2nd operand Step 2: Add binary numbers Step 3: Ignore carry bit 2’s comp Add Final Result Ignore Carry

76 2’s Complement Subtraction: Example #2
Let’s compute (13)10 – (5)10. (13)10 = +(1101)2 = (01101)2 (-5)10 = -(0101)2 = (11011)2 Adding these two 5-bit codes… Discarding the carry bit, the sign bit is seen to be zero, indicating a correct result. Indeed, (01000)2 = +(1000)2 = +(8)10. carry

77 2’s Complement Subtraction: Example #3
Let’s compute (5)10 – (12)10. (-12)10 = -(1100)2 = (10100)2 (5)10 = +(0101)2 = (00101)2 Adding these two 5-bit codes… Here, there is no carry bit and the sign bit is 1. This indicates a negative result, which is what we expect. (11001)2 = -(7)10.

78 Binary numbers Binary numbers can also be represented in octal and hexadecimal Easy to convert between binary, octal, and hexadecimal Signed numbers represented in signed magnitude, 1’s complement, and 2’s complement 2’s complement most important (only 1 representation for zero). Important to understand treatment of sign bit for 1’s and 2’s complement. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

79 Binary Coded Decimal Digit BCD Code 0000 5 0101 1 0001 6 0110 2 0010 7 0111 3 0011 8 1000 4 0100 9 1001 Binary coded decimal (BCD) represents each decimal digit with four bits Ex· = This is NOT the same as Why do this? Because people think in decimal. credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs· 3 2 9

80 Putting It All Together
BCD not very efficient. Used in early computers (40s, 50s). Used to encode numbers for seven- segment displays. Easier to read?

81 Gray Code Gray code is not a number system.
Digit Binary Gray Code 0000 1 0001 2 0010 0011 3 4 0100 0110 5 0101 0111 6 7 8 1000 1100 9 1001 1101 10 1010 1111 11 1011 1110 12 13 14 15 Gray code is not a number system. It is an alternate way to represent four bit data Only one bit changes from one decimal digit to the next Useful for reducing errors in communication. Can be scaled to larger numbers. credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·

82 ASCII Code American Standard Code for Information Interchange
ASCII is a 7-bit code, frequently used with an 8th bit for error detection (more about that in a bit). Character ASCII (bin) ASCII (hex) Decimal Octal A 41 65 101 B 42 66 102 C 43 67 103 Z a 1 credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·

83 ASCII Codes and Data Transmission
A – Z (26 codes), a – z (26 codes) 0-9 (10 codes), others Complete listing in Mano text Transmission susceptible to noise. Typical transmission rates (1500 Kbps, 56.6 Kbps) How to keep data transmission accurate?

84 Parity Codes Information Bits P
Parity codes are formed by concatenating a parity bit, P to each code word of C. In an odd-parity code, the parity bit is specified so that the total number of ones is odd. In an even-parity code, the parity bit is specified so that the total number of ones is even. Information Bits P Added even parity bit Added odd parity bit

85 Parity Code Example Concatenate a parity bit to the ASCII code for the characters 0, X, and = to produce both odd-parity and even-parity codes. Character ASCII Odd-Parity ASCII Even-Parity ASCII X =

86 Binary Data Storage Binary cells store individual bits of data
Multiple cells form a register. Data in registers can indicate different values Hex (decimal) BCD ASCII 1 1 1 1 Binary Cell

87 Register Transfer Data can move from register to register.
Digital logic used to process data. We will learn to design this logic. Register A Register B Register C Digital Logic Circuits

88 Transfer of Information
Data input at keyboard Shifted into place Stored in memory NOTE: Data input in ASCII

89 Building a Computer We need processing We need storage
We need communication You will learn to use and design these components.

90 Summary Although 2’s complement most important, other number codes exist. ASCII code used to represent characters (including those on the keyboard). Registers store binary data. Next time: Building logic circuits! credential: bring a computer die photo wafer : This can be an hidden slide· I just want to use this to do my own planning· I have rearranged Culler’s lecture slides slightly and add more slides· This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20· Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs·


Download ppt "ECEN 248: INTRODUCTION TO DIGITAL DESIGN"

Similar presentations


Ads by Google