I had the impression that proving that NAND and NOR are universal gates is a pretty common assignment for first or second year computing and engineering students.
Type: Posts; User: laserlight
I had the impression that proving that NAND and NOR are universal gates is a pretty common assignment for first or second year computing and engineering students.
No, it will return 1 for non-zero (or true, in the case of C++, which will be converted to 1).
Oh, this is good. Every since iMalc pointed out that a simple return a - b; is vulnerable to arithmetic overflow, I have been rather depressed over having to use the more verbose ternary operator...
I was inspired by this: Security.
I presume that includes ternary operator, and that this is either C or C++?
I don't think so. I think that it is merely an unstated assumption. I wanted to propose the solution of just capturing the dwarves and dragging them in a direction to see their response, but then I...
hmm... but that seems to assume that the dwarves are benevolent. If they are (or more accurately, could be) malicious, then you have to phrase that second question more explicitly to your advantage.
Right, but honestly I do not see how it proves the property. Could you elaborate?
I think zacs7 forgot the phrase "within the given range" or "greater than 3".