This chapter discusses methods for implementing combinational logic functions using circuits. It covers topics such as decoding, encoding, enabling functions, priority encoders, multiplexers, and implementing combinational functions using decoders and OR gates, multiplexers, ROMs, PLAs, PALs, and lookup tables. Implementation examples are provided for decoders, encoders, priority encoders, and multiplexers. The chapter also describes how to expand decoders and multiplexers to handle more inputs and outputs.
digital-electronics_9 encoder and decoder pdfsomanathbtech
Encoders and decoders are fundamental components in various fields such as computer science, telecommunications, and information theory. They play crucial roles in transforming data from one format to another, enabling efficient storage, transmission, and processing of information.
An encoder is a device, algorithm, or process that converts data from one form to another. It takes input data and transforms it into a different representation, often in a more compact or suitable format for a particular application. Encoders are commonly used in digital communication systems, where they prepare data for transmission over channels with specific characteristics or constraints.
In digital communication, encoders are essential for converting analog signals into digital form for processing and transmission. For example, in audio and video compression, encoders convert raw audio or video data into compressed formats like MP3 or MPEG, reducing the amount of data required for storage or transmission without significantly compromising quality.
Similarly, in computer networks, encoders prepare data for transmission over network links by converting it into packets with appropriate headers and formatting. This ensures efficient use of bandwidth and enables reliable communication between devices.
In information theory, encoders play a vital role in coding schemes such as error correction and data compression. Error-correcting codes use encoders to add redundancy to data, allowing receivers to detect and correct errors introduced during transmission. Data compression algorithms use encoders to remove redundancy and minimize the amount of data required to represent information, facilitating efficient storage and transmission.
On the other hand, decoders perform the inverse operation of encoders. They take encoded data as input and convert it back into its original format or representation. Decoders are commonly used in conjunction with encoders to enable reversible transformations and ensure accurate reconstruction of the original data.
In digital communication systems, decoders are responsible for recovering transmitted data from received signals, undoing the encoding process applied by the transmitter. This process is critical for reliable communication, especially in noisy or error-prone environments where data may be corrupted during transmission.
In multimedia applications, decoders are used to decompress encoded audio and video data, reconstructing the original signals for playback or further processing. Decoders for popular compression formats like JPEG, MP3, and H.264 are widely used in devices such as smartphones, computers, and streaming media players.
In information theory, decoders are essential for decoding error-correcting codes and recovering the original data despite errors introduced during transmission. Decoders analyze received data and use error detection and correction techniques to identify and correct errors, ensuring the integrity of
digital-electronics_9 encoder and decoder pdfsomanathbtech
Encoders and decoders are fundamental components in various fields such as computer science, telecommunications, and information theory. They play crucial roles in transforming data from one format to another, enabling efficient storage, transmission, and processing of information.
An encoder is a device, algorithm, or process that converts data from one form to another. It takes input data and transforms it into a different representation, often in a more compact or suitable format for a particular application. Encoders are commonly used in digital communication systems, where they prepare data for transmission over channels with specific characteristics or constraints.
In digital communication, encoders are essential for converting analog signals into digital form for processing and transmission. For example, in audio and video compression, encoders convert raw audio or video data into compressed formats like MP3 or MPEG, reducing the amount of data required for storage or transmission without significantly compromising quality.
Similarly, in computer networks, encoders prepare data for transmission over network links by converting it into packets with appropriate headers and formatting. This ensures efficient use of bandwidth and enables reliable communication between devices.
In information theory, encoders play a vital role in coding schemes such as error correction and data compression. Error-correcting codes use encoders to add redundancy to data, allowing receivers to detect and correct errors introduced during transmission. Data compression algorithms use encoders to remove redundancy and minimize the amount of data required to represent information, facilitating efficient storage and transmission.
On the other hand, decoders perform the inverse operation of encoders. They take encoded data as input and convert it back into its original format or representation. Decoders are commonly used in conjunction with encoders to enable reversible transformations and ensure accurate reconstruction of the original data.
In digital communication systems, decoders are responsible for recovering transmitted data from received signals, undoing the encoding process applied by the transmitter. This process is critical for reliable communication, especially in noisy or error-prone environments where data may be corrupted during transmission.
In multimedia applications, decoders are used to decompress encoded audio and video data, reconstructing the original signals for playback or further processing. Decoders for popular compression formats like JPEG, MP3, and H.264 are widely used in devices such as smartphones, computers, and streaming media players.
In information theory, decoders are essential for decoding error-correcting codes and recovering the original data despite errors introduced during transmission. Decoders analyze received data and use error detection and correction techniques to identify and correct errors, ensuring the integrity of
digital-electronics_9 encoder and decoder pdfsomanathbtech
Encoders and decoders are fundamental components in various fields such as computer science, telecommunications, and information theory. They play crucial roles in transforming data from one format to another, enabling efficient storage, transmission, and processing of information.
An encoder is a device, algorithm, or process that converts data from one form to another. It takes input data and transforms it into a different representation, often in a more compact or suitable format for a particular application. Encoders are commonly used in digital communication systems, where they prepare data for transmission over channels with specific characteristics or constraints.
In digital communication, encoders are essential for converting analog signals into digital form for processing and transmission. For example, in audio and video compression, encoders convert raw audio or video data into compressed formats like MP3 or MPEG, reducing the amount of data required for storage or transmission without significantly compromising quality.
Similarly, in computer networks, encoders prepare data for transmission over network links by converting it into packets with appropriate headers and formatting. This ensures efficient use of bandwidth and enables reliable communication between devices.
In information theory, encoders play a vital role in coding schemes such as error correction and data compression. Error-correcting codes use encoders to add redundancy to data, allowing receivers to detect and correct errors introduced during transmission. Data compression algorithms use encoders to remove redundancy and minimize the amount of data required to represent information, facilitating efficient storage and transmission.
On the other hand, decoders perform the inverse operation of encoders. They take encoded data as input and convert it back into its original format or representation. Decoders are commonly used in conjunction with encoders to enable reversible transformations and ensure accurate reconstruction of the original data.
In digital communication systems, decoders are responsible for recovering transmitted data from received signals, undoing the encoding process applied by the transmitter. This process is critical for reliable communication, especially in noisy or error-prone environments where data may be corrupted during transmission.
In multimedia applications, decoders are used to decompress encoded audio and video data, reconstructing the original signals for playback or further processing. Decoders for popular compression formats like JPEG, MP3, and H.264 are widely used in devices such as smartphones, computers, and streaming media players.
In information theory, decoders are essential for decoding error-correcting codes and recovering the original data despite errors introduced during transmission. Decoders analyze received data and use error detection and correction techniques to identify and correct errors, ensuring the integrity of
digital-electronics_9 encoder and decoder pdfsomanathbtech
Encoders and decoders are fundamental components in various fields such as computer science, telecommunications, and information theory. They play crucial roles in transforming data from one format to another, enabling efficient storage, transmission, and processing of information.
An encoder is a device, algorithm, or process that converts data from one form to another. It takes input data and transforms it into a different representation, often in a more compact or suitable format for a particular application. Encoders are commonly used in digital communication systems, where they prepare data for transmission over channels with specific characteristics or constraints.
In digital communication, encoders are essential for converting analog signals into digital form for processing and transmission. For example, in audio and video compression, encoders convert raw audio or video data into compressed formats like MP3 or MPEG, reducing the amount of data required for storage or transmission without significantly compromising quality.
Similarly, in computer networks, encoders prepare data for transmission over network links by converting it into packets with appropriate headers and formatting. This ensures efficient use of bandwidth and enables reliable communication between devices.
In information theory, encoders play a vital role in coding schemes such as error correction and data compression. Error-correcting codes use encoders to add redundancy to data, allowing receivers to detect and correct errors introduced during transmission. Data compression algorithms use encoders to remove redundancy and minimize the amount of data required to represent information, facilitating efficient storage and transmission.
On the other hand, decoders perform the inverse operation of encoders. They take encoded data as input and convert it back into its original format or representation. Decoders are commonly used in conjunction with encoders to enable reversible transformations and ensure accurate reconstruction of the original data.
In digital communication systems, decoders are responsible for recovering transmitted data from received signals, undoing the encoding process applied by the transmitter. This process is critical for reliable communication, especially in noisy or error-prone environments where data may be corrupted during transmission.
In multimedia applications, decoders are used to decompress encoded audio and video data, reconstructing the original signals for playback or further processing. Decoders for popular compression formats like JPEG, MP3, and H.264 are widely used in devices such as smartphones, computers, and streaming media players.
In information theory, decoders are essential for decoding error-correcting codes and recovering the original data despite errors introduced during transmission. Decoders analyze received data and use error detection and correction techniques to identify and correct errors, ensuring the integrity of
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Madhumita Tamhane
In contrast to block codes, Convolution coding scheme has an information frame together with previous m information frames encoded into a single code word frame, hence coupling successive code word frames. Convolution codes are most important Tree codes that satisfy certain additional linearity and time invariance properties. Decoding procedure is mainly devoted to correcting errors in first frame. The effect of these information symbols on subsequent code word frames can be computed and subtracted from subsequent code word frames. Hence in spite of infinitely long code words, computations can be arranged so that the effect of earlier frames, properly decoded, on the current frame is zero.
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Madhumita Tamhane
In contrast to block codes, Convolution coding scheme has an information frame together with previous m information frames encoded into a single code word frame, hence coupling successive code word frames. Convolution codes are most important Tree codes that satisfy certain additional linearity and time invariance properties. Decoding procedure is mainly devoted to correcting errors in first frame. The effect of these information symbols on subsequent code word frames can be computed and subtracted from subsequent code word frames. Hence in spite of infinitely long code words, computations can be arranged so that the effect of earlier frames, properly decoded, on the current frame is zero.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
3. Chapter 4 3
Functions and Functional Blocks
The functions considered are those found to be
very useful in design
Corresponding to each of the functions is a
combinational circuit implementation called a
functional block.
In the past, many functional blocks were
implemented as SSI, MSI, and LSI circuits.
Today, they are often simply parts within a
VLSI circuits.
4. Chapter 4 4
Rudimentary Logic Functions
Functions of a single variable X
Can be used on the
inputs to functional
blocks to implement
other than the block’s
intended function
0
1
F 5 0
F 5 1
(a)
F 5 0
F 5 1
VCC or VDD
(b)
X F 5 X
(c)
X F 5 X
(d)
TABLE 4-1
Functions ofOne Variable
X F = 0 F = X F = F = 1
0
1
0
0
0
1
1
0
1
1
X
5. Chapter 4 5
Multiple-bit Rudimentary Functions
Multi-bit Examples:
A wide line is used to represent
a bus which is a vector signal
In (b) of the example, F = (F3, F2, F1, F0) is a bus.
The bus can be split into individual bits as shown in (b)
Sets of bits can be split from the bus as shown in (c)
for bits 2 and 1 of F.
The sets of bits need not be continuous as shown in (d) for bits 3, 1, and
0 of F.
F
(d)
0
F3
1 F2
F1
A F0
(a)
0
1
A
1
2
3
4
F
0
(b)
4 2:1 F(2:1)
2
F
(c)
4 3,1:0 F(3), F(1:0)
3
A A
6. Chapter 4 6
Enabling Function
Enabling permits an input signal to pass
through to an output
Disabling blocks an input signal from passing
through to an output, replacing it with a fixed
value
The value on the output when it is disable can
be Hi-Z (as for three-state buffers and
transmission gates), 0 , or 1
When disabled, 0 output
When disabled, 1 output
See Enabling App in text
X
F
EN
(a)
EN
X
F
(b)
7. Chapter 4 7
Decoding - the conversion of an n-bit input
code to an m-bit output code with
n m 2n such that each valid code word
produces a unique output code
Circuits that perform decoding are called
decoders
Here, functional blocks for decoding are
• called n-to-m line decoders, where m 2n, and
• generate 2n (or fewer) minterms for the n input
variables
Decoding
8. Chapter 4 8
1-to-2-Line Decoder
2-to-4-Line Decoder
Note that the 2-4-line
made up of 2 1-to-2-
line decoders and 4 AND gates.
Decoder Examples
A D0 D1
0 1 0
1 0 1
(a) (b)
D1 5 A
A
D0 5 A
A1
0
0
1
1
A0
0
1
0
1
D0
1
0
0
0
D1
0
1
0
0
D2
0
0
1
0
D3
0
0
0
1
(a)
D0 5 A1 A0
D1 5 A1 A0
D2 5 A1 A0
D3 5 A1 A0
(b)
A 1
A 0
9. Chapter 4 9
Decoder Expansion
General procedure given in book for any decoder with n
inputs and 2n outputs.
This procedure builds a decoder backward from the
outputs.
The output AND gates are driven by two decoders with
their numbers of inputs either equal or differing by 1.
These decoders are then designed using the same
procedure until 2-to-1-line decoders are reached.
The procedure can be modified to apply to decoders
with the number of outputs ≠ 2n
10. Chapter 4 10
Decoder Expansion - Example 1
3-to-8-line decoder
• Number of output ANDs = 8
• Number of inputs to decoders driving output ANDs = 3
• Closest possible split to equal
2-to-4-line decoder
1-to-2-line decoder
• 2-to-4-line decoder
Number of output ANDs = 4
Number of inputs to decoders driving output ANDs = 2
Closest possible split to equal
• Two 1-to-2-line decoders
See next slide for result
12. Chapter 4 12
Decoder Expansion - Example 2
7-to-128-line decoder
• Number of output ANDs = 128
• Number of inputs to decoders driving output ANDs
= 7
• Closest possible split to equal
4-to-16-line decoder
3-to-8-line decoder
• 4-to-16-line decoder
Number of output ANDs = 16
Number of inputs to decoders driving output ANDs = 2
Closest possible split to equal
• 2 2-to-4-line decoders
• Complete using known 3-8 and 2-to-4 line decoders
13. Chapter 4 13
In general, attach m-enabling circuits to the outputs
See truth table below for function
• Note use of X’s to denote both 0 and 1
• Combination containing two X’s represent four binary combinations
Alternatively, can be viewed as distributing value of signal
EN to 1 of 4 outputs
In this case, called a
demultiplexer
EN
A 1
A 0
D0
D1
D2
D3
(b)
EN A1 A0 D0 D1 D2 D3
0
1
1
1
1
X
0
0
1
1
X
0
1
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
(a)
Decoder with Enable
14. Chapter 4 14
Encoding
Encoding - the opposite of decoding - the conversion
of an m-bit input code to a n-bit output code with n
m 2n such that each valid code word produces a
unique output code
Circuits that perform encoding are called encoders
An encoder has 2n (or fewer) input lines and n output
lines which generate the binary code corresponding
to the input values
Typically, an encoder converts a code containing
exactly one bit that is 1 to a binary code corres-
ponding to the position in which the 1 appears.
15. Chapter 4 15
Encoder Example
A decimal-to-BCD encoder
• Inputs: 10 bits corresponding to decimal
digits 0 through 9, (D0, …, D9)
• Outputs: 4 bits with BCD codes
• Function: If input bit Di is a 1, then the
output (A3, A2, A1, A0) is the BCD code for i,
The truth table could be formed, but
alternatively, the equations for each of the
four outputs can be obtained directly.
16. Chapter 4 16
Encoder Example (continued)
Input Di is a term in equation Aj if bit Aj is 1
in the binary value for i.
Equations:
A3 = D8 + D9
A2 = D4 + D5 + D6 + D7
A1 = D2 + D3 + D6 + D7
A0 = D1 + D3 + D5 + D7 + D9
F1 = D6 + D7 can be extracted from A2 and A1
Is there any cost saving?
17. Chapter 4 17
Priority Encoder
If more than one input value is 1, then the
encoder just designed does not work.
One encoder that can accept all possible
combinations of input values and produce
a meaningful result is a priority encoder.
Among the 1s that appear, it selects the
most significant input position (or the
least significant input position) containing
a 1 and responds with the corresponding
binary code for that position.
18. Chapter 4 18
Priority Encoder Example
Priority encoder with 5 inputs (D4, D3, D2, D1, D0) - highest priority to
most significant 1 present - Code outputs A2, A1, A0 and V where V
indicates at least one 1 present.
Xs in input part of table represent 0 or 1; thus table entries correspond to
product terms instead of minterms. The column on the left shows that all
32 minterms are present in the product terms in the table
No. of Min-
terms/Row
Inputs Outputs
D4 D3 D2 D1 D0 A2 A1 A0 V
1 0 0 0 0 0 X X X 0
1 0 0 0 0 1 0 0 0 1
2 0 0 0 1 X 0 0 1 1
4 0 0 1 X X 0 1 0 1
8 0 1 X X X 0 1 1 1
16 1 X X X X 1 0 0 1
19. Chapter 4 19
Priority Encoder Example (continued)
Could use a K-map to get equations, but
can be read directly from table and
manually optimized if careful:
A2 = D4
A1 = D3 + D2 = F1, F1 = (D3 + D2)
A0 = D3 + D1 = (D3 + D1)
V = D4 + F1 + D1 + D0
D4 D3
D4 D4
D4 D3
D4 D2 D4 D2
20. Chapter 4 20
Selecting of data or information is a critical
function in digital systems and computers
Circuits that perform selecting have:
• A set of information inputs from which the selection
is made
• A single output
• A set of control lines for making the selection
Logic circuits that perform selecting are called
multiplexers
Selecting can also be done by three-state logic
or transmission gates
Selecting
21. Chapter 4 21
Multiplexers
A multiplexer selects information from an
input line and directs the information to
an output line
A typical multiplexer has n control inputs
(Sn - 1, … S0) called selection inputs, 2n
information inputs (I2
n
- 1, … I0), and one
output Y
A multiplexer can be designed to have m
information inputs with m <2n as well as
n selection inputs
22. Chapter 4 22
2-to-1-Line Multiplexer
Since 2 = 21, n = 1
The single selection variable S has two values:
• S = 0 selects input I0
• S = 1 selects input I1
The equation:
Y = I0 + SI1
The circuit:
S
S
I0
I1
Decoder
Enabling
Circuits
Y
23. Chapter 4 23
2-to-1-Line Multiplexer (continued)
Note the regions of the multiplexer circuit shown:
• 1-to-2-line Decoder
• 2 Enabling circuits
• 2-input OR gate
To obtain a basis for multiplexer expansion, we combine
the Enabling circuits and OR gate into a 2 2 AND-OR
circuit:
• 1-to-2-line decoder
• 2 2 AND-OR
In general, for an 2n-to-1-line multiplexer:
• n-to-2n-line decoder
• 2n 2 AND-OR
25. Chapter 4 25
Multiplexer Width Expansion
Select “vectors of bits” instead of “bits”
Use multiple copies of 2n 2 AND-OR in
parallel
Example:
4-to-1-line
quad multi-
plexer
26. Chapter 4 26
Other Selection Implementations
Three-state logic in place of AND-OR
Gate input cost = 14 compared to 22 (or
18) for gate implementation
I0
I1
I2
I3
S1
S0
(b)
Y
27. Chapter 4 27
Other Selection Implementations
Transmission Gate Multiplexer
Gate input
cost = 8
compared
to 14 for
3-state logic
and 18 or 22
for gate logic
S0
S1
I0
I1
I2
I3
Y
TG
(S0 5 0)
TG
(S1 5 0)
TG
(S1 5 1)
TG
(S0 5 1)
TG
(S0 5 0)
TG
(S0 5 1)
28. Chapter 4 28
Combinational Function Implementation
Alternative implementation techniques:
• Decoders and OR gates
• Multiplexers (and inverter)
• ROMs
• PLAs
• PALs
• Lookup Tables
Can be referred to as structured implementation
methods since a specific underlying structure is
assumed in each case
29. Chapter 4 29
Decoder and OR Gates
Implement m functions of n variables with:
• Sum-of-minterms expressions
• One n-to-2n-line decoder
• m OR gates, one for each output
Approach 1:
• Find the truth table for the functions
• Make a connection to the corresponding OR from
the corresponding decoder output wherever a 1
appears in the truth table
Approach 2
• Find the minterms for each output function
• OR the minterms together
30. Chapter 4 30
Decoder and OR Gates Example
Implement the following set of odd parity functions of
(A7, A6, A5, A3)
P1 = A7 A5 A3
P2 = A7 A6 A3
P4 = A7 A6 A5
Finding sum of
minterms expressions
P1 = Sm(1,2,5,6,8,11,12,15)
P2 = Sm(1,3,4,6,8,10,13,15)
P4 = Sm(2,3,4,5,8,9,14,15)
Find circuit
Is this a good idea?
+
+
+
+
+
+
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
A7
A6
A5
A4
P1
P4
P2
31. Chapter 4 31
Multiplexer Approach 1
Implement m functions of n variables with:
• Sum-of-minterms expressions
• An m-wide 2n-to-1-line multiplexer
Design:
• Find the truth table for the functions.
• In the order they appear in the truth table:
Apply the function input variables to the multiplexer
inputs Sn - 1, … , S0
Label the outputs of the multiplexer with the output
variables
• Value-fix the information inputs to the multiplexer
using the values from the truth table (for don’t cares,
apply either 0 or 1)
32. Chapter 4 32
Example: Gray to Binary Code
Design a circuit to
convert a 3-bit Gray
code to a binary code
The formulation gives
the truth table on the
right
It is obvious from this
table that X = C and the
Y and Z are more complex
Gray
A B C
Binary
x y z
0 0 0 0 0 0
1 0 0 0 0 1
1 1 0 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 1 1 1 0 1
1 0 1 1 1 0
0 0 1 1 1 1
33. Chapter 4 33
Gray to Binary (continued)
Rearrange the table so
that the input combinations
are in counting order
Functions y and z can
be implemented using
a dual 8-to-1-line
multiplexer by:
• connecting A, B, and C to the multiplexer select inputs
• placing y and z on the two multiplexer outputs
• connecting their respective truth table values to the inputs
Gray
A B C
Binary
x y z
0 0 0 0 0 0
0 0 1 1 1 1
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 0 0 1
1 0 1 1 1 0
1 1 0 0 1 0
1 1 1 1 0 1
34. Chapter 4 34
Note that the multiplexer with fixed inputs is identical to a
ROM with 3-bit addresses and 2-bit data!
Gray to Binary (continued)
D04
D05
D06
D07
S1
S0
A
B
S2
D03
D02
D01
D00
Out
C
D14
D15
D16
D17
S1
S0
A
B
S2
D13
D12
D11
D10
Out
C
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
Y Z
8-to-1
MUX
8-to-1
MUX
35. Chapter 4 35
Multiplexer Approach 2
Implement any m functions of n + 1 variables by using:
• An m-wide 2n-to-1-line multiplexer
• A single inverter
Design:
• Find the truth table for the functions.
• Based on the values of the first n variables, separate the truth
table rows into pairs
• For each pair and output, define a rudimentary function of the
final variable (0, 1, X, )
• Using the first n variables as the index, value-fix the
information inputs to the multiplexer with the corresponding
rudimentary functions
• Use the inverter to generate the rudimentary function
X
X
36. Chapter 4 36
Example: Gray to Binary Code
Design a circuit to
convert a 3-bit Gray
code to a binary code
The formulation gives
the truth table on the
right
It is obvious from this
table that X = C and the
Y and Z are more complex
Gray
A B C
Binary
x y z
0 0 0 0 0 0
1 0 0 0 0 1
1 1 0 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 1 1 1 0 1
1 0 1 1 1 0
0 0 1 1 1 1
37. Chapter 4 37
Gray to Binary (continued)
Rearrange the table so that the input combinations are in
counting order, pair rows, and find rudimentary functions
Gray
A B C
Binary
x y z
Rudimentary
Functions of
C for y
Rudimentary
Functions of
C for z
0 0 0 0 0 0
0 0 1 1 1 1
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 0 0 1
1 0 1 1 1 0
1 1 0 0 1 0
1 1 1 1 0 1
F = C
F = C
F = C
F = C
F = C
F = C
F = C
F = C
38. Chapter 4 38
Assign the variables and functions to the multiplexer inputs:
Note that this approach (Approach 2) reduces the cost by
almost half compared to Approach 1.
This result is no longer ROM-like
Extending, a function of more than n variables is decomposed
into several sub-functions defined on a subset of the variables.
The multiplexer then selects among these sub-functions.
Gray to Binary (continued)
S1
S0
A
B
D03
D02
D01
D00
Out Y
8-to-1
MUX
C
C
C
C D13
D12
D11
D10
Out Z
8-to-1
MUX
S1
S0
A
B
C
C
C
C
C C
39. Chapter 4 39
Read Only Memory
Functions are implemented by storing the truth
table
Other representations such as equations more
convenient
Generation of programming information from
equations usually done by software
Text Example 4-10 Issue
• Two outputs are generated outside of the ROM
• In the implementation of the system, these two
functions are “hardwired” and even if the ROM is
reprogrammable or removable, cannot be corrected
or updated
40. Chapter 4 40
Programmable Array Logic
There is no sharing of AND gates as in the
ROM and PLA
Design requires fitting functions within
the limited number of ANDs per OR gate
Single function optimization is the first
step to fitting
Otherwise, if the number of terms in a
function is greater than the number of
ANDs per OR gate, then factoring is
necessary
41. Chapter 4 41
Product
term
AND Inputs
Outputs
A B C D W
1
2
3
W = C
4
5
6
F1 = X = A
+ B + W
7
8
9
10
11
12
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
AB
C
+ ABC
F2 = Y
= AB + BC +AC
BC
A
1
0
—
0
1
—
0
0
—
—
—
—
—
—
1
— —
0
1
0
1
1
1
—
—
—
—
—
—
—
1
—
1
1
1
—
—
1
1
—
—
—
—
—
—
Equations: F1 = A + B + C + ABC
F2 = AB + BC + AC
F1 must be
factored
since four
terms
Factor out
last two
terms as W
A B
B C C A
Programmable Array Logic Example
42. Chapter 4 42
Programmable Array Logic Example
X
X
X
X
X
X
X
X X
X
X X X
X
X X
X X X
AND gates inputs
A C W
Product
term
1
2
3
4
5
6
7
8
9
10
11
12
A
B
C
D
W
F1
F2
All fuses intact
(always 5 0)
X Fuse intact
X
A B B C D D W
A C W
A B B C D D W
1 Fuse blown
43. Chapter 4 43
Programmable Logic Array
The set of functions to be implemented must fit the
available number of product terms
The number of literals per term is less important in
fitting
The best approach to fitting is multiple-output, two-
level optimization (which has not been discussed)
Since output inversion is available, terms can
implement either a function or its complement
For small circuits, K-maps can be used to visualize
product term sharing and use of complements
For larger circuits, software is used to do the
optimization including use of complemented functions
44. Chapter 4 44
Programmable Logic Array Example
K-map
specification
How can this
be implemented
with four terms?
Complete the
programming table
Outputs
1
2
3
4
F2
1
1
–
1
AB
AC
BC
Inputs
–
1
1
C
1
1
–
A
1
–
1
B
PLA programming table
(T)
F1
( )
Product
term
F1 5 A BC + A B C + A B C
F1 5 AB + AC + BC + A B C
0
C
0
1
0 1
0 0
00 01 11 10
BC
A
0
B
1
1
A
0
C
0
1 0
1 1
00 01 11 10
BC
A
1
B
0
1
A
F2 5 AB + AC + BC
F2 5 AC + AB + BC
0
45. Chapter 4 45
Programmable Logic Array Example
X Fuse intact
1 Fuse blown
0
1
F1
F2
A
B
C
C B A
C B A
1
2
4
3
X X
X X
X X
X X
X
X
X
X X
X
X
X
X
X
46. Chapter 4 46
Lookup Tables
Lookup tables are used for implementing logic
in Field-Programmable Gate Arrays (FPGAs)
and Complex Logic Devices (CPLDs)
Lookup tables are typically small, often with
four inputs, one output, and 16 entries
Since lookup tables store truth tables, it is
possible to implement any 4-input function
Thus, the design problem is how to optimally
decompose a set of given functions into a set of
4-input two- level functions.
We will illustrate this by a manual attempt
47. Chapter 4 47
Lookup Table Example
Equations to be implemented:
F1(A,B,C,D,E) = A D E + B D E + C D E
F2(A,B,D,E,F) = A E D + B D E + F D E
Extract 4-input function:
F3(A,B,D,E) = A D E + B D E
F1(C,D,E,F3) = F3 + C D E
F2(D,E,F,F3) = F3 + F D E
The cost of the solution is 3 lookup tables