You are on page 1of 48

ELEC 204

Digital Design
g

Lecture 1 – Introductory Concepts


Dr. Ertuğrul Başar
Department of Electrical and Electronics
Engineering

Spring 2023
LECTURE 1
• Introductory Concepts
• Digital and Analog Quantities
• Binary Digits
• Logic Levels
• Digital Waveforms
• Basic Logic Functions
• Introduction to Programmable Logic
• Fixed Function Logic Devices

2
What is Digital?
• Ordinary Encounters of the Word Digital….

Analog Clock Digital Clock

Analog TV Digital TV

3
Analog vs. Digital Electronics

4
Analog and Digital Quantities
• An analog quantity is one having continuous values.

• A digital quantity is one having a discrete set of values.

• Most natural quantities (temperature, time, pressure, distance, sound) that we see
are analog and vary continuously

5
Analog and Digital Quantities
• Take a temperature reading every hour à Now you have sampled values
representing the temperature at discrete points in time.

• Each value represented by a dot can be digitized by representing it as a digital code


that consists of a series of 1s and 0s.

6
An Analog System
• Amplify the sound so that it can be heard by a large audience à example of analog
electronics.

• Both input and output are analog!

7
A System Using Digital and Analog Methods
• Many systems use a mix of analog 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
analog signal for amplification.

• When the music was originally recorded on the CD, a process using an analog-to-
digital converter (ADC) was used.

8
Mechatronics
• Both digital and analog electronics are used in the control of various mechanical
systems.

• The interdisciplinary field that comprises both mechanical and electronic


components is known as mechatronics.

9
Advantages of Digital Systems Over Analog Systems
• Reproducibility of the results

• Accuracy of results

• More reliable than analog systems due to better immunity to noise.

• Ease of design: No special math skills needed to visualize the behavior of small
digital (logic) circuits.

• Flexibility and functionality.

• Programmability.

• Speed: A digital logic element can produce an output in less than 10 nanoseconds.

• Economy: Due to the integration of millions of digital logic elements on a single


miniature chip forming low-cost integrated circuit (ICs).
10
Binary Digits and Logic Levels
• Digital electronics uses 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.

• In binary, a single number is called a bit (for binary digit).

• A bit can have the value of either a 0 or a 1, depending on if the voltage is HIGH or
LOW.

• Groups of bits (combinations of 1s and 0s), called codes,


are used to represent numbers, letters, symbols,
instructions, etc.

• Example: CMOS digital circuit technology


à HIGH: 2 V – 3.3 V, LOW: 0 V – 0.8 V

11
Digital Waveforms
• Digital waveforms change between the LOW and HIGH levels.

• A positive going pulse is one that goes from a normally LOW logic level to a HIGH
level and then back again.

• Digital waveforms are made up of a series of pulses.

12
The Pulse
• If the rising and falling edges are assumed to change in zero time (instantaneously)
à the pulses are ideal

• Actual pulses are not ideal but are described by the rise time, fall time, amplitude,
and other characteristics.

13
Waveform Characteristics
• Most waveforms encountered in digital systems are composed of series of pulses
(called pulse trains) and can be classified as à either periodic or nonperiodic.

• A periodic pulse waveform is one that repeats itself at a fixed interval, called a
period (T). The frequency (f) is the rate at which it repeats itself and is measured in
hertz (Hz).

• Duty cycle à the ratio of the pulse width to the period:

14
Waveform Characteristics - Example

15
The Clock
• In digital systems, all waveforms are synchronized with a basic timing waveform
called the clock à does not carry information.

• It is a periodic waveform in which each interval between pulses (the period) equals
the time for one bit.

16
Timing Diagrams
• A timing diagram is used to show the relationship between two or more digital
waveforms.

• How each waveform changes in relation to the others?

• A diagram like this can be observed directly on a logic analyzer.

17
Data Transfer
• Data à groups of bits that convey some type of information.

• Binary data must be transferred from one device to another within a digital system
or from one system to another to accomplish a given purpose (RAM à CPU).

• Data can be transmitted by either serial transfer or parallel transfer.

18
Data Transfer - Example

19
Basic Logic Functions
• Several propositions, when combined, form propositional, or logic, functions.

• “The light is on” will be true if “The bulb is not burned out” is true and if “The
switch is on” is true à the first statement is true only if the last two statements are
true.

• The Irish logician and mathematician George Boole (1850s) developed a


mathematical system for formulating logic statements with symbols.

• The term logic is applied to digital circuits used to implement logic functions.

• Three basic logic functions: NOT, AND, and OR à A circuit that performs a specified
logic function is called a logic gate.

20
NOT
• The NOT function changes one logic level to the opposite logic level.

• In either case, the output is not the same as the input.

• The NOT function is implemented by a logic circuit known as an inverter.

21
AND
• The AND function produces a HIGH output only when all the inputs are HIGH.

• The AND function is implemented by a logic circuit known as an AND gate.

22
OR
• The OR function produces a HIGH output when one or more inputs are HIGH.

• The OR function is implemented by a logic circuit known as an OR gate.

23
Summary: Three Basic Logic Functions

Basic Logic Functions

True only if all input conditions


are true.

True only if one or more input


conditions are true.

Indicates the opposite condition.

24
Basic System Functions: Comparison
• AND, OR, and NOT elements can be combined to form various logic functions. A
few examples are given.

• Magnitude comparison is performed by a logic circuit called a comparator.

25
Basic System Functions: Arithmetic Functions
• Addition is performed by a logic circuit called an adder.

• Subtraction is also performed by a logic circuit. A subtracter requires three inputs:


the two numbers that are to be subtracted and a borrow input.
• Subtraction à a special case of addition.
• Multiplication à performed by multiplicator: series of additions with shifts
• Division à performed by divider: series of substractions, comparisons, and shifts
26
Basic System Functions: Encoding
• The encoding function is performed by a logic circuit called an encoder.

• The encoder converts information, such as a decimal number or an alphabetic


character, into some coded form.

27
Basic System Functions: Decoding
• The decoding function is performed by a logic circuit called a decoder.

• The decoder converts coded information, such as a binary number, into a


noncoded form, such as a decimal form.

28
Basic System Functions: Data Selection
• The multiplexer (mux) is a logic circuit that switches digital data from several input
lines onto a single output line in a specified time sequence.

• The demultiplexer (demux) is a logic circuit that switches digital data from one
input line to several output lines in a specified time sequence.

• Used when data from several sources are to be transmitted over one line to a
distant location and redistributed to several destinations à time division
multiplexing (TDM).

29
Basic System Functions: Storage
• Storage is a function that is required in most digital systems, and its purpose is to
retain binary data for a period of time.

• A storage device can “memorize” a bit or a group of bits and retain the information
as long as necessary.

• Common types of storage devices à flip-flops, registers, semiconductor memories,


magnetic disks, magnetic tape, and optical disks (CDs).

• A flip-flop is a bistable (two stable states) logic circuit that can store only one bit at
a time, either a 1 or a 0. HIGH output à 1, LOW output à 0.

30
Basic System Functions: Storage
• A register is formed by combining several flip-flops so that groups of bits can be
stored. 8-bit register à 8 flip-flops

• Registers can also be used to shift the bits from one position to another within the
register or out of the register to another circuit à shift registers.

• The two basic types of shift registers à serial and parallel.

Passengers in a bus Passengers in a roller coaster 31


Basic System Functions: Storage
• Semiconductor memories are devices typically used for storing large numbers of
bits.
• In read-only memory or ROM, the binary data are permanently stored and cannot
be readily changed.
• In random-access memory or RAM, the binary data are temporarily stored and can
be easily changed.

• Magnetic disk memories are used for mass storage of binary data.
• An example is a computer’s internal hard disk.

• CDs, DVDs, and Blu-ray Discs are storage devices based


on laser technology.
• A laser beam is used to store the data on the disc and
to read the data from the disc.

32
Basic System Functions: Counting
• The basic purpose of a counter is to count events represented by changing levels or
pulses.

• To count, the counter must “remember” the present number so that it can go to
the next proper number in sequence.

• Therefore, storage capability is an important characteristic of all counters


à flip-flops are generally used.

33
A Process Control System
• Tablet-bottling system à various logic functions working together!

34
Introduction to Programmable Logic
• Programmable logic à requires both hardware and software.

• Programmable logic devices à can be programmed to perform specified logic


functions and operations by the manufacturer or by the user.

• One advantage of programmable logic over fixed-function logic à the devices use
much less board space for an equivalent amount of logic.

• Another advantage à designs can be readily changed without rewiring or replacing


components.

• Also, a logic design can generally be implemented faster and with less cost with
programmable logic than with fixed-function logic.

• To implement small segments of logic à it may be more efficient to use fixed-


function logic.

35
Programmable Logic Devices (PLDs)
• Many types of programmable logic are available
à small devices that can replace a few fixed-function devices
à complex high-density devices that can replace thousands of fixed-function
devices

• Two major categories of user-programmable logic à PLD (programmable logic


device, simple or complex) and FPGA (field-programmable gate array)

36
Simple Programmable Logic Device (SPLD)
• SPLD can replace up to ten fixed-function ICs and their interconnections à for
small-scale applications.

• Most SPLDs are in one of two categories: PAL and GAL.

• A PAL (programmable array logic) à a device that can be programmed one time.

• A GAL (generic array logic) à basically a PAL


that can be reprogrammed many times

A typical SPLD package

37
Complex Programmable Logic Device (CPLD)
• As technology progressed à manufacturers were able to put more than one SPLD
on a single chip and the CPLD was born.
• CPLD à a device containing multiple SPLDs and can replace many fixed-function ICs.
• There can be from 2 to 64 LABs à each LAB is roughly equivalent to one SPLD.
• CPLDs can be used to implement any logic function à decoders, encoders,
multiplexers, demultiplexers, and adders.

Typical CPLD plastic quad flat packages (PQFP)

A basic CPLD block diagram with 4 logic array


blocks (LABs) and 1 programmable
38
interconnection array (PIA).
Field-Programmable Gate Array (FPGA)
• FPGA à generally more complex and has a much higher density than a CPLD.

• SPLD and CPLD are closely related à CPLD basically contains a number of SPLDs.

• FPGA à has a different internal structure (architecture)

39
Field-Programmable Gate Array (FPGA)
• The logic blocks in an FPGA à not as complex as the logic array blocks (LABs) in a
CPLD, but generally there are many more of them.

• Large FPGAs à can have tens of thousands of logic blocks in addition to memory
and other resources

• A typical FPGA ball-grid array package à can have over 1000 input and output pins.

40
The Programming Process
• An SPLD, CPLD, or FPGA à can be thought of as a “blank slate” on which you
implement a specified circuit or system design using a certain process.

• This process requires a software development package à installed on a computer


to implement a circuit design in the programmable chip.

• The computer must be interfaced with


a development board.

Basic setup for programming a


PLD or FPGA. Graphic entry of a
logic circuit is shown for
illustration. Text entry such as
VHDL can also be used.

Basic programmable logic


design flow block diagram 41
Fixed-Function Logic Devices
• All the logic elements and functions that have been discussed à generally available
in integrated circuit (IC) form.

• Digital systems have incorporated ICs for many years à because of their small size,
high reliability, low cost, and low power consumption.

• Despite the trend toward programmable logic à fixed-function logic continues to


be used although on a more limited basis in specific applications.

42
Integrated Circuit (IC)
• Integrated circuit (IC) à an electronic circuit that is constructed entirely on a single
small chip of silicon.

• All the components that make up the circuit—transistors, diodes, resistors, and
capacitors—are an integral part of that single chip.

• Two broad categories of digital ICs à fixed-function logic and programmable logic

43
IC Packages

Example of through-hole
mounted configuration
à pins that are inserted
through holes in the PCB

Examples of surface-
mount technology (SMT)
package configurations
à a space saving
alternative

44
Pin Numbering
• All IC packages have a standard format for numbering the pins (leads).

45
Complexity Classifications for Fixed-Function ICs
• Fixed-function digital ICs are classified according to their complexity:

• Small-scale integration (SSI) à fixed-function ICs that have up to 10 equivalent


gate circuits on a single chip, and they include basic gates and flip-flops.

• Medium-scale integration (MSI) à ICs that have from 10 to 100 equivalent gates
on a chip. They include logic functions such as encoders, decoders, counters,
registers, multiplexers, arithmetic circuits, small memories, and others.

• Large-scale integration (LSI) à a classification of ICs with complexities of from


more than 100 to 10,000 equivalent gates per chip, including memories.

• Very large-scale integration (VLSI) à describes ICs with complexities of from more
than 10,000 to 100,000 equivalent gates per chip.

• Ultra large-scale integration (ULSI) à describes very large memories, larger


microprocessors, and larger single-chip computers. More than 100,000 equivalent
gates per chip are classified as ULSI.
46
Lecture 1 – Home Study
1) Can the digital waveform shown below be called a pulse train? What is the
frequency of this waveform? Is this pulse waveform periodic or nonperiodic?
Determine the duty cycle of this waveform.

2) Determine the bit sequence represented by this waveform. A bit time is 1 us in this
case. What is the total serial transfer time for the eight bits? What is the total parallel
transfer time?

47
Lecture 1 – Home Study
3) Name the logic function of each block based on your observation of the inputs and
outputs.

4) A pulse waveform with a frequency of 20 kHz is applied to the input of a counter.


During 40 ms, how many pulses are counted?

48

You might also like