CPS 1 (Ramm) Spring 1995 22 March 1995 Quiz #8 Name _______________________ Section _____ A. Add the following binary numbers and give their sum in binary: 1 0 1 1 + 1 0 1 0 ------- B. Complete the truth table for the circuit shown below: Q R S L -------------------- 0 0 0 ----- 0 0 1 ----- 0 1 0 ----- 0 1 1 ( !! SEE SEPARATE FIGURE !! ) ----- 1 0 0 ----- 1 0 1 ----- 1 1 0 ----- 1 1 1 ----- C. Give the logical expression for the circuit shown in B. above. D. Do a trace for the program shown below left using the column headings shown below center. Assume that the user enters a 15, then a 23, and then a 0 when input is requested. | # CF AX DATA SUM | # CF AX DATA SUM | | 0 copy ax, #c0 | | | | 1 copy sum, ax | | | | 2 in ax | | | | 3 copy data, ax | | | | 4 #L0 copy ax, #c0 | | | | 5 cmp ax, data | | | | 6 jnb #L1 | | | | 7 copy ax, sum | | | | 8 add ax, data | | | | 9 copy sum, ax | | | | 10 in ax | | | | 11 copy data, ax | | | | 12 jmp #L0 | | | | 13 #L1 copy ax, sum | | | | 14 out ax | | | | #c0 0 | | sum 0 data 0 CONTINUE IN RIGHT COLUMN ABOVE