Questions tagged [truthtable]

A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their logical variables.

In particular, truth tables can be used to tell whether a propositional expression is true for all legitimate input values, that is, logically valid.

Practically, a truth table is composed of one column for each input variable (for example, A and B), and one final column for all of the possible results of the logical operation that the table is meant to represent (for example, A XOR B). Each row of the truth table therefore contains one possible configuration of the input variables (for instance, A=true B=false), and the result of the operation for those values.

210 questions
-2
votes
1 answer

Truth Table for Binary Operation

I am new to coding. Taking a course online and for some reason I can not grasp the lab this week. We need to create a truth table. One for AND and one for OR. Some of the code is given to us and idea is to use boolean.. this is what I have so far..…
-2
votes
1 answer

Propositional Logic Identity

How to show that ↔ ≡ ∨ → ( ∧ ) So far I've done this... ↔ ≡(p → q) ∧(q → p) Law of Algebra (p → q) ∧ (q → p) ≡(~p V q) ∧ (q → p) Law of Conditional Proposition (~p V q) ∧ (q → p) ≡(~p V q) ∧ (~q V p) Law of Conditional Proposition
-2
votes
1 answer

Generating truth tables of integers with boolean operations

I'm trying to generate a truth table of "integers". First of all I need to have 2 lists of integers just like this table right here: 1 1 1 2 2 1 2 2 And then I need to use Boolean operators to generate the table like this: 1 1 2 1 2 2 1 2 1 2 2…
Behnood
  • 11
  • 4
-2
votes
1 answer

Shunting-Yard Algorithm with truth tables in Java

I'm working on a truth table generator for one of my assignments in Discrete math.. I have to implement the shunting-yard algorithm, and I'm completely lost doing so. My problem, is implementing the shunting-yard algorithm. First I'll show what…
ryandawkins
  • 1,537
  • 5
  • 25
  • 38
-3
votes
3 answers

Conditional statement (truth table) formula on Excel

What is the formula for p=>q?
-3
votes
2 answers

Possible combinations using R

I have edited my question and changed certain lines in my script, to make it clear to find the number of times I can get the output 1 or 0. I have 19 variables.I tried the possible combinations of these 19 variables for giving a binary output of 0…
-3
votes
1 answer

Create a truth table with multiple expressions

I am a student at a university. Now, I am doing my excercise. I my excercise, I must create a truth table (for digital board) with 42 variables (in 5 expressions). I can not do it, because it is a big truth table. I tried to use this…
-4
votes
1 answer

Truth table list

My goal is to make a truth table in python and here's my code: from re import findall string = "xyz" def getChars(str): listChars = findall(r"\w", str) return listChars def createCharsTruthTable(lst): n = 2 ** len(lst) boolList…
-4
votes
1 answer

Generate all possible values for variables with recursion

I'm creating a truth table with Python and I have done so iteratively without any hassle, but I'm trying to figure out how to generate all possible values of True and False, for any number of variable recursively. Starting with a list like: [[True],…
-4
votes
1 answer

How do I reverse engineer this truth table?

How Do I know which functions were performed to get this truth table? Any help Appreciated The truth table:
-4
votes
1 answer

Truth table fun, Java

My program is currently printing out a preprogrammed truth table followed by the correct char at the end of each line. I would like to go above and beyond this program but I've run into a wall, I have never linked the output of a column to a…
T3nt4c135
  • 104
  • 8
-4
votes
1 answer

What's the truth table of this circuit

I'm trying to make a truth table of this electronic circuit: How does this work? How can I know what the value of B is for example A = 0 and C = 0? Isn't this an infinite recursive structure? Or how does that work? I used Logism to simulate the…
user4424299
-6
votes
1 answer

How can i do this in perl, shortcut truthtable

I have simplified a truth table of a boolean function to the following: A B C1 C2 Z --------------------------------- 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 …
-6
votes
1 answer

Bool A, B and C truth combination

I need to combine 3 bools to test for the entire truth table (8 combinations) in c++. I have 2 special cases that need to be attended to, they are a, b and c are all true, and a, b are true but c is false. The rest don't need to be catered for…
-6
votes
1 answer

how can I create a truth table in turbo c

I have a project where I will create a truth table, and the user will input propositions and its operator and my program will output the truth values providing with a truth table. I have following questions: can I use parsing techniques using turbo…
Spencer
  • 9
  • 6
1 2 3
13
14