Boolean Equations for Digital Circuits
Subjects: Digital Circuits
Links: Logic Gates, Boolean Algebra
The complement if a variable
The
The order of operations is important when interpreting Boolean operations. In Boolean equations,
Sum-of-Products Form
A truth table of
We can write a Boolean equation for any truth table by summing each of the minterms for which the output,
This called the sum-of-products canonical form of a function because it is the sum of products. Although there are many ways to write the same function, we will sort the minterms in the same order as they appear in the truth table. The sum-of-prodcut canonical form can also be written in sigma notation using the summation symbol,
Product-of-Sums Form
An alternative way of expressing Boolean functions is the product-of-sums canonical form Each row of a truth table corresponds to a maxterm that is
From Logic to Gates
A schematic is a diagram of a digiral circuit showing the elements and the wires that connect them together. By drawing schematics in a consistent fashion, we make them easier to read and debug. We will generally obey the following guidelines:
- Inputs are on the left (or top) of an schematic.
- Outputs are on the right (or bottom) side of a schematic.
- Whenever possible, gates should flow from the left to right.
- Straight wires are better to use than wires with multiple corners.
- Wire always connect at a
junction. - A dot where wires cross indicate a connection between the wires.
- Wires crossing without a dot make no connection.
Any Boolean equation in sum-of-products form can be drawn as a schematic in a systematic way. First, draw columns for the inputs. Place inverters in adjacent columns to provide the complementary inputs if necessary, Draw rows of
This style is called a programmable logic array (PLA) becayse the inverters,
Multilevel Combinational Logic
Logic in sum-of-product form is called a two-level logic because it consists of literals connected to a level of
Hardware Reduction
Some logic functions requiere an enormous amount of hardware when built using a two-level logic.
Selecting the best multileveled implementation of a specific logic function is not a simple process. Moreover 'best' has many meanings: fewest gates, fastest, shortest design time, least cost, least power consumption. In CMOS,
Bubble Pushing
As we know CMOS circuits prefer
- Begin at the output of the circuits and work toward the input.
- Push any bubbles on the final output back towards the inputs so that you can read an equation in terms of the output.
- Working backward, draw each gate in the form so that bubbles cancel. If the current gate has an input bublle, draw the preceding gate with an output bubble. If the current gate doesn't have an input bubble, draw the preceding gate without an output bubble.
's and 's
Boolesn algebra is limited to
The symbol
When
The symbol
One common way to produce a floating node is to forget to connect a voltage to a circuit input, or to assume that an unconnected inputs i s the same as an input with the value of
The tristate buffer has three possible output states:
\usepackage{tikz}
\usetikzlibrary{positioning, circuits.logic.US}
\makeatletter%
%
%
\pgfdeclareshape{tri state buffer active high}{
\inheritsavedanchors[from=buffer gate US]
\inheritanchorborder[from=buffer gate US]
\inheritanchor[from=buffer gate US]{center}
\inheritanchor[from=buffer gate US]{base}
\inheritanchor[from=buffer gate US]{base west}
\inheritanchor[from=buffer gate US]{base east}
\inheritanchor[from=buffer gate US]{mid}
\inheritanchor[from=buffer gate US]{mid west}
\inheritanchor[from=buffer gate US]{mid east}
\inheritanchor[from=buffer gate US]{north}
\inheritanchor[from=buffer gate US]{north west}
\inheritanchor[from=buffer gate US]{north east}
\inheritanchor[from=buffer gate US]{south}
\inheritanchor[from=buffer gate US]{south east}
\inheritanchor[from=buffer gate US]{south west}
\inheritanchor[from=buffer gate US]{west}
\inheritanchor[from=buffer gate US]{east}
\inheritanchor[from=buffer gate US]{input}
\inheritanchor[from=buffer gate US]{output}
\anchor{control}{%
\dimensions
\pgfpointintersectionoflines{\csname pgf@anchor@buffer gate US@north west\endcsname}{\tipanchor}{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
}%
\backgroundpath{%
\dimensions%
\pgf@xc\halfwidth%
\pgf@yc\halfheight%
\advance\pgf@xc-\outerxsep%
\advance\pgf@yc-\outerysep%
{%
\pgftransformshift{\centerpoint}%
\pgfpathmoveto{\tipanchor}%
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
\pgfpathclose%
%
% Draw the input.
%
\expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
{%
\pgfpathcircle{%
\pgf@xa\halfside%
\pgf@x-.833333\pgf@xa%
\advance\pgf@x-.5\pgflinewidth%
\advance\pgf@x-\invertedradius%
\pgf@y0pt%
}{+\invertedradius}%
}%
\fi%
}%
}%
}
\pgfdeclareshape{tri state buffer active low}{
\inheritsavedanchors[from=buffer gate US]
\inheritanchorborder[from=buffer gate US]
\inheritanchor[from=buffer gate US]{center}
\inheritanchor[from=buffer gate US]{base}
\inheritanchor[from=buffer gate US]{base west}
\inheritanchor[from=buffer gate US]{base east}
\inheritanchor[from=buffer gate US]{mid}
\inheritanchor[from=buffer gate US]{mid west}
\inheritanchor[from=buffer gate US]{mid east}
\inheritanchor[from=buffer gate US]{north}
\inheritanchor[from=buffer gate US]{north west}
\inheritanchor[from=buffer gate US]{north east}
\inheritanchor[from=buffer gate US]{south}
\inheritanchor[from=buffer gate US]{south east}
\inheritanchor[from=buffer gate US]{south west}
\inheritanchor[from=buffer gate US]{west}
\inheritanchor[from=buffer gate US]{east}
\inheritanchor[from=buffer gate US]{input}
\inheritanchor[from=buffer gate US]{output}
\anchor{control}{%
\dimensions
\tipanchor%
\pgf@xa\pgf@x%
\pgf@ya\pgf@y%
\csname pgf@anchor@buffer gate US@north west\endcsname%
\advance\pgf@xa-\pgf@x%
\advance\pgf@ya-\pgf@y%
\pgfpointintersectionoflines{\csname pgf@anchor@buffer gate US@north west\endcsname}{\tipanchor}{\centerpoint}{\centerpoint\advance\pgf@y2pt}%
\pgfmathparse{sqrt(\pgf@xa^2+\pgf@ya^2)/\pgf@xa*\invertedradius}
\advance\pgf@y\pgfmathresult pt
\advance\pgf@y\invertedradius
}%
\backgroundpath{%
\dimensions%
\pgf@xc\halfwidth%
\pgf@yc\halfheight%
\advance\pgf@xc-\outerxsep%
\advance\pgf@yc-\outerysep%
{%
\pgftransformshift{\centerpoint}%
\pgfpathmoveto{\tipanchor}%
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
\pgfpathclose%
%
% Draw the input.
%
\pgfpathcircle{%
\tipanchor%
\pgf@xa\pgf@x%
\pgf@ya\pgf@y%
\csname pgf@anchor@buffer gate US@north west\endcsname%
\advance\pgf@xa-\pgf@x%
\advance\pgf@ya-\pgf@y%
\pgfpointintersectionoflines{\csname pgf@anchor@buffer gate US@north west\endcsname}{\tipanchor}{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
\pgfmathparse{sqrt(\pgf@xa^2+\pgf@ya^2)/\pgf@xa*\invertedradius}
\advance\pgf@y\pgfmathresult pt
}{+\invertedradius}%
\expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
{%
\pgfpathcircle{%
\pgf@xa\halfside%
\pgf@x-.833333\pgf@xa%
\advance\pgf@x-.5\pgflinewidth%
\advance\pgf@x-\invertedradius%
\pgf@y0pt%
}{+\invertedradius}%
}%
\fi%
}%
}%
}
\tikzset{
circuit declare symbol=tri state buffer active low,
set tri state buffer active low graphic={draw, shape=tri state buffer active low, minimum size=5mm},
circuit declare symbol=tri state buffer active high,
set tri state buffer active high graphic={draw,shape=tri state buffer active high,minimum size=5mm}
}
\begin{document}
%
\begin{tikzpicture}[circuit logic US, on grid]
\node (i) {A};
\node (buf) [right of=i, tri state buffer active high] {};
\node (ctrl) [above=of buf] {E};
\node (o) [right of=buf] {Y};
\draw (i) -- (buf.input)
(ctrl) -- (buf.control)
(buf.output) -- (o);
\end{tikzpicture}%
\begin{tikzpicture}[circuit logic US, on grid]
\node (i) {A};
\node (buf) [right of=i, tri state buffer active low] {};
\node (ctrl) [above=1 of buf] {$\overline E$};
\node (o) [right of=buf] {Y};
\draw (i) -- (buf.input)
(ctrl) -- (buf.control)
(buf.output) -- (o);
\end{tikzpicture}%
\end{document}
The buffer on the right is called an active high enable. That is the enable is $\text{HIGH}%, the buffer is enabled. The buffer on the left is called an active low buffer. When the buffer is