Questions tagged [boolean-algebra]

Anything related to Boolean algebra and its application to computer programs. Boolean algebra is a mathematical theory that allows the representation of truth values `true` and `false` using the logic values `1` and `0` and to perform logic operations on them using algebraic notation.

Anything related to Boolean algebra and its application to computer programs. Boolean algebra is a mathematical theory that allows the representation of truth values true and false using the logic values 1 and 0 and to perform logic operations on them using algebraic notation.

See Wikipedia page on Boolean algebra.

125 questions
1
vote
1 answer

Generating DIMACS CNF file using bc2cnf is missing AND

I tried using the bc2cnf tool to generate the DIMACS CNF file of a boolean equation. The input file contains the equation of an AND gate as shown below : BC1.1 f := A & B; ASSIGN f; Command used: ./bc2cnf -v inp.txt opt.txt Content in the output…
1
vote
1 answer

Converstion from SOP to POS using boolean algebra

The question is this: wx'y'+wyz'+w'x'z I tried this technique but got stuck: w(x'y'+yz')+w'x'z (w+x'z)(w'+x'y'+yz') (w+x')(w+z)(w'+x'y'+yz') but this is not correct since it should end with 4 pos terms. How can I convert this from sum of products…
1
vote
1 answer

Difficulty resolving TRUE FALSE question using boolean

I'm having some difficulty with a problem I think. If X = true and Y = true ((X AND Y)' AND (X' OR Y') ' ) ' I get back true. When I put it in Wolfram Alpha it gave me back false. But I think it may have had a ' by it as well? So I'm not really…
1
vote
1 answer

Efficiently create structured binary decision diagram

I'm trying to create a BDD with a particular structure. I have a 1D sequence of boolean variables x_i, e.g. x_1, x_2, x_3, x_4, x_5. My condition is satisfied if there are no isolated ones or zeros (except possibly at the edges). I have implemented…
1
vote
1 answer
1
vote
1 answer

How do I search for index values in each row of an array in numpy creating a boolean array

Given an array with size MxN and an array with size Mx1, I want to compute a boolean array with MxN. import numpy as np M = 2 N = 3 a = np.random.rand(M, N) # The values doesn't matter b = np.random.choice(a=N, size=(M, 1), replace=True) # b = #…
ivarejao
  • 25
  • 8
1
vote
0 answers

How do I use sympy to extract value of a boolean variable in terms of other variables in a system of boolean equations?

I have a system of boolean equations (example given below) p = x & ~y q = x & y Now, I want to obtain the expression of x in terms of other variables in the system (LHS variables if possible) or to find that it can not be obtained. Is this possible…
Rahul Gopinath
  • 808
  • 10
  • 24
1
vote
0 answers

Using Resolution rule from propositional logic for the xor expression

The XOR operation applied on two propositional Symbols P and Q could be defined as (P or Q) and (Not(P) or Not(Q)) But by using the resolution rule, (P or Q) and (Not(P) or Not(Q)) would result in (Q or Not(Q)), which is always true. I know this is…
1
vote
1 answer

How the expression !A + (A . !B) = !(A.B)?

I have an expression !A+(A.!B) and on an expression solver, it gives the !A+(A.!B) = !(A.B)?. The solver notified that "Apply the Absorption Law" A.B+!A = B+!A. I have made the truth tables for both the expressions and the answer was correct. But…
Khuram
  • 1,820
  • 1
  • 26
  • 33
1
vote
2 answers

How to convert a boolean expression into assembly code

I'm quite new to assembly Consider the following function: where the '+' stands for 'Or' logic gate and the concatenation of variables, stands for 'And' logic gate. How can I implement such a function in emu8086? given that the input parameters may…
1
vote
0 answers

Boolean Algebra - Function Simplification/Minimalization

I need help simplifying these boolean algebra functions: X = !A!BC + A!B!C + !ABC + !AB!C + A!BC Y = (A!D + !AC)(!B(C + BD)) Z = (!A!C + AD)(B(D + !BC)) The furthest I got with simplifying each equation is: X = A!B + !AC + !AB!C Y = A!BC!D +…
Jacob
  • 11
  • 2
1
vote
2 answers

Simplify Boolean Expression: X + X'Y'Z

I know that the following is equal: X + X'Y'Z = X + Y'Z How can simplify the left side to arrive the right side using basic Boolean identities? Thanks in advance.
1
vote
1 answer

Boolean operators and Induction

Let @ denote the binary boolean operator defined by the right-hand side below: p @ q = (p ^ ¬q) (b) Is the set of operators {@, ¬} complete? Explain in detail. (c) Prove by induction that any propositional formula in a single propositional variable…
1
vote
0 answers

How to write this logic function with this specific logic gate?

The problem is as follows: obtain the function H = X + Y using only You cannot use the complements of X and Y as inputs. Use as few of these logic gates as possible. I eventually figured out the answer to be but that was through trial and error.…
b7894
  • 21
  • 1
1
vote
0 answers

If we have three logical inputs A, B, C generating: (A'B+AC) and (AB+A'C), is there any way we can generate A from the two output?

So we have three inputs A, B, C generating the following: output1: A'B + AC and output2: AB + A'C Can we, using some logical gates obtain the input A from the two outputs?
Dino
  • 11
  • 1
1
2
3
8 9