Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
4 votes
2 answers
115 views

I need to model a system of several boolean expressions in 512 variables. Due to the number of variables, I found the expressions are way too large to handle normally, which is why I need a way to ...
Noemi's user avatar
  • 41
1 vote
1 answer
123 views

I'm working with a Pandas DataFrame where I need to track a boolean flag (in_position) that becomes True after an entry_signal and resets to False only after an exit_signal. This must be done ...
Victor Hanukayev's user avatar
5 votes
2 answers
189 views

This statement mimics a ternary operator in the Lua programing language: local result = condition and true_value or false_value But how does it work? Why does it give true_value if the condition is ...
0747's user avatar
  • 55
1 vote
2 answers
107 views

So I am a beginner at javascript and learnt that there are only a limited falsy values: false, 0, -0, BigInt 0n, “”, null, undefined, NaN Yet when I use the == operator with truthy values, this ...
applepie's user avatar
4 votes
2 answers
492 views

How can I check if all values of a polars DataFrame, containing only boolean columns, are True? Example df: df = pl.DataFrame({"a": [True, True, None], "b": [...
mouwsy's user avatar
  • 2,127
0 votes
1 answer
57 views

I am trying to combine OR conditions with AND over multiple columns in my Excel datasheet and would like advice on how to do this. A sample table is shown below. The formula does not calculate the two ...
sjedi's user avatar
  • 97
0 votes
1 answer
44 views

I am trying to set up an Excel conditional formula with both AND and OR criteria. However, the last 2 criteria OR(Table1[Col5]=$J$4,Table1[Col5]=$K$4) and OR(Table1[Col6]=Pivot!$J$5,Table1[Col6]=Pivot!...
sjedi's user avatar
  • 97
1 vote
0 answers
46 views

I'm using fabric JS free drawing mode to generate a bunch of hand-drawn SVGs. I then composite these onto a canvas. I convert them to a bitmap Image for rendering so that I can easily union all of the ...
David Ferris's user avatar
  • 2,355
0 votes
0 answers
58 views

I am developing an Azure DevOps custom task. Part of the setting of the inputs is a VisibleRule which can contain a condition which will determine if the input will be visible, if the condition is ...
CodeMonkey's user avatar
  • 12.6k
0 votes
0 answers
89 views

I am trying to create a a XOR gate. only from 2x4 and NOR Gates. however I am stuck. Please draw the diagram or give image of this.
Muhammad Manik Uddin's user avatar
9 votes
0 answers
321 views

I am given a Boolean expression of arbitrary depth, like (A or (B and (C or (~D and E) or F) or (G and H))). There can be any number of terms at each level. I want to limit the depth of the ...
Matt Timmermans's user avatar
-2 votes
1 answer
160 views

I'm updating somebody else's code. They did the following : bool a(); bool b(); a() || b() || std::clog << "whine about something" << std::endl; I'm replacing the std::clog bit ...
Gregorio Litenstein's user avatar
0 votes
1 answer
66 views

I am making a Charity App project, and I am struggling to figure out how to have an anonymous button before someone submits their donation. I want the anonymous option to display before someone ...
beansaregood's user avatar
0 votes
1 answer
58 views

I was given a truth table of four variables, let's call them A,B,C,D. I found every instance where the truth table was true and turned it into a function: F = (-A^-B^-C^-D) v (-A^-B^-C^ D) v (-A^-B^ C^...
Scorch's user avatar
  • 29
0 votes
6 answers
184 views

In the following (paraphrased) code, I am checking various conditions, updating them, and scheduling a single notification regardless of the number of changed conditions. If none of the conditions are ...
Roger's user avatar
  • 428
-1 votes
1 answer
645 views

I am working on a problem where I have to draw a logic circuit using no more than 2 Nor gates. The function F(A, B, C, D) = Σ(2,4,10,12,14) with don't care conditions Σ(0,1,5,8). After drawing the k-...
TheIncrediblyStupidOne's user avatar
1 vote
1 answer
159 views

C++ has 'accumulator' operations for arithmetic (+,-,*,/) , and for bitwise operations AND and OR - but not for logical operations. Now, in our code, we sometimes need to conjunct many boolean values -...
einpoklum's user avatar
  • 137k
-2 votes
1 answer
145 views

I need a counter that displays a custom number sequence instead of counting up or down. I know I'm gonna need 3 JKs, meaning 2 ICs with 2 flip-flops. a few logic gates, but I don't really get how I ...
Waffle_Runian's user avatar
1 vote
2 answers
285 views

I'm doing some simplifications for a circuit and I ended up getting the following expression: A.C'.D' + A.B'.C' + B.C.D' + B'.C.D + A'.B'.D' which translates to the truth table where 0, 2, 3, 6, 8, 9, ...
Waffle_Runian's user avatar
5 votes
4 answers
386 views

I'm working on a complex rule parser that has the following properties: A space character separates rules A "+" character indicates an "AND" operator A "," character ...
O.rka's user avatar
  • 31k
-1 votes
1 answer
95 views

I am a beginner in this, I was curious if i can write the below code more efficiently. I can't use loops or conditional statements, just logical operators. double a = Double.parseDouble(args[0]...
CowardPeasant's user avatar
1 vote
0 answers
57 views

I'm currently working in a Unity project where I need to create an AR project. Also I need to give guidance to the user. In my case, the working of multimeter is working.. but when I try to implement ...
Katherin Jose's user avatar
1 vote
1 answer
152 views

Given a truth table, maybe 3-vars, 5-vars or even 10-vars, i can write its formula in DNF or CNF, and simplify it using K-Map or Quine-McCluskey algorithm. But it is based on {NOT, AND, OR}. Now the ...
tangsongxiaoba's user avatar
0 votes
1 answer
64 views

I have a Postgres database with a table named servers containing these columns: compliance status operating system version reference ID - if a server is not compliant or the os is not the latest ...
Patrick Teng's user avatar
0 votes
1 answer
49 views

Hi I'm new to Excel VBA trying to tell the VBA to autocalculate should my autocalculate checkbox be selected. And if the autocalculate checkbox is selected, to check if the RectanglePerp checkbox is ...
Patrick's user avatar
0 votes
1 answer
164 views

The problem (original found here) is to be given a random string of t's and f's (standing for boolean true/false) separated by one of & | ^ e.g. "T&F|F^T&T^F" and write a ...
John Ziegler's user avatar
0 votes
1 answer
104 views

For a uni project I have to create an implication graph from clauses. For example, from the clause (a or b), I can determine these implication : ¬a -> b ¬b -> a but I really can't find the ...
Henri Clamageran's user avatar
1 vote
2 answers
320 views

In the problem I am trying to solve, I have a list of length n of boolean variables called x. Given an integer m where m < n, I need to define these two constraints: if LinearExpr.Sum(x[m:]) > ...
Zufra's user avatar
  • 646
0 votes
0 answers
127 views

Displays a newline followed by "Enter First Number (4 binary digits): " as a prompt for the user to input a four-digit binary number. Accepts user input for the first number, echoing each ...
Christian Mihalik's user avatar
0 votes
0 answers
61 views

I executed the below java code in IDE. the first sysout prints false. where as second sysout prints true. Some websites says because of operator precedence this occurs. System.out.println(false &&...
nullr4pt0r's user avatar
0 votes
0 answers
60 views

I am writing a program to evaluate a boolean algebra equation such as A'B + C' Ive tried changing how the temparray is read or created and im not sure what im missing Im relativey new to this so it ...
Fanshiko's user avatar
1 vote
2 answers
114 views

Here is the problem: number = 1101 #You may modify the lines of code above, but don't move them! #When you Submit your code, we'll change these lines to #assign different values to the variables. # #...
XYZ's user avatar
  • 19
0 votes
1 answer
48 views

I am trying to create a function that returns a different greeting depending on two variables: the country and time provided. If time is greater than or equal to 0 but less than 12 it will be morning. ...
Umar Hussain's user avatar
-1 votes
1 answer
42 views

How to make an alert show up when the page won't load AND it's been 7 seconds. This is the expected behavior and I would like the alert to explain to the user why this is happening. I see this code ...
Ali Vidler's user avatar
0 votes
0 answers
85 views

I have some pseudocode that is in the form: patch a: if b == "foo1" then a = "No" if c == "foo2" then if d == "foo3" || d == "foo4&...
mohammed ali's user avatar
0 votes
0 answers
117 views

I'm a beginner to C# code and having trouble figuring out how to get a certain game feature to work. I want the player to be able to drag images into slots, press a button to check, and receive ...
shiichiire's user avatar
1 vote
1 answer
320 views

I am working on a project that will take two 4-bit numbers between 0-9 and add/subtract them to be displayed in a seven segment display. Here is a big picture idea of what I am trying to create My ...
Andrew Desen's user avatar
0 votes
1 answer
834 views

I am doing some academic/educational research (topic is related to boolean logic and it's extensions), and there is a mathematical algorithm that I would like to verify over some large set of numbers, ...
MrOnlineCoder's user avatar
-3 votes
1 answer
53 views

Which of the following will be fully evaluated that first option will be checked inclusive the second option, if the following variables represent the following boolean values a = True b = False ...
Kondwani Paul Kufeyani's user avatar
-2 votes
1 answer
203 views

I am currently trying to learn how to simplify logical expressions. But I'm stuck on this problem where I have to simplify this expression using the laws of logic (Boolean algebra).I would like some ...
Listochek's user avatar
0 votes
0 answers
80 views

I was debugging a function and I have encountered a misterious thing: Given a PySpark dataframe with one column (name_id) I build another (is_number) one using a lambda function to see if name_id is a ...
Python Puzzle's user avatar
0 votes
1 answer
44 views

I have a for loop which runs based on value of boolean variable. public class LoopClass{ .. private boolean[] toInterrupt = new boolean[]; public boolean getValue() { return ...
Stephan's user avatar
  • 131
0 votes
1 answer
425 views

I recently downloaded Multisim to give it a try. I used it many years ago and recently have a need to design some circuits so it was my first go-to. However, I am run into issues where the ...
Dominick's user avatar
  • 496
0 votes
1 answer
443 views

I do not understand the truth table (Figure 1.2) function's output (the four right columns) The function input variables (x and y) have bold numbers to the right of them, that I am not sure how to use,...
Nermin's user avatar
  • 49
2 votes
1 answer
106 views

The code below provides for testing the satisfiability of a 2-SAT boolean formula (a formula containing just clauses of the form X v Y). Although other algorithms exist (strongly connected components ...
scobiem's user avatar
  • 21
0 votes
1 answer
96 views

Here goes an example of C# code. I did not get why in first case we will have 1 instead of 0. Why does it return 1 instead? static void Main(string[] args) { int firstNumber = 0; bool ...
DeepBlue's user avatar
-2 votes
2 answers
63 views

I was wondering if those familiar with codingbat's problems might be able to help me with understanding the differences between these two solutions and why one doesn't work. The problem: Given a ...
AzureBoredom's user avatar
1 vote
1 answer
134 views

I don't understand what's going on here in PHP. I've spent hours on this until I understood that it doen't work normally, or that I dont understand something. Here the few lines : $test = false OR ...
Lomchat's user avatar
  • 19
2 votes
1 answer
321 views

I have 2 switches that correspond to 2 lights and I would like to control them with logic gates. My problem starts when a switch is ON and the second one goes into ON as well. In this condition, I ...
Thanasis Valto Kourpetis's user avatar
1 vote
0 answers
38 views

Can you fix this code for me? #include #include #include #include #include using namespace std; // Function to print the Karnaugh Map void printKMap(const vector<vector>& kMap, const ...
Damian Roberts's user avatar

1
2 3 4 5
39