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
3 answers

How to add substrings within a list of strings following a certain condition?

Suppose I have a list of strings like this: ['001+11', '010+10', '011+01', '100+11'] I want to get this: ['0*0*1+1*1', '0*1*0+1*0', '0*1*1+0*1', '1*0*0+1*1'] I understand that the condition here is that whenever there is a 0 or 1 we must replace…
Manas Dogra
  • 317
  • 1
  • 15
1
vote
1 answer

Implementing a Mux 2:1 using only XNOR, NAND, OR with maximum of 4 gates

I had been given a task to implement a mux2:1 using only these given gates: XNOR NAND OR. The inputs would be a, b and sel (select). The output should be z (there's no enable input). The maximum number of gates to be used is 4 (and only those 3…
1
vote
1 answer

How do I simplify(expand) this Boolean expression?

Expression - (A OR B OR C OR D) AND (!B AND !D) I know that with distributive property, it holds that (a OR b) AND (c OR d) = (a AND c) OR (a AND d) OR (b AND c) or (b AND d) but I'm not sure how it will work if the second group has an AND Steps in…
Kaushik Evani
  • 1,154
  • 9
  • 17
1
vote
1 answer

How to simplify logical operation in C

I have this following logic which needs simplifing to look clearer and consise: if (x1 < y1) return 1; else if (x1 == y1)) { if (x2 < y2) return 1; else if (x2 == y2) { if (x3 < y3) return 1; }…
1
vote
1 answer

How is Boolean Algebra efficient in practise?

Thanks for taking the time, just as a note, l understand the basics of Boolean Algebra. Although l understand how Boolean Algebra is a useful optimization technique in very small circuits, surely it would take far too long in a realistically-sized…
1
vote
1 answer

Proving boolean expression

>>> import z3 >>> X = z3.BitVec('X', 32) >>> z3.prove( X^18 == ((X|(~44)) & (X^62)) + (X&44) ) proved x^18 is equivalent to ((x|(~44))&(x^62))+(x&44) ?? How could this be possible? I want to know detailed information about proving this…
ooo0o
  • 53
  • 1
  • 7
1
vote
1 answer

Min and max terms and Karnaugh maps

Could anyone explain what is the importance of max and min terms in boolean algebra and uses of Karnaugh maps. I feel like confused in those titles.
1
vote
0 answers

Why can't we reduce register automata to symbolic automata?

When considering automata, they are normally considered over finite alphabets. The following are two types of automata that can handle words over infinite alphabets (definitions included for clarity). The symbols [ and ], appended to the beginning…
1
vote
3 answers

Boolean expression in SOP

I'm new to boolean expressions. I've been given the task to simplify F(w,x,y,z) = xy’ + x’z’ + wxz + wx’y by using K map. I've done it and the result is wx’+w’y’+xyz. Now I have to "Write it in a standard SOP form. You need to provide the steps…
1
vote
1 answer

Boolean Algebra simplification and factoring

Starting from a circuit I'm able to obtain simplified the boolean expression: F(A,B,C,D) = A'D' + ABC + BCD' After observing the k-map I can observe that the expression BCD' (green) is covered by A'D + ABC. k-map of F(A,B,C,D) How can I factor out…
1
vote
3 answers

Java AI - Optimum Passing of Boolean Arrays

I'm coding AI objects for a game. My goal is to have the code optimized so that I can handle as many AI processes as possible simultaneously. The game is 2d physics, so I'm already dealing with entity-number bottle-necking in collision handling, so…
1
vote
3 answers

Which laws simplify this boolean expression?

Which laws do I need to use to simplify !X + (!Y + !Z)*(Y + Z) to !X + (Y*!Z) + (!Y*Z)
1
vote
2 answers

Equality of two boolean expressions

I have two boolean expressions: ¬aΛ¬b V ¬aΛ¬c V aΛ¬bΛ¬c #1 ¬aΛ¬b V ¬aΛ¬c V ¬bΛ¬c #2 I know they are identical because their truth tables are identical. My questions is, how can I make them equal expression-wise. You may notice the ONLY difference…
1
vote
1 answer

Boolean Expression for 4 input Logic gates

I have 4 inputs; (A, B, C, D) and 3 outputs; (X,Y,Z). 1)X is true when the input is less than 0111. 2)Y is true when the input is greater than 0111. 3)Z is true when the input is 0111. Can someone help me out with the Boolean Expression for X? I…
1
vote
2 answers

Boolean Algebra Rule 10

Hi I have a question about the following algebra rule A + AB = A My textbook explains this as follows A + AB = A This rule can be proved as such: Step 1: Dustributive Law: A + AB = A*1 = A(1+B) Huh...? Where do they get the one(1) from? Step 2: 1 +…
1 2
3
8 9