Answers to sample exam 1

  1. (20 points)A byte of memory contains the hexadecimal value E6. What decimal number does this represent, if the byte is interpreted as containing:
    1. an 8-bit unsigned integer

      ANS: 230

    2. an 8-bit signed integer in sign-magnitude form

      ANS: -102

    3. an 8-bit signed integer in one's complement form

      ANS: -25

    4. an 8-bit signed integer in two's complement form

      ANS: -26

  2. (10 points) Assume that the hex value 42018000 represents a floating point number in IEEE-standard single precision format. What decimal number does it represent? Show your work.

    ANS: 32.375

  3. (10 points) Fill in the truth table for the logical expression NOT (NOT(A) OR NOT(B)). What single logic gate has the same truth table?
          A     B      NOT (NOT(A) OR NOT(B))
         ------------------------------------
          0     0                0
          
          0     1                0
    
          1     0                0
    
          1     1                1
    
    
    Same truth table as the AND-gate.
    

  4. (10 points) Describe the differences between a demultiplexer and a decoder.

    ANSWER: A decoder sends a 1 to one of the 2^^n output lines. The n input lines are read like a binary number to choose which output line gets a 1.

    A demultiplexer sends the input value (be it 0 or 1) to one of the 2^^n output lines. The n control lines select the output line the same way the decoder input lines do.

  5. A function of four inputs is defined by the following truth table:
      A  B  C  D  |  F
      ----------------
      0  0  0  0  |  0
      0  0  0  1  |  0
      0  0  1  0  |  0
      0  0  1  1  |  0
      0  1  0  0  |  0
      0  1  0  1  |  0
      0  1  1  0  |  1
      0  1  1  1  |  1
      1  0  0  0  |  0
      1  0  0  1  |  0
      1  0  1  0  |  0
      1  0  1  1  |  1
      1  1  0  0  |  0
      1  1  0  1  |  1
      1  1  1  0  |  1
      1  1  1  1  |  1
    1. Draw a Karnaugh map for the function.
      
                       CD
      
               00   01   11   10
              +++++++++++++++++++++
              +    +    +    +    +
           00 +    +    +    +    +
              +    +    +    +    +
              +++++++++++++++++++++
              +    +    +    +    +
           01 +    +    + 1  + 1  +   (Not shown:  3 circles,
              +    +    +    +    +    1 around a group of four,
       AB     +++++++++++++++++++++    2 around groups of two)
              +    +    +    +    +
           11 +    + 1  + 1  + 1  +
              +    +    +    +    +
              +++++++++++++++++++++
              +    +    +    +    +
           10 +    +    + 1  +    +
              +    +    +    +    +
              +++++++++++++++++++++
      
      
    2. Reduce the function using your Karnaugh map and write the equation for the minimized function in sum-of-products form.

      ANSWER: F= BC + ABD + ACD

    3. Draw the circuit diagram for your minimized function.

      (Not shown: circuit should have 4 input lines (A, B, C, D), 3 AND-gates, 1 OR-gate)

  6. (10 points) What does it mean to say that a microprogram "interprets" a machine code program? Be specific.

    ANSWER: An interpreter takes one instruction at a time and converts that instruction into a sequence of instructions in another language. A microprogram takes one machine code instruction and converts it into microinstructions that are then executed.

  7. (10 points) The table below lists the inputs applied to an RS-latch over time. Fill in the last row of the table, indicating the state of the latch (A) after each pair of inputs has been applied. (Each of your answers should be either 0 or 1).
    
    
    
    time (t)  0    1    2    3    4    5    6    7    8    9
    ---------------------------------------------------------
    
    S         1    1    1    0    1    1    0    1    1    1
    
    R         0    1    1    1    1    1    1    1    0    1
    
    A(t+)     0    0    0    1    1    1    1    1    0    0