extern "C" void doublebyref(int x, int& y);
_doublebyref proc ... _doublebyref endp
push bp mov bp,sp push ax mov ax,[bp+4]
add ax,ax mov di,[bp+6] mov [di],ax
pop ax pop bp ret
Not complete. Example: NOT: A NOT A T F F T
Not complete. Example: NOT: A NOT A T F F T
Not complete. Example: AND A B A AND B T T T F T F T F F F F F
Complete. Enough to show that all disjunctive normal forms may be expressed in terms of NOR. In turn, enough to show that NOT, AND, OR may be expressed in terms of NOR. Here goes: NOT A = A NOR A A OR B = NOT (A NOR B) = (A NOR B) NOR (A NOR B) A AND B = (NOT A) NOR (NOT B) = (A NOR A) NOR (B NOR B)
Truth table: A B C D g 0 0 0 0 1 A'B'C'D' 0 0 0 1 1 A'B'C'D 0 0 1 0 1 A'B'CD' 0 0 1 1 1 A'B'CD 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 AB'C'D' 1 0 0 1 0 1 0 1 0 1 AB'CD' 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 Expression: A'B'C'D' + A'B'C'D + A'B'CD' + A'B'CD + AB'C'D' + AB'CD'
CD: 00 01 11 10 Group four 1's in top row (A'B') AB Group four 1's in corners (B'D') 00 1 1 1 1 01 0 0 0 0 11 0 0 0 0 Final expression: A'B' + B'D' 10 1 0 0 1
f(A,B,C) = A'B + CYour answer may be given either as a circuit diagram, or else as a symbolic expression using the notation X NOR Y. In any case, explain your answer.
Ingredients: X' = X NOR X X AND Y = X' NOR Y' X OR Y = (X NOR Y)' = (X NOR Y) NOR (X NOR Y) Therefore, f(A,B,C) = ((A NOR B') NOR C)' = ((A NOR B') NOR C) NOR ((A NOR B') NOR C) This translates easily to a circuit.
Here's the Karnaugh map: CD 00 01 11 10 AB 00 01 11 1 1 1 1 10 1 Cover the horizontal row of four 1's using the expression AB. Cover the vertical column of two 1's using the expression ACD. answer: AB + ACD
Q = 1, Q~ = 0if the input values are R=0, S=1.
Q = 0, Q~ = 1if the input values are R=1, S=0.
Q = 0, Q~ = 0if the input values are R=1, S=1.
This was done in class.