Questions tagged [boolean-algebra]
290 questions
24
votes
7 answers
How to construct XOR gate using only 4 NAND gate?
xor gate, now I need to construct this gate using only 4 nand gate
a b out
0 0 0
0 1 1
1 0 1
1 1 0
the xor = (a and not b) or (not a and b), which is
\begin{split}\overline{A}{B}+{A}\overline{B}\end{split}
I know the answer but how to get the gate…
Timeless
- 805
- 1
- 9
- 16
20
votes
3 answers
Is it possible to write an AND gate using XOR gates?
How could I express an AND gate using only XOR gates ?
Radu Mardari
- 425
- 3
- 5
18
votes
11 answers
Why do logic gates behave the way they do?
I am a Software Developer but I came from a non-CS background so maybe it is a wrong question to ask, but I do not get why logic gates/boolean logic behave the way they do.
Why for example:
1 AND 1 = 1 // true AND true
1 OR 0 = 1 // true OR…
aldokkani
- 317
- 2
- 11
11
votes
2 answers
Are Boolean functions Turing complete
A Boolean function is a function $f:\{0,1\}^n\rightarrow\{0,1\}$.
The boolean basis $(\vee,\wedge)$ is known to be Turing complete as it allows any sequence $s\in\{0,1\}$ to be flipped or to be left unchanged. The same can be said of $\mathrm{XOR}$…
user13675
- 1,684
- 12
- 19
10
votes
1 answer
What is a simple way of explaining what a linear boolean function means in boolean algebra and relating it to the standard definition of linearity?
I was reading notes on computability theory when I came across the term "Linearity" which I was not familiar with, in the context of boolean functions. I am quite comfortable what linear maps mean in Vector Spaces (say in the context of linear…
Charlie Parker
- 3,130
- 22
- 39
9
votes
1 answer
Which CNF boolean formulas blow up exponentially at conversion to DNF?
If I'm correct, some boolean formulas in CNF require exponential size when being converted to an equivalent DNF version (and vice versa).
But what is an example of such a formula (and is there a general way to capture their structure - if the first…
lukas.coenig
- 773
- 4
- 12
9
votes
1 answer
Boolean formula that agrees with most truth assignments
Let $X_1,\dots,X_n$ be $n$ boolean variables. I have an unknown predicate $P(X_1,\dots,X_n)$ on these boolean variables. Of course, I can view the predicate as a function $f_P : \{0,1\}^n \to \{0,1\}$ that maps a vector of $n$ boolean values to…
D.W.
- 167,959
- 22
- 232
- 500
7
votes
3 answers
Absorption Law Proof by Algebra
I'm struggling to understand the absorption law proof and I hope maybe you could help me out.
The absorption law states that: $X + XY = X$
Which is equivalent to $(X \cdot 1) + (XY) = X$
No problem yet, it's this next step that stumps me. How can I…
user2635139
- 73
- 1
- 1
- 3
7
votes
4 answers
Boolean algebraic expression vs Propositional logic expression
There is a lot of similarity between Propositional logic and Boolean algebraic expressions.
Similar aspects :
1) Both has variables of two states.
2) Operations of Boolean algebra and propositional logic are similar.
3) Simplification of formula…
hanugm
- 525
- 9
- 21
7
votes
1 answer
Why do Karnaugh maps work?
The question is quite straightforward: Why do Karnaugh maps work? What was the reasoning that led Maurice Karnaugh to come up with these maps? At first glance, it doesn't seem a natural approach, instead it feels somewhat arbitrary yet surprising…
Bidon
- 173
- 3
7
votes
1 answer
Why are there two not operators in lambda calculus?
From Wikipedia:
$\mathrm{true} = \lambda a. \lambda b. a$
$\mathrm{false} = \lambda a. \lambda b. b$
Because true and false choose the first or second parameter they may
be combined to provide logic operators. Note that there are two
version of…
HappyFace
- 211
- 1
- 6
6
votes
1 answer
Small world theorem for set constraints
Let $S_1,\dots,S_n$ be variables representing unknown sets. A set expression has the form $S_i$, $\overline{E}$ (the complement of $E$), or $E \cap E'$, where $E,E'$ are set expressions. A constraint has the form $E = \emptyset$ or $E \ne…
D.W.
- 167,959
- 22
- 232
- 500
6
votes
1 answer
Is there an intuitive proof for the existence of hard functions?
I am referring to the theorem on page 115 of the book by Arora and Barak, which states that, ``For every $n>1$, there exists a function $f:\{0,1\}^n \rightarrow \{0,1\}$ that cannot be computed by a circuit $C$ of size $\frac{2^n}{10n}$"
Can…
user6818
- 1,165
- 8
- 13
6
votes
2 answers
Converting truth table to algebraic normal form
Is there any efficient algorithm to convert a given truth table of a Boolean function to its equivalent algebraic normal form (ANF)?
I have seen that Sage has one implementation (official documentation):
sage: from sage.crypto.boolean_function…
hola
- 317
- 2
- 12
6
votes
1 answer
Representing binary functions with a finite gate set without exponential blow-up?
It is pretty well taught that any binary function can be represented using CNF. But conversion to CNF can take an exponential number of gates. The truth table is exponentially sized relative to the number of input variables.
Is there any form of…
Andrew Baker
- 327
- 1
- 6