Class 1
Class 1
www.UandiStar
1-1
Class Schedule
Monday May 17 Tuesday 18 Wednesday 19 - Class 1 Thursday 20 - Class 2 Friday 21
24 - Class 3
25
26 - Class 4 Quiz 1 2 - Class 5 Project defined 9 - Class 8 Quiz 2 16 - Class 11 Quiz 5 23 - Class 14 Quiz 4 30 - Class 17 Quiz 5
Copyright 2004 Stevens Institute of Technology All rights reserved
27 Commencement 3 - Class 6
28
June 1
10 - Class 9
11
14 - Class 10
15
17 - Class 12
18
21 - Class 13
22
25
28 - Class 16
29
7/2
www.UandiStar
1-2
Logistics: Instructor: Bruce McNair Office: Burchard 206 Phone: 201-216-5549 email: [email protected] Office hours: Class days ~9:30 - ~11 Web site: http://koala.ece.stevens-tech.edu/~bmcnair (course notes, solutions, etc. are here) Homework Must be typed or printed hardcopy, or electronic (i.e., not handwritten). email is OK with MS/Office (2000 or previous), or program (e.g., .c, .m, ...) attachments. Dont email me an executable or a macrovirus. pdf is OK. VERIFY THAT PROGRAMMING SUBMISSIONS INCLUDE ENOUGH ENVIRONMENT TO BE BUILT AND RUN (e.g., .h files, initialization, etc.) Include the problem statement with solution. Keep a copy of your hardcopy or electronic homework (it may not be returned) If you submit homework as an email attachment, make sure your name appears in the file. The file name must include your name (or login), course number, and assignment number, e.g.: bmcnair-CPE358-HW2.doc To ensure proper credit for the homework, indicate the due date on the homework Homework will be due at the second class after it is assigned. (E.g., Class 1 homework is due during Class 3) My goal is to grade it and post the solution within a week. Problem solutions will be posted on my web site I do not penalize late homework, but HOMEWORK WILL NOT BE ACCEPTED AFTER THE SOLUTION IS POSTED Grading All items are INDIVIDUAL effort Homework: 25% Project: 25% Weekly tests: 10% each (50%) Detailed grades and status will be posted on WebCT
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-3
Course Introduction
www.UandiStar
1-4
www.UandiStar
1-5
Topics
Fundamental concepts of digital systems Binary codes and number systems Boolean algebra Simplification of switching equations Digital device characteristics (e.g., TTL, CMOS) and design considerations Combinatoric logical design including LSI implementation Hazards, Races, and time related issues in digital design Flip-flops and state memory elements Sequential logic analysis and design Synchronous vs. asynchronous design Counters, shift register circuits Memory and Programmable logic Minimization of sequential systems Introduction to Finite Automata
www.UandiStar
1-6
www.UandiStar
1-7
Todays Material
Fundamental concepts of digital systems (Mano Chapter 1) Binary codes, number systems, and arithmetic (Ch 1) Boolean algebra (Ch 2) Simplification of switching equations (Ch 3) Digital device characteristics (e.g., TTL, CMOS)/design considerations (Ch 10) Combinatoric logical design including LSI implementation (Chapter 4) Hazards, Races, and time related issues in digital design (Ch 9) Flip-flops and state memory elements (Ch 5) Sequential logic analysis and design (Ch 5) Synchronous vs. asynchronous design (Ch 9) Counters, shift register circuits (Ch 6) Memory and Programmable logic (Ch 7) Minimization of sequential systems Introduction to Finite Automata
www.UandiStar
1-8
Why Digital?
Analog computers were the standard for simulation in the 1940s and 50s:
v(t)
G1
dv G1 dt G2
d 2v G2 2 dt
G1
d 2v dv +v G2 2 + G1 dt dt
1
Issues: precision, stability, accuracy, aging, noise, Manufacturing and testing are labor intensive processes
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-9
Why Digital?
Digital circuits have become the standard for computing, control, and many other applications
D Q
D Q
D Q
Functions can be created with a small set of functional elements Designs are stable and repeatable Costs and size are rapidly dropping while speed and functionality increase
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-10
AND
OR
NOT
www.UandiStar
1-11
Rational numbers:
In general:
www.UandiStar
1-12
Rational numbers:
3.14125 = 3 50 + 1 51 + 4 52 + 1 53 + 2 54 = 3.371210
In general:
(an a1a0 a1 a m ) r = an r n + + a1 r1 + a0 r 0 + a1 r 1 + + a m r m
Radix point
ai {0,1, , r 1}
www.UandiStar
1-13
10112 = 1 23 + 0 22 + 1 21 + 1 20 = 1110
Rational numbers:
101.0112 = 1 22 + 0 21 + 1 20 + 0 21 + 1 22 + 1 23 = 5.37510
In general:
(an a1a0 a1 a m ) 2 = an 2n + + a1 21 + a0 20 + a1 21 + + a m 2 m
binary point
ai {0,1}
www.UandiStar
1-14
Numbers to Remember
22 = 42 = 82 = 16 2 = 32 2 = 64 2 = 128 2 = 256 2 = 512 2 = 1024 2 = 2048 2 = 4096 2 = 8192 2 = 16384 2 = 32768 2 = 65535
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved
1-15
Basic Arithmetic
Addition: 101001 +011011 1000100 Subtraction: 101000 -010110 010010
+ 0 1 0 0 1 1 1 0*
* carry
x 0 1
0 0 0
1 0 1
www.UandiStar
1-16
10112 = 1 23 + 0 22 + 1 21 + 1 20 = 1 8 + 0 4 + 1 2 + 1 1 = 8 + 2 +1 = 1110
An easier way:
10112 = 1 23 + 0 22 + 1 21 + 1 20 = = 1110
( ( (1) 2 + 0) 2 + 1) 2 + 1
www.UandiStar
1-17
87 8710 = 2i + ( 87 mod 2 ) = 2i43 + 1 2 43 4310 = 2i + ( 43mod 2 ) = 2i21 + 1 2 21 2110 = 2i + ( 21mod 2 ) = 2i10 + 1 2 10 1010 = 2i + (10 mod 2 ) = 2i5 + 0 2 5 510 = 2i + ( 5mod 2 ) = 2i2 + 1 2 2 210 = 2i + ( 2 mod 2 ) = 2i1 + 0 2 1 110 = 2i + (1mod 2 ) = 0 + 1 2
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved
8710 = 1 0 1 0 1 1 1
1-18
www.UandiStar
0.76510 = 0.110000111
= (.765 .5 ) + 1 i1 = 1 i2i.265 + 1 i1 = 2 2 2
1 1 = (.53 .5 ) + 1 1 = 2 .03 + i i i i1 = 2 2 2 1 2
1 2
i1 (.53) + 1 2
i1 (.06 ) + 1 2
i0 (.24 ) + 1 2 .2410 = 1 .48 ) + 1 i0 2( 2 i0 .4810 = 1 .96 ) + 1 2( 2 i1 .9610 = 1 .92 ) + 1 2( 2 .9210 = 1 .84 ) + 1 i1 2( 2 i1 .8410 = 1 .68 ) + 1 2( 2 .1210 =
1 2
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004
= (.06 ) + 1 i0 = 1 i2i.06 + 1 i0 = 2 2 2
1 2
i0 (.12 ) + 1 2
www.UandiStar
1-19
0 1 2 3 4 5 6 7 8 9
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
www.UandiStar
1-20
Octal
1 2 3 4 5 6 7
Binary-Octal mapping:
www.UandiStar
1-21
Hexadecimal
1 2 3 4 5 6 7 8 9 A B C D E F
Binary-Hexadecimal Mapping
1-22
Complements
Subtracting by adding:
A B = A + ( B)
How can we create -B ?
www.UandiStar
1-23
Complements
Subtracting by adding:
A B = A + ( B)
How can we create -B ? If B is an integer and B < rN
1-24
B = 31415910 B = 68584010
10s Complement
B + B = 99999910
B = 31415910 B = 68584110
Subtraction 31416 -2718 28698
B + B = 100000010
www.UandiStar
1-25
www.UandiStar
1-26
Add use the MSB to represent +/Useful for multiplication, but not addition/subtraction
Signed 1s Complement 110010 Complement the bits Not particularly useful for arithmetic Signed 2s Complement 110011 Complement the bits and add 1 Most widely used means of dealing with signed arithmetic
www.UandiStar
1-27
www.UandiStar
1-28
Intermediate overflows can be tolerated, as long as the final result is within the range that can be represented
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved
1-29
4-bit Representation 0111 0110 0101 0100 0011 0010 0001 0000 1111 1110 1101 1100 1011 1010 1001 1000
Copyright 2004 Stevens Institute of Technology All rights reserved
8-bit Representation 0111 1111 0111 1110 0111 1101 ... ... 0000 0010 0000 0001 0000 0000 1111 1111 1111 1110 ... ... 1000 0011 1000 0010 1000 0001 1000 0000
1-30
www.UandiStar
Binary Codes
Hexadecimal or binary numbers are not easily translated into humanunderstandable forms, e.g.: How old is a person born in (0111 1101 0011)2? Is it any easier to understand as (7E3)16?
www.UandiStar
1-31
Binary Codes
Hexadecimal or binary numbers are not easily translated into humanunderstandable forms, e.g.: How old is a person born in (0111 1101 0011)2? Is it any easier to understand as (7E3)16? How about: (0010 0000 0000 0011)BCD = (0010)2x103 + (0000)2102 + (0000)2101 + (0011)2100
www.UandiStar
1-32
Binary Codes
Typical binary counting order: 0 000 1 001 2 010 Transitions in multiple bits may create systems issues: 3 011 Extra bit errors on 4 100 communications links 5 101 Noise pulses in digital 6 110 systems 7 111 0 000
www.UandiStar
1-33
Binary Codes
Typical binary counting order: 0 000 1 001 2 010 Transitions in multiple bits may create systems issues: 3 011 Extra bit errors on 4 100 communications links 5 101 Noise pulses in digital 6 110 systems 7 111 0 000 Gray code order: 0 000 1 001 2 011 3 010 Adjacent code words 4 110 differ in only one bit 5 111 position 6 7 0 101 100 000
www.UandiStar
1-34
Binary Codes
Errors sometimes occur as data is being stored or transmitted. How can we design a system that is capable of responding to this possibility? Consider: Correct value: 0101 1001 0011 Result: 0111 1001 0011
www.UandiStar
1-35
Binary Codes
Errors sometimes occur as data is being stored or transmitted. How can we design a system that is capable of responding to this possibility? Consider: Correct value: 0101 1001 0011 Result: 0111 1001 0011 Add redundancy bits which convey no information, but protect other bits Correct value: 0101 1001 0011 0 Even Parity - even number of 1s sent Result: 0111 1001 0011 0 Parity Error odd number of 1s received Parity can be even or odd. Parity detect a single error in a protected block
www.UandiStar
1-36
Combinatorial logic
NOT
OR AND
www.UandiStar
1-37
write
output
www.UandiStar
1-38
write
output
www.UandiStar
1-39
Binary Logic
All possible combinatorial logic systems can be implemented with three functions:
A B 0 1 0 1 D 0 1 0 1 AoB 0 0 0 1 CpD 0 1 1 1
0 1
0 0 0
1 0 1
0 0 1 1 C
+ 0 1
0 0 1
1 1 1
0 0 1 1
Truth Tables
E
E 1 0
www.UandiStar
NOT(E)
0 1
1-40
Logic Levels
input Vin
0
Vin
www.UandiStar
1-41
Summary
Fundamental concepts of digital systems Binary codes, number systems, and arithmetic Boolean algebra Simplification of switching equations Digital device characteristics (e.g., TTL, CMOS)/design considerations Combinatoric logical design including LSI implementation Hazards, Races, and time related issues in digital design Flip-flops and state memory elements Sequential logic analysis and design Synchronous vs. asynchronous design Counters, shift register circuits Memory and Programmable logic Minimization of sequential systems Introduction to Finite Automata
www.UandiStar
1-42
www.UandiStar
1-43