Answers to Sample Exam

  1. c

  2. a

  3. c

  4. b

    1. -1.01101 x 2102
    2. +Infinity
    3. NaN
    4. 0.01101 x 2-126 = 1.101 x 2-128
    1. 00000 .. 11111
      0 .. 31
    2. 1111111 .. 0111111
      -63 .. 63
    3. 100000 .. 011111
      -32 .. 31
    4. 0000 .. 1111
      -7 .. 8
    1. 000 0110
    2. 101 1110
    3. 100 1010 C=0 V=1
    4. 100 0001 C=0 V=1
    5. 000 0110 C=1 V=0
    6. 111 0001 C=1 V=N/A
    7. 1010100
    8. 1010011
  5. F900

  6. These answers have been adjusted to Pep/8 equivalents, even though the questions are in Pep/7 syntax.

    1. 0600A7
    2. 00000000
    3. 1D
    4. none
    5. F5
    6. 58 (but Pep/8 requires an operand)
    7. 000C
    8. C3FFFE
    9. 4869
    10. 310032
    11. 00
    12. none

  7. f - direct          c - indirect
    b - immediate    a - stack-relative
    d - indexed       e - stack-relative deferred
  8. c - not p    a - p and q    b - p or q    d - p nor q
  9. Yes
    No
    No
    Yes
    No
  10.  

    1.  
    2.  
    3. Four of:
         ab    aab    aaa...ab
         b
         cab    caab    caa...ab
         cb
  11.     ;;
        ;; void calcOvt( int reg, int & ovrtm )
        ;;
        reg:      .EQUATE 4
        ovrtm:    .EQUATE 2
        ;;
        calcOvtm: LDA     reg,s      ; calculate 1/2 reg plus reg
                  ASRA
                  ADDA    reg,s
                  STA     ovrtm,sf   ; store result in ovrtm
                  RET0
    
  12.  

    1. a'b' + c'
    2. a'c + bc
    3. b'd' + a'd' + bc'd + b'c
    1.  
    2.  
      A B 0 1
        0     0     00,0     11,0  
        0   1   11,0   00,0
        1   0   11,0   10,0
        1   1   00,1   11,1
    3.  
  13.  


Copyright © 2006 Jonathan Mohr