Sie sind auf Seite 1von 54

Digital

Fundamentals
11th Global Edition

Floyd

Chapters 1-2

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 1


Topics
• Analogue and digital systems
• Binary levels and waveforms
• Logic functions
• Other logic circuits and applications
• Number Systems

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 2


1-1 Analogue and Digital Systems
Analogue Quantities
Most natural quantities are analogue and vary continuously
in time and value.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 3


1-1 Analogue and Digital Systems
Digital Quantities

After sampling at certain time instants, an analogue signal


is converted into a time-discretized signal.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 4


1-1 Analogue and Digital Systems
Quantization

After sampling, the value at each time instant is still


continuous in a range. That value can not be stored on a
computer.
Each value will be assigned to one of a set of discretized
numbers.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 5


1-1 Analogue and Digital Systems
Digital Signals and Digital Systems
A digital signal is a time-discretized and value-discretized
version of an analogue signal.
It has a staircase waveform.
Digital signals more resistant to interference.
Each value can be represented by a binary number, i.e., a
binary string in time domain. Hence, an analogue signal can
be converted into a binary string (digital signal).
A digital system is a circuit to handle binary signals.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 6


1-1 Analogue and Digital Systems
Digital Signals and Digital Systems
With the advancement of IC technology and the reduced
costs of IC circuits, many instruments have been made
into digital form to handle binary inputs.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 7


1-1 Analogue and Digital Systems
Analogue Systems

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 8


1-1 Analogue and Digital Systems
Mixed Systems

Many systems use a mix of analogue and digital electronics


to take advantage of each technology. A typical CD player
accepts digital data from the CD drive and converts it to an
analogue signal for amplification.
CD drive

10110011101 Digital-to-analog Linear amplifier


Digital data converter Analog
reproduction
of music audio Speaker
signal
Sound
waves

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 9


1-1 Analogue and Digital Systems
Mixed Systems

Recording system on computers (AD conversion)


Audio play system on computers (DA conversion)
Digital TV (AD conversion, transmission, DA conversion)

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 10


1-2 Binary Levels and Waveforms
Binary Digits and Logic Levels

Digital systems use circuits that have two states, which are
represented by two different voltage levels called HIGH
and LOW. The voltages represent numbers in the binary
system.
VH(max)
In binary system, a single HIGH
number is called a bit (for VH(min)

binary digit). A bit can have the Invalid


VL(max)
value of either 0 or 1,
depending on whether the LOW
VL(min)
voltage is LOW or HIGH.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 11


1-2 Binary Levels and Waveforms

Digital Waveforms

Digital waveforms change between the LOW and HIGH


levels. A positive going pulse is one that goes from LOW to
HIGH and then back again. Digital waveforms are made up
of a series of pulses.
HIGH HIGH
Rising or Falling or Falling or Rising or
leading edge trailing edge leading edge trailing edge

LOW LOW
t0 t1 t0 t1

(a) Positive–going pulse (b) Negative–going pulse

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 12


1-2 Binary Levels and Waveforms

Pulse Definitions
Actual pulses are not ideal but are described by rise time, fall
time, amplitude, and other parameters.
Overshoot
Ringing
Droop
90%
Amplitude tW
50%
Pulse width

10%
Ringing

Base line Undershoot


tr tf
Rise time Fall time

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 13


1-2 Binary Levels and Waveforms

Pulse Definitions (Figure 1-6)


In addition to frequency and period, repetitive pulse waveforms
are described by the amplitude (A), pulse width (tW), period (T)
and duty cycle. Duty cycle is the ratio of tW to T.
Volts

Pulse
width
Amplitude (A)
(tW)

Time
Period, T

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 14


1-2 Binary Levels and Waveforms

Waveforms
Figure 1.8 Examples of digital waveforms.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 15


1-2 Binary Levels and Waveforms

Waveforms
Figure 1.9 Examples of digital waveforms with rectangular
pulses.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 16


1-2 Binary Levels and Waveforms

Periodic Pulse Waveforms

Periodic pulse waveforms are composed of pulses that repeat


in a fixed interval called the period. The frequency is the
rate of repeation and is measured in hertz.
1 1
f  T
T f

The clock is a basic timing signal that is an example of a


periodic wave.
Example: What is the period of a repetitive wave if f = 3.2 GHz?
Solution: 1 1
T   313 ps
f 3.2 GHz

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 17


1-2 Binary Levels and Waveforms

Periodic Pulse Waveforms

Example: What is the duty cycle of the following waveform?

Solution:
1
D  0.1  10%
10

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 18


1-2 Binary Levels and Waveforms

Waveforms
Figure 1.10 Example of a clock waveform synchronized
with a waveform representation of a sequence of bits.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 19


1-2 Binary Levels and Waveforms
Timing Diagram
A timing diagram is the time-aligned relationship between
two or more digital waveforms.

A diagram like this can be observed directly on a logic


analyzer.
© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 20
1-2 Binary Levels and Waveforms
Serial and Parallel Data

Data can be transmitted by either serial transfer or parallel


transfer format.
1 0 1 1 0 0 1 0
t0 t1 t2 t3 t4 t5 t6 t7
Computer Modem

1
Computer Printer
0

0
t0 t1

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 21


1-3 Logic Functions
Basic Logic Functions

High only if all inputs are high.

Low only if all inputs are low.

Indicates the opposite condition.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 22


1-3 Logic Functions
Basic Logic Functions

NAND, NOR, XOR, XNOR can be implemented as


functions of the three basic functions.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 23


1-4 Basic System Functions
Comparator/adder
And, or, and not elements can be combined to form
various logic functions. A few examples are:

The comparison function A


Comparator
A> B

Two
binary A= B Outputs
numbers
B
A< B

Basic arithmetic functions Adder


A
Σ Sum
Two
binary
numbers
Cout Carry out
B
Carry in Cin

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 24


1-4 Basic System Functions
Coder/encoder
HIGH
9 Encoder
8
7
6 Binary code
5 for 9 used for

The encoding function


4 storage and/or
3 computation
2
7 8 9 1
4 5 6 0
1 2 3
0 . +/–
Calculator keypad

The decoding function


Decoder

Binary input

7-segment display

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 25


1-4 Basic System Functions
Multiplexer/demultiplexer

The data selection function


Multiplexer Demultiplexer
A D
Data from Data from Data from Data from
A to D B to E C to F A to D
∆t1 ∆t1
∆t1 ∆t2 ∆t3 ∆t 1
B E
∆t2 ∆t 2
∆t3 ∆t3
C F

Switching Switching
sequence sequence
control input control input

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 26


1-4 Basic System Functions
Counter
The counting function

Counter Parallel
output lines Binary Binary Binary Binary Binary
code code code code code
1 2 3 4 5 for 1 for 2 for 3 for 4 for 5
Input pulses
Sequence of binary codes that represent
the number of input pulses counted.

…and other functions such as code conversion


and storage.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 27


1-4 Basic System Functions
Register
One type of storage function is the shift register,
that moves and stores data each time it is clocked.
Serial bits
on input line
Initially, the register contains onlyinvalid
0101 0 0 0 0 data or all zeros as shown here.

First bit (1) is shifted serially into the


010 1 0 0 0 register.

Second bit (0) is shifted serially into


01 0 1 0 0 register and first bit is shifted right.

Third bit (1) is shifted into register and


0 1 0 1 0 the first and second bits are shifted right.

Fourth bit (0) is shifted into register and


0 1 0 1 the first, second, and third bits are shifted
right. The register now stores all four bits
and is full.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 28


1-5-6 Types of Logic Devices
Programmable Logic

Programmable logic devices are an alternative to fixed


function devices. The logic can be programmed for a
specific purpose. In general, they cost less and use less
board space than fixed function devices.
The following device uses a combination of a
programmable AND array and a fixed OR array:

Fixed OR
Programmable array and
AND array
output logic

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 29


1-5-6 Types of Logic Devices
Fixed Function Logic

A collection of logic gates and/or other electronic


circuits fabricated on a single silicon chip
CMOS: a silicon chip fabrication technology
based on use of complementary pairs of NMOS
and PMOS field effect transistors (MOSFETs).
TTL: a silicon chip fabrication technology based
on bipolar junction transistors.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 30


1-6 Fixed Function Logic
DIP

Cutaway view of DIP (Dual-In-line Pins) chip:


Plastic
Chip case

Pins

The TTL series, available as DIPs are popular


for laboratory experiments with logic.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 31


1-6 Fixed Function Logic
Testing

An example of laboratory prototyping is shown. The circuit


is wired using DIP chips and tested.

DIP chips
In this case, testing can
be done by a computer
connected to the system.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 32


1-6 Fixed Function Logic
SOIC

DIP chips and surface mount chips

Pin 1

Dual in-line package Small outline IC (SOIC)

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 33


1-6 Fixed Function Logic
PLCC/LCCC

Other surface mount packages:

End view End view End view

SOIC PLCC LCCC

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 34


1-7 Test and Measurement Instruments
Digital Multimeter 0.01 V
O FF V
Hz

The DMM can make three basic m V

electrical measurements.
A Ra n g e
A u t o ra n g e 1 s

To u c h / H o ld 1 s
10 A
V

Voltage
40 m A C O M

Fu se d

Resistance
Current

In digital work, DMMs are useful for checking power


supply voltages, verifying resistors, testing continuity,
and occasionally making other measurements.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 35


1-7 Test and Measurement Instruments
Digital Multimeter
Takes an analogue quantity and displays it in digital format.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 36


1-7 Test and Measurement Instruments
Digital Clock
To represent the time, most digital clocks use a seven-
segment LED, VFD, or LCD display for each of four digits.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 37


Examples of Digital Systems
Programmable Logic Controller
A digital computer used for automation of industrial
electromechanical processes, such as control of machinery
on factory assembly lines, amusement rides, or light
fixtures.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 38


Examples of Digital Systems
Microprocessors/Microcontrollers

CPU: adder/subtractor, registers


Control unit: encoder, decoder, multiplexing,
tri-state devices, latches
Clock circuitry: clock drivers
Timer: counters, multiplexer
Memory: encoder, decoder

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 39


Chapter 2 Number Systems
Decimal System

A decimal number is expressed as the sum of the products of


each digit times the column value for that digit.
Thus, the number 9240 can be expressed as

     (9 x 10 ) + (2 x 10 ) + (4 x 10 ) + (0 x 10 )
3 2 1 0

or
9 x 1,000 + 2 x 100 + 4 x 10 + 0 x 1

The value “10” is called radix.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 40


Chapter 2 Number Systems
Binary System
For digital systems, the binary number system is used. This
system has a radix of two and uses the digits 0 and 1 to
represent quantities.
The weights of binary numbers are powers of two that
increase from right to left beginning with 20 =1:
…25 24 23 22 21 20.
For fractional binary numbers, the weights are negative
powers of two that decrease from left to right:

22 21 20. 2-1 2-2 2-3 2-4 …

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 41


Chapter 2 Number Systems
Decimal Binary
Number Number
0 0000
Binary Numbers
1 0001
2 0010
A binary counting sequence for numbers
3 0011
from zero to fifteen is shown. 4 0100

Notice the pattern of zeros and ones 5 0101


6 0110
in each column.
7 0111
Digital counters frequently have this 8 1000
same pattern of digits: 9 1001
10 1010
Counter 0 1 0 1 0 1 0 1 0 1 Decoder
11 1011
0 0 1 1 0 0 1 1 0 0
12 1100
0 0 0 0 1 1 1 1 0 0
13 1101
0 0 0 0 0 0 0 0 1 1 14 1110
15 1111

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 42


Chapter 2 Number Systems
Binary to Decimal Conversion
The decimal equivalent of a binary number is determined by
adding the column values of all the bits that are 1 and
discarding that of all the bits that are 0.

Example: Convert the binary number 100101.01 to


decimal.
Solution: Start by writing the column weights; then add
the weights that correspond to each 1 in the number.
25 24 23 22 21 20. 2-1 2-2
32 16 8 4 2 1 . ½ ¼
1 0 0 1 0 1. 0 1
32 +4 +1 +¼ = 37¼
© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 43
Chapter 2 Number Systems
Decimal to Binary Conversion
You can convert a decimal whole number to binary by
reversing the procedure. Write the decimal weight of each
column and place 1’s in the positions that sum to the
decimal number.
Example: Convert the decimal number 49 to binary.
Solution: The position weights double in each position to
the right. Write down position weights until the last
number is larger than the one you want to convert.
26 25 24 23 22 21 20.
64 32 16 8 4 2 1.
0 1 1 0 0 0 1.

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 44


Chapter 2 Number Systems
Decimal to Binary Conversion
You can convert a decimal fraction to binary by repeatedly
multiplying the fractional results of successive
multiplications by 2. The carries form the binary number.
Example: Convert the decimal fraction 0.188 to binary by
repeatedly multiplying the fractional results by 2.
Solution:
MSB
0.188 x 2 = 0.376 carry = 0
0.376 x 2 = 0.752 carry = 0
0.752 x 2 = 1.504 carry = 1
0.504 x 2 = 1.008 carry = 1
0.008 x 2 = 0.016 carry = 0
© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 45
Chapter 2 Number Systems
Binary Addition
The rules for binary addition are
0 + 0 = 0 Sum = 0, carry = 0
0 + 1 = 1 Sum = 1, carry = 0
1 + 0 = 1 Sum = 1, carry = 0
1 + 1 = 10 Sum = 0, carry = 1
When an input carry = 1 due to a previous result, the rules
are
1 + 0 + 0 = 01 Sum = 1, carry = 0
1 + 0 + 1 = 10 Sum = 0, carry = 1
1 + 1 + 0 = 10 Sum = 0, carry = 1
1 + 1 + 1 = 11 Sum = 1, carry = 1

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 46


Chapter 2 Number Systems
Binary Addition
Example: Add the binary numbers 00111 and 10101 and
show the equivalent decimal addition.
Solution:
00111 7
10101 21
11100 = 28

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 47


Chapter 2 Number Systems
Binary Subtraction
The rules for binary subtraction are
0-0=0
1-1=0
1-0=1
10 - 1 = 1 with a borrow of 1

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 48


Chapter 2 Number Systems
Binary Subtraction
Example: Subtract the binary number 00111 from 10101
and show the equivalent decimal subtraction.
Solution:
10101 21
00111 7

01110 = 14

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 49


Motivation

Design of digital circuits


Design of products and systems that use them
Development of algorithms and software for digital
systems
Traffic light system
Vending machine
Pre-requisite of 300076 Microprocessor Systems
Pre-requisite of 300044 Microcontrollers and PLCs

© 2015 Pearson Education. Modified by Q. Cheng. Chapter 1 50


Selected Key Terms

Analogue Being continuous or having continuous values.


Digital Related to digits or discrete quantities; having a set
of discrete values.
Binary Having two values or states; describes a number
system that has a base of two and utilizes 1 and 0
as its digits.
Bit A binary digit, which can be a 1 or a 0.
Pulse A sudden change from one level to another,
followed after a time, called the pulse width, by a
sudden change back to the original level.

Floyd, Digital Fundamentals, 10th ed


Selected Key Terms

Clock A basic timing signal in a digital system; a periodic


waveform used to synchronize actions.
Gate A logic circuit that performs a basic logic
operations such as AND or OR.
NOT A basic logic function that performs inversion.
AND A basic logic operation in which a true (HIGH)
output occurs only when all input conditions are
true (HIGH).
OR A basic logic operation in which a true (HIGH)
output occurs when when one or more of the input
conditions are true (HIGH).
Floyd, Digital Fundamentals, 10th ed
Selected Key Terms

Number System A radix-based system to represent quantities


Decimal System Radix-10 system
Binary System Radix-2 system
Conversion Conversion between decimal and binary numbers
Operation Addition and subtraction

Floyd, Digital Fundamentals, 10th ed


Summary

• Digital signal
• Logic levels
• NOT, AND, OR functions
• Basic system function
• Number systems

Floyd, Digital Fundamentals, 10th ed

Das könnte Ihnen auch gefallen