A high-level specification of the system is:
Input:
A an element of {UP, DOWN}, B an element of {UP, DOWN}
Output: LIGHT an element
of {ON, OFF}
Function: Switch is described by the
following table:
| A, B | DOWN, DOWN | DOWN, UP | UP, DOWN | UP, UP |
| LIGHT = Switch(A,B) | OFF | ON | ON | OFF |
One possible binary encoding for A and B, and decoding
of LIGHT is:
|
|
|
The function Switchb is obtained by replacing the high-level specification with binary values. The resulting binary specification is:
Input: Ab
an
element of {1, 0}, Bb an element of {1,0}
Output: LIGHTb
an element of {0,1}
Function: Switchb is described
by the following table:
| AbBb | 00 | 01 | 10 | 11 |
| LIGHTb = Switchb(Ab,Bb) | 0 | 1 | 1 | 0 |
A B |LIGHT A B| LIGHT Ab Bb| LIGHTb Down Down| OFF F F| F 0 0 | 0 Down Up | ON F T| T 0 1 | 1 Up Down| ON T F| T 1 0 | 1 Up Up | OFF T T| F 1 1 | 0Example: A 7-segment display is used to display the digits from 0-9 on calculators and many other displays. The 7-segment display appears as:
![]() |
For segment a:
x | a=f(x) 0 | ON 1 | OFF 2 | ON 3 | ON 4 | OFF 5 | ON 6 | ON 7 | ON 8 | ON 9 | ON
Example: For the segment a example and most others studied in this course, the coding of input digits 0-9 will be in binary 00002-10012. Coding output values {ON, OFF} values to binary {1, 0}.
2.4 Binary Specification of Combinational Systems
Adding to the previous tabular the binary coding of input and output
values gives the switching function:
x x3x2x1x0 | a=f(x) ab=f(x3,x2,x1,x0) 0 0 0 0 0 | ON 1 1 0 0 0 1 | OFF 0 2 0 0 1 0 | ON 1 3 0 0 1 1 | ON 1 4 0 1 0 0 | OFF 0 5 0 1 0 1 | ON 1 6 0 1 1 0 | ON 1 7 0 1 1 1 | ON 1 8 1 0 0 0 | ON 1 9 1 0 0 1 | ON 1
Incomplete Switching Functions - Generally when some inputs
that can be ignored are mapped to don't care outputs, that is the
output could be any state. For the a segment only 0-9 values input
values are valid, outputs for 10-15 are considered don't care. Adding
that to the table yields:
x x3x2x1x0 | a=f(x) ab=f(x3,x2,x1,x0) 0 0 0 0 0 | ON 1 1 0 0 0 1 | OFF 0 2 0 0 1 0 | ON 1 3 0 0 1 1 | ON 1 4 0 1 0 0 | OFF 0 5 0 1 0 1 | ON 1 6 0 1 1 0 | ON 1 7 0 1 1 1 | ON 1 8 1 0 0 0 | ON 1 9 1 0 0 1 | ON 1 10 1 0 1 0 | - 11 1 0 1 1 | - 12 1 1 0 0 | - 13 1 1 0 1 | - 14 1 1 1 0 | - 15 1 1 1 1 | -
f(x3,x2,x1,x0) = x3'x2'x1'x0'+x3'x2'x1x0'+x3'x2'x1x0+x3'x2x1'x0+x3'x2x1x0'+x3'x2x1x0+x3x2'x1'x0'+x3x2'x1'x0
For the light switch table below, there are two equivalent switching expressions (LIGHTb=Switch(Ab,Bb)) given as:
Ab Bb| LIGHTb=Switch(Ab,Bb) 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 0The gate representation for two corresponding switching expressions are:
| Switch(Ab,Bb)= Ab'Bb+AbBb' |
![]() |
| Switch(Ab,Bb)=Ab XOR Bb |
![]() |
f(x3,x2,x1,x0) = x3'x2'x1'x0'+x3'x2'x1x0'+x3'x2'x1x0+x3'x2x1'x0+x3'x2x1x0'+x3'x2x1x0+x3x2'x1'x0'+x3x2'x1'x0
| m0 = x3'x2'x1'x0'
m1 = x3'x2'x1'x0 m2 = x3'x2'x1x0' m3 = x3'x2'x1x0 m4 = x3'x2x1'x0' m5 = x3'x2x1'x0 m6 = x3'x2x1x0' m7 = x3'x2x1x0 |
m8 = x3x2'x1'x0'
m9 = x3x2'x1'x0 m10 = x3x2'x1x0' m11 = x3x2'x1x0 m12 = x3x2x1'x0' m13 = x3x2x1'x0 m14 = x3x2x1x0' m15 = x3x2x1x0 |
f(x3,x2,x1,x0) = m0 + m2 + m3 + m5 + m6 + m7 + m8 + m9 = Sm(0,2,3,5,6,7,8,9)
Maxterms - The unsimplified, product of sums (OR is + or sum, AND is product, NOT is ') Switching Expression for the a segment is:
f(x3,x2,x1,x0) = (x3+x2+x1+x0')(x3+x2'+x1+x0)
= M1*M4 = PM(1,4)
| M0 = x3+x2+x1+x0
M1 = x3+x2+x1+x0' M2 = x3+x2+x1'+x0 M3 = x3+x2+x1'+x0' M4 = x3+x2'+x1+x0 M5 = x3+x2'+x1+x0' M6 = x3+x2'+x1'+x0 M7 = x3+x2'+x1'+x0' |
M8 = x3'+x2+x1+x0
M9 = x3'+x2+x1+x0' M10 = x3'+x2+x1'+x0 M11 = x3'+x2+x1'+x0' M12 = x3'+x2'+x1+x0 M13 = x3'+x2'+x1+x0' M14 = x3'+x2'+x1'+x0 M15 = x3'+x2'+x1'+x0' |
Don't cares - Output can be either state, 0 or 1, so can be chosen as best fits the design requirements. If all don't cares are chosen to be 1, then Sdc(10, 11, 12, 13, 14,15), if chosen to be 0, then Pdc(10,11, 12, 13, 14, 15).
Equivalent - Minterm and maxterm representations are equivalent,
so:
For the LIGHT example the product and sum terms are:
For which a proof can be constructed by:
Using the simpler product of sums expression, the VHDL implementation of the module to light the a LED segment is:
| ENTITY a_segment IS
PORT( x3, x2, x1, x0 : IN BIT; a : OUT BIT); END a_segment; ARCHITECTURE behavioral of a_segment IS
|
| PROCESS (x, y, z)
BEGIN a <= x AND y; b <= a OR z; END PROCESS; |