Calculator Community > Grammer

Grammer Tutorial

<< < (4/5) > >>

Yeong:
since juju's server works now, this is an alternate address:
http://www.yeong.57o9.org

Yeong:
Chapter 4 added. I decided to separate Loops and Logic since the page was getting big X.x

Xeda112358:
Hmm, AND and OR (and even XOR) are math operations... So what they really do is perform Bit-Wise logic. For example, if you do "3 and 6", it will return 2. The reason is if you AND these two:
0000000000000011 (this is 3 in binary)
0000000000000110 (this is 6 in binary)
0000000000000010 (you get this which is 2)

The result has a 1 bit only if both bits from the inputs are 1. So, if you did this:

--- Code: ---If A=3: and B=6

--- End code ---
You would be doing this:

--- Code: ---If (A=3) and (B=6)

--- End code ---
However, doing this will result in 0 no matter what:

--- Code: ---If A=6 and B=3

--- End code ---
Lets say B=3 and A=6. The reason is that if you break it down:
A=6 and B=3
A=6 and 1
A=0
0

See the issue? 6 and 1 returns 0 :/

Yeong:
Ok, xeda. I'll try to implement that.
Ch 5 coming out tomorrow. :D

Xeda112358:
I still see:

--- Quote ---Conditon1 AND Conditon2: Returns "true" only if two conditons are true.
Conditon1 OR Condition2 : Returns "true" as long as at least one of the conditions is true.

--- End quote ---
Those aren't correct D:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version