Академический Документы
Профессиональный Документы
Культура Документы
DIGITAL ELECTRONICS
I
N
T
R
O
D
U
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
I • Digital age
N • Digital computers
T – many scientific, industrial and commercial applications
R – space program
O • Digital systems
D – telephone switching exchanges
U
– digital camera
C
– electronic calculators, PDA's
T
I – digital TV
O • Discrete information-processing systems
N • Why binary?
– reliability: a transistor circuit is either on or off (two stable states)
DIGITAL ELECTRONICS & MICROPROCESSORS
DEFINATION
•Discrete System - a system with a finite number of sizes or
measures
I
N –Shoes, Dresses, Pants, Bolts, Pencils
T • Digital System - a Discrete System with only two values of
R system variables: 1 and 0
O
–True/False; Yes/No; Male/Female; On/Off
D
U •Let’s compare digital and continuous (analog) systems
C –Digital signals are binary; analog signals are real-valued
T numbers
I
–Digital is less susceptible to noise
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
• What is design?
I – Given a specification of a problem, come up with a way of solving it
N choosing appropriately from a collection of available components
T – While meeting some criteria for size, cost, power, beauty, elegance, etc.
R
O • What is logic design?
D – Determining the collection of digital logic components to perform a
U specified control and/or data manipulation and/or communication
C function and the interconnections between them
T – Which logic components to choose? – there are many implementation
I technologies (e.g., off-the-shelf fixed-function components,
O programmable devices, transistors on a chip, etc.)
N – The design may need to be optimized and/or transformed to meet design
constraints
DIGITAL ELECTRONICS & MICROPROCESSORS
Digital System
I • No state present
N – Combinational Logic System
T
– Output = Function(Input)
R
O • State present
D – State updated at discrete times
U => Synchronous Sequential System
C – State updated at any time
T
I =>Asynchronous Sequential System
O – State = Function (State, Input)
N – Output = Function (State)
or Function (State, Input)
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N Memory
T
R
O
D Control
CPU unit Datapath
U
C
T Inputs:
Outputs: CRT,
I Keyboard,
LCD, modem,
O mouse, modem, Input/Output
N
speakers
microphone
DIGITAL ELECTRONICS & MICROPROCESSORS
A digital computer
I
N
T
R
O
D
U
C
T
I
O
N
- stored program
- control unit
- arithmetic computations and logical operations
DIGITAL ELECTRONICS & MICROPROCESSORS
Signal
• An information variable represented by physical quantity.
I
N • For digital systems, the variable takes on discrete values.
T • Two level, or binary values are the most prevalent values in
R digital systems.
O • Binary values are represented abstractly by:
D – digits 0 and 1
U
– words (symbols) False (F) and True (T)
C
T – words (symbols) Low (L) and High (H)
I – and words On and Off.
O • Binary values are represented by values or ranges of values
N of physical quantities
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T Time
R Continuous
O
in value &
D Analog
U
time
C
T Digital Discrete in
I value &
O Asynchronous continuous
N in time
Discrete in
Synchronous
value &
time
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T OUTPUT INPUT
R 5.0
O
D
HIGH HIGH
4.0
U
C 3.0
T Threshold
I 2.0 Region
O
N 1.0
LOW LOW
0.0
Volts
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N • What are other physical quantities represent 0 and 1?
T
R
– CPU Voltage
O – Disk Magnetic Field Direction
D – CD Surface Pits/Light
U – Dynamic RAM Electrical Charge
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N Technology State 0 State 1
T
Relay logic Circuit Open Circuit Closed
R CMOS logic 0.0-1.0 volts 2.0-3.0 volts
O Transistor transistor logic (TTL) 0.0-0.8 volts 2.0-5.0 volts
D Fiber Optics Light off Light on
U Dynamic RAM Discharged capacitor Charged capacitor
Nonvolatile memory (erasable) Trapped electrons No trapped electrons
C
Programmable ROM Fuse blown Fuse intact
T Bubble memory No magnetic bubble Bubble present
I Magnetic disk No flux reversal Flux reversal
O Compact disc No pit Pit
N
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N • Computer Aided Design Tools
T
– Design entry
R
O – Synthesis
D – Verification and simulation
U – Physical design
C
T – Fabrication
I – Testing
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
5 Analog Waveform
I
N
Voltage (V)
T
R
O
Time
D 0
U
C Digital Waveform
5
T 1 1
Voltage (V)
I
O
N
0 Time
0
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T
R
O
D
NUMBER SYSTEM
U
C 9x10
T 9 1x10
I
O 123
N
1×102 + 2×101
+ or3×100
1 hundred, 2 tens
and 3 units
DIGITAL ELECTRONICS & MICROPROCESSORS
Bases
I
• When counting upwards in base-10, we increase
N the units digit until we get to 10 when we reset the
T units to zero and increase the tens digit.
R • So, in base-n, we increase the units until we get to
O
D
n when we reset the units to zero and increase the
U n-s digit.
C • Consider hours-minutes-seconds as an example of
T a base-60 number system:
I
O Eg. 12:58:43 + 00:03:20 = 13:02:03
N
NB. The base of a number is often indicated by a
subscript. E.g. (123)10 indicates the base-10 number
123.
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N • Uses the ten numbers from 0 to 9
T
R • Each column represents a power of 10
O
D
U Thousands (103 ) column
C Hundreds (102 ) column
T Tens (101 ) column
I Ones (100 ) column
O
N
199910 = 1x103 + 9x102 + 9x101 + 9x100
DIGITAL ELECTRONICS & MICROPROCESSORS
I • Base 10
N – Ten digits, 0-9
T – Columns represent (from right to left) units, tens,
R
hundreds etc.
O
D
U
C
T
123
I
O
N 1×102 + 2×101 + 3×
10
or
0
1001 2
= 1x2 3 + 0x2 2 + 0x2 1 + 1x2 0
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T Example – Converting (123)10 into
R binary
123 ÷ 2= 61 remainder 1 Least significant bit (rightmost)
O
D
61 ÷ 2 = 30 remainder 1
U 30 ÷ 2 = 15 remainder 0
C 15 ÷ 2 = 7 remainder 1
T 7 ÷ 2 = 3 remainder 1
I 3 ÷ 2 = 1 remainder 1
O 1 ÷ 2 = 0 remainder 1 Most significant bit (leftmost)
N
Two’s Complement
Hexadecimal
I • Base 16
N
T – Sixteen digits, 0-9 and A-F (ten to fifteen)
R – Columns represent (from right to left) units, 16s, 256s,
O 4096s etc.
D
U 7B
C
T
I 7×161 + 11×160 =
O 123
N
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T Converting (123)10 into hex
R
O123 ÷ 16 = 7 remainder 11 (or B)
D 7 ÷ 16 = 0 remainder 7
U
C
T
Answer : (123)10 = (7B)16
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T • Binary long addition works just like
R
O
decimal long addition.
D
U 1 0 0 1 1 1
C
+ 0 0 1 1 1 0
T
I 0 1 1 1 0 0 Carried digits
O 1 1 0 1 0 1 Result
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Multiplication
I
N
T • Performed just like you would performed it in
R decimal, except the additions are in binary.
O • Ex:
D • 11 X 13= 143
U
C • Signed (2’s comp.) multiplication can be
T performed by the addition of shifted
I multiplicands, except for the last multiplicand
O which should be negated then shifted.
N
• Ex:
• -3 X –5 = 15
DIGITAL ELECTRONICS & MICROPROCESSORS
Division
I There are over 8,000 ways that you can chose 10 elements
N from the 16 binary numbers of 4 bits. A few are useful:
T
R
O Decimal 8,4,2,1 Excess3 8,4,-2,-1 Gray
D 0 0000 0011 0000 0000
U 1 0001 0100 0111 0100
C 2 0010 0101 0110 0101
3 0011 0110 0101 0111
T
4 0100 0111 0100 0110
I 5 0101 1000 1011 0010
O 6 0110 1001 1010 0011
N 7 0111 1010 1001 0001
8 1000 1011 1000 1001
9 1001 1100 1111 1000
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N
T
R
O
D CODES
U
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Gray Code
I
N
T • How does the shaft encoder work?
R
O
D
U
C
• For the binary code, what codes may be
T produced if the shaft position lies
I between codes for 3 and 4 (011 and 100)?
O
N
• Is this a problem?
DIGITAL ELECTRONICS & MICROPROCESSORS
I
N • Do NOT mix up conversion of a decimal
T number to a binary number with coding a
R
O decimal number with a BINARY CODE.
D
U
• 1310 = 11012 (This is conversion)
C • 13 ⇔ 0001|0011 (This is coding)
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Error-Detection Codes
I
• Redundancy (e.g. extra information), in the form
N of extra bits, can be incorporated into binary code
T words to detect and correct errors.
R • A simple form of redundancy is parity, an extra bit
O
D
appended onto the code word to make the number
U of 1’s odd or even. Parity can detect all single-bit
C errors and some multiple-bit errors.
T • A code word has even parity if the number of 1’s
I in the code word is even.
O
N • A code word has odd parity if the number of 1’s in
the code word is odd.
DIGITAL ELECTRONICS & MICROPROCESSORS
ASCII Properties
I
N
ASCII has some interesting properties:
T
R Digits 0 to 9 span Hexadecimal values 3016 to 3916 .
O Upper case A-Z span 4116 to 5A16 .
D Lower case a-z span 6116 to 7A16 .
U
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Transfer of information
I
N
T
R
O
D
U
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Boolean algebra
I
N
T
• George Boole (1815-1864)
R • Boolean values
O
D • Boolean operations
U
C • Boolean functions
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
What is an algebra?
I
N • Term from Hisab al-jabr w'al-muqabala by
T
R al-Khwarizmi (~780-850, Baghdad)
O • Consists of
D
U – a set of values
C (e.g., the integers)
T
I – a set of functions
O • multiplication
N • addition
DIGITAL ELECTRONICS & MICROPROCESSORS
Boolean Algebra
I • Digital circuits need to be as simple as
N
T possible.
R
O
• Complex logical expressions should be
D reduced to simpler expressions,
U
C
however, produce same results under
T all conditions.
I
O
• Benefit: Simpler expressions can be
N implemented with simpler circuits,
which are cost effective.
DIGITAL ELECTRONICS & MICROPROCESSORS
Boolean Algebra
I
N • Mathematics of logical expression is the
T tool to reduce the complicated expressions.
R
O • Introduced by George Boole in 1854 and
D
U
known today as Boolean Algebra.
C • The rules of Boolean Algebra is simple and
T
I straightforward, can be applied to any
O logical expression.
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Digital Circuits
I • Combinatorial logic
N
T – Results of an operation depend only on the present
R inputs to the operation
O – Uses: perform arithmetic, control data movement,
D compare values for decision making
U
C • Sequential logic
T – Results depend on both the inputs to the operation and
I the result of the previous operation
O
– Uses: counter
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Computer Implementation
I • Gates or logical gates
N
– Integrated circuits constructed from transistor
T
R switches and other electronic components
O – VLSI: very large-scale integration
D
U
C
T
I
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS
Boolean Operators
I • AND A B C
N
T – Result TRUE if and only if both input 0 0 0
R operands are true 0 1 0
O – C=AB 1 0 0
D 1 1 1
U
C • INCLUSIVE-OR
T – Result TRUE if any input operands are A B C
I 0 0 0
true
O 0 1 1
N – C=A+B
1 0 1
1 1 1
DIGITAL ELECTRONICS & MICROPROCESSORS
Boolean Operators
I • NOT
N
T – Result TRUE if single input value is FALSE
R – C=A
O
D
U
C A C
T 0 1
I 1 0
O
N
DIGITAL ELECTRONICS & MICROPROCESSORS