Chapter 2 Notes

2.1    Combinational System - Digital system in which output depends only on the current value of inputs.
    Example: Suppose we are to design a circuit to control a single LIGHT from two switches, A and B. Whenever a single switch is UP the light should be ON, otherwise the LIGHT should be OFF. The state of the LIGHT is a function of the switches A and B.

    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:
     
    A UP DOWN
    Ab=Encode(A) 1 0
     
    B UP DOWN
    Bb=Encode(B) 1 0
     
    LIGHTb 0 1
    LIGHT=Decode(LIGHTb) OFF ON
     

    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

2.2    High-level Specification of Combinational Systems
    Consists of three components, from the above example:: Among other representations of the function are the following in table format.
         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 | 0
    Example: 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:
    where each segment is ON or OFF dependent upon the digit to be displayed. For example, to display the digit 0 would require segments a, b, c, d, e, and f to be ON with segment g OFF. To display the digit 2 would require segments a, b, g, e, and d to be ON and f and c segments OFF as in the above.

    For segment a:

    A tabular specification is:
       x | a=f(x) 
       0 | ON
       1 | OFF 
       2 | ON
       3 | ON
       4 | OFF
       5 | ON
       6 | ON
       7 | ON
       8 | ON
       9 | ON
2.3 Data Representation and Coding
    Some standard representations are ASCII (Table 2.1, page 18), one's and two's complement, Gray code (Figure 2.6a, page 20), Binary Coded Decimal (Table 2.3, page 21), etc.

    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
    f(x)=One-set(0,2,3,5,6,7,8,9)
    f(x)=Zero set(1,4)

    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 |          -
    The don't care set is dc(10,11,12,13,14,15)
2.4.2     Switching Expressions using And, Or, and Not
    The unsimplified, sum of products (Or is + or sum, And is product, Not is ') SE for the a LED segment is:

    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 | 0
    The gate representation for two corresponding switching expressions are:
     
     
    Switch(Ab,Bb)= Ab'Bb+AbBb'
    Switch(Ab,Bb)=Ab XOR Bb
    Minterms - Shorthand representation. Where:

    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
     
     

    0-15 Minterm to Product Term Correspondence
    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)
     

    0-15 Maxterm to Sum Term Correspondence
    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:
     

      Sm(0,2,3,5,6,7,8,9) = PM(1,4)


    For the LIGHT example the product and sum terms are:
     

      Term A  B | LIGHT   Product  Sum
       0   0  0 | 0        A'B'    A+B
       1   0  1 | 1        A'B     A+B'
       2   1  0 | 1        AB'     A'+B
       3   1  1 | 0        AB      A'+B'
      A'B+AB' = Sm(1,2) = PM(0,3) = (A+B)(A'+B')


    For which a proof can be constructed by:

       
      (A+B)(A'+B') = AA'+AB'+BA'+BB'
                            =  0    +AB'+A'B+0
                            = AB'+A'B
Specification using VHDL
Using the simpler product of sums expression, the VHDL implementation of the module to light the a LED segment is: