answersLogoWhite

0

I don't really know what this is supposed to mean, if you want to print the truth-table of the NAND-gate that will be something like this:

for (a=0; a<=1; ++a)

for (b=0; b<=1; ++b)

printf ("%d %d %d\n", a, b, !(a&&b))

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

When using a truth table 1 and 1 equal what?

As inputs to the truth table 1 and 1 signify that they are both true. The output will depend on what kind of truth table we are talking about, AND, OR, XOR, etc.


What are the disadvantages of truth table?

One of the disadvantages of using truth tables is


How is a Truth Table created for Specific expression?

by using a K-map


Does every truth table have a corresponding logical expression?

Yes, every truth table has a corresponding logical expression. A truth table outlines the output of a logical operation for all possible combinations of its inputs, and any such table can be represented by a logical expression using logical operators (AND, OR, NOT, etc.). This expression can be derived using methods like the sum of products or product of sums, ensuring that the logical relationship defined by the truth table is captured accurately.


A B C ' A'B'C' by using truth table?

Oh, what a happy little question! To create a truth table for the expression A B C ' A' B' C', you'll need to list all possible combinations of true (T) and false (F) for the variables A, B, and C. Then, you can apply the logical operations to find the resulting values for the expression. Just take your time, enjoy the process, and soon you'll have a beautiful truth table to admire!


How is the color red specified using binary notation?

I think you are looking for a colour table for HTML programming. See the attached link


Prove the following using a truth table and show all steps ABC ABC' AB'C AB'C'A?

ABC


When using a truth table 1 and 0 equal?

1 and 0 equal 0. "AND" behave like multiplication.


How can you calculate total number of rows in the truth table?

The total number of rows in a truth table can be calculated using the formula 2^n, where n is the number of variables. Each variable can have two possible truth values (True or False), so each row represents a unique combination of truth values for the variables.


Using truth table prove that A B.CA.C B.C?

(a+b).c=(a.b)+(b.c) (a+b).c=(a.b)+(b.c)


Could you write the program that display truth table of AND gate by using C plus plus programming language?

#include&lt;iostream&gt; int main() { std::cout &lt;&lt; "Truth table for AND gate\n\n"; std::cout &lt;&lt; " |0 1\n"; std::cout &lt;&lt; "-+---\n"; for (unsigned a=0; a&lt;2; ++a) { std::cout &lt;&lt; a &lt;&lt; '|'; for (unsigned b=0; b&lt;2; ++b) { std::cout &lt;&lt; (a &amp; b) &lt;&lt; ' '; } std::cout &lt;&lt; '\n'; } std::cout &lt;&lt; std::endl; }


How From the truth table of an X-OR gate write the X-OR equivalent equation by using NOT OR and AND gate?

a XOR bis equivalent to: (a AND NOT b) OR (b AND NOT a)