Top "Logic" questions

Logic refers to the ultimate flow of your code and how you arrive your desired solution.

VHDL: Finding out/reporting bit width/length of integer (vs. std_logic_vector)?

Say I need a signal to represent numbers from 0 to 5; obviously this needs 3 bits of std_logic to be represented (…

integer logic width vhdl synthesis
Which Logic Operator Takes Precedence

So, I'm looking into writing a slightly more complex operation with logic operators in an if-else statement. I know I …

javascript if-statement logic operator-precedence
highest palindrome with 3 digit numbers in python

In problem 4 from http://projecteuler.net/ it says: A palindromic number reads the same both ways. The largest palindrome made …

python math logic palindrome
Are || and ! operators sufficient to make every possible logical expression?

The logical expression ( a && b ) (both a and b have boolean values) can be written like !(!a || !b), …

logic logical-operators
Mustache - How to detect array is not empty?

I want to implement the following logic with Mustache: {{#if users.length > 0}} <ul> {{#users}} <li>{{.}}&…

arrays logic mustache
Why does javascript accept commas in if statements?

I stumbled across some javascript syntax that seemed like it should produce a parse error of some kind but doesn't: …

javascript parsing logic
C# convert a string for use in a logical condition

Is it possible to convert a string to an operator for use in a logical condition. For example if(x …

c# logic
AngularJS and PHP backend

Maybe it's not a real question, rather is's a discussion. I decided to learn angular, using a simple task, build …

php api angularjs logic
How to code a calculator in javascript without eval

So, I've searched high and low, and I can't find an answer to this. I've attempted it about three times …

javascript logic eval calculator
Convert function with only AND Boolean operations

I have some function like (A and ( B or c)) or (D and E and (F or H or R …

boolean logic boolean-logic boolean-expression boolean-operations