Truth table and logic gates and VBA Macro. Consider the following worksheet that forms a truth table row number in A2 and converts the row number into the corresponding logic variable (A, B and C) input values in C2:E2. Elementary gates are formed: Y = NOT(A) in A5, Y= AND(ABC) in C5 and Y = OR(ABC) in E5. VBA Macro TT_row assigned to the row arrow increments the value in A2 and resets it to 0 if it is greater than 7.
a. What is the Excel formula in C2?
b. What is the Excel formula in D2?
c. What is the Excel formula in E2?
d. What is the Excel formula in A5?
e. What is the Excel formula in C5?
f. What is the Excel formula in E5?
g. Compose Macro TT_row.
Solution
Sub TT_row()
Range("A2").Value = Range("A2").Value + 1
If Range("A2").Value > 7 Then
Range("A2").Value = 0
End If
End Sub
You might also like to view...
____ provide the measurements used for construction.
A. Annotations B. Dimensions C. References D. Amendments
Flexible foam insulation is chemically related to _____.
a. glassy minerals b. rubbers c. epoxies d. chalky minerals
Assume the switch in the circuit in Figure P5.69 has been open for a very long time. It is suddenly closed at t = 0 and then reopened at t = 5 s. Determine the inductor current iL , the capacitor voltage vC, and the voltage v across the 2-? resistor for t ? 0.
Assume you make monthly deposits of $200 starting 1 month from now into an account that pays 6% per year, compounded semiannually. If you want to know how much you will have after 4 years, the value of i you should use in the F?A factor, assuming no interperiod interest, is:
(a) 0.5% (b) 3.00% (c) 6.0% (d) 12.0%