Lets learn APL part3!( i dont write more japanese,im japanese but its make tired to me)
Today lesson is Logic gates and boolean.
First,i description the logic gates.
Probably you dont know logic gates.
Please remember this : We have 2 inputs for logic gates,name is A and B
1st is AND Gate,When A and B is 1 to OUT is true.
2nd is OR Gate,When A is 1 or B is 1 or A and B is 1 to OUT is true.
3rd is NOT Gate(Its use one input only,name is IN),When IN is 0 to OUT is true.
NOTE : In NOT Gate,other is false
4th is XOR Gate,When A is 1 and B is 0 or A is 0 and B is 1 to OUT is true.
Note : You can make NAND and NOR and XNOR,but how to?Use NOT Gate and other gate.
Example : NAND is NOT + AND
Ok,Please remember their gates.
Ok lets code APL!
And remember this rules.
Rule 1.Dont use Not Boolean on Gates,When you use to its return DOMAIN ERROR
1st,Logic Gate is NOT.
~ to Get NOT Gate Data,And you can use array on NOT Gate.
~ 0 1 0 1 1 0 1 0 1 0 0 1
2nd Gate is AND(XNOR) Gate.
(Yay its can use on not Boolean)
= to get AND Gate Data,And you can use Array on All Gates.
1 0 1 1 0 = 0 1 0 1 0 0 0 0 1 0
3rd Gate is XOR Gate.( I dont know OR Gate code sorry and its can use not boolean.)
≠ to get XOR Gate Data.
1 0 1 0 1 ≠ 0 1 1 0 1 1 1 0 0 0
Its easy,1 is true,0 is false.
Today lesson is end.
Thanks for viewing my lesson :)
When you have questions to ask me :)
Hey do you know where I'd find a list of APL operators/functions that describe if they are monadic/dyadic/something else? All I've found is the wikipedia entry, which is kinda outdated.