How to make a Truth Table and turn Truth table into A Circuit. Background
I'm a novice student learning some mathematics (Programming background) and I'm currently learning how to construct Truth Tables from Logical Statements and then use that Truth Table to make a circuit.
In the last few months I've had exam studying and also had to consturct two mobile apps (One in C# and another in Java)
I've been asked to construct a Truth table from a statement such as:
"(R.B.(Not G)) + (R (Doesn't affect outcome).B.G) + (R.(Not B).(Not G))"
The Issue:
Although I made every class,
I really don't know where to start as in:


*

*how would I obtain the "1"'s and "0"'s contained within a truth table.

*how would I use this to create the circuitry?


In short, I'm having incredible difficulty figuring out where to start. The "Process" of taking the statement, and gathering the Truth Table data from it confuses me.

Thanks if you have time to help, I'll be working on this all day. I don't see my tutor again until friday afternoon so I can't ask for direct assistance.
 A: You have $3$ variables here: R, G and B.
So your table should consist of $2^3+1$ rows and $3+1$ columns:

R.B.(Not G) + R (Doesn't affect outcome).B.G + R.(Not B).(Not G) is equivalent to:
$(R \wedge B \wedge \neg G) \vee (B \wedge G) \vee (R \wedge \neg B \wedge \neg G)$
So simply go over each row in the table, assign the ones and zeros to the formula above, and write down the result in the res column on the same row.
For example, in the $4$th row you have $R=0,G=1,B=1$.
Therefore, res $ = (0 \wedge 1 \wedge \neg 1) \vee (1 \wedge 1) \vee (0 \wedge \neg 1 \wedge \neg 1) = 1$.
A: Are you familiar with the Boolean Normal Forms? You can write the truth table in the disjunctive or conjunctive normal form. With the Dijsunctive Normal Form, you take a row and apply the AND operation to each variable and its negation if the function evaluates that row to $1$.
So for example if $f(0, 1, 0) = 1$, then you take $\overline{x_{1}}x_{2}\overline{x_{3}}$ as your minterm. You add (apply the OR operation) to the minterms. So it is a sum of products.
You could instead use the Conjunctive Normal Form, which takes rows that evaluate to $0$ under the function and OR the elements together. Then AND the minterms together. So if $f(1, 1, 0) = 0$, then your minterm is $x_{1} \vee x_{2} \vee \overline{x_{3}}$.
John Savage has a good explanation in his book in Chapter Two. He hosts it online for free: http://cs.brown.edu/~jes/book/pdfs/ModelsOfComputation.pdf
