Lets learn APL! Part 3
TheForArkLD (660)

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.
Uh why?
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.
Use ~ to Get NOT Gate Data,And you can use array on NOT Gate.
Example:

     ~ 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)
Use = to get AND Gate Data,And you can use Array on All Gates.
Example:

     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.)
Use to get XOR Gate Data.

     1 0 1 0 1 ≠ 0 1 1 0 1
1 1 0 0 0

Next,Boolean.
Its easy,1 is true,0 is false.

Today lesson is end.
Thanks for viewing my lesson :)
When you have questions to ask me :)

You are viewing a single comment. View All