Bit.band
From ComputerCraft Wiki
Revision as of 01:26, 27 February 2012 by Zach1231 (Talk | contribs) (Created page with " == Explanation == <i>AND</i> is a gate that is only on when both inputs are on. (ex. (0,0)=0; (1,0)=0; (0,1)=0; (1,1)=1) == Other than Binary == <i>AND</i> can be used as a ...")
Explanation
AND is a gate that is only on when both inputs are on. (ex. (0,0)=0; (1,0)=0; (0,1)=0; (1,1)=1)
Other than Binary
AND can be used as a basic if equals command, but isn't very reliable due to its behavior. When the lowest number is even and you count up it will pulse that number for as many times as that number. (ex. if 2 is the lowest number: 2=2 3=2, 4=0, 5=0, 6=2, 7=2, 8=0, 9=0, 10=2, 11=2, 12=0) However, if the lowest number is odd it will count up to that number then return to zero and start again. (ex. if you use 3 you get: 4=0, 5=1, 6=2, 7=3, 8=0, 9=1, 10=2, 11=3, 12=0)
--Zach1231 01:26, 27 February 2012 (UTC)