Friday, January 22, 2010

Comparison Instructions မိတ္ဆက္

Bit Logic Instructions ေတြေၿပာၿပီးတဲ့ေနာက္မွာ ဆက္လက္ေဆြးေႏြးဖို႕ စဥ္းစား ထားတာက Comparison Instructions အေၾကာင္းပါ။

Comparison Instruction မွာ Input ႏွစ္ခုၿဖစ္တဲ့ IN1 နဲ႔ IN2 ဟာ မိမိေ႐ြးခ်ယ္အ သုံးၿပဳတဲ့ comparison အမ်ဳိးအစားေပၚမွာ မူတည္ၿပီး တစ္ခုနဲ႔တစ္ခု compared ၿပဳလုပ္တာပါ။ ေအာက္မွာ အသုံးမ်ားတဲ့ Comparison type ေတြကို ေရးသားေပး လိုက္ပါတယ္။


1) "Equal" function
သေကၤတက "==" ပါ...။
IN1 is equal to IN2





2) "Not Equal" function
သေကၤတက "<>" ပါ...။
IN1 is not equal to IN2





3) "Greater than" function
သေကၤတက ">" ပါ...။
IN1 is greater than IN2






4) "Less than" function
သေကၤတက "<" ပါ...။
IN1 is less than IN2






5) "Greater than or Equal" function
သေကၤတက ">=" ပါ...။
IN1 is greater than or equal to IN2




6) "Less than or Equal" function
သေကၤတ က "<=" ပါ...။
IN1 is less than or equal to IN2



Comparison ရဲ႕ relult ဟာ true ၿဖစ္ေနၿပီဆိုရင္ function ရဲ႕ RLO သည္ "1" ၿဖစ္ေနပါမယ္။ အဲဒီ RLO ဟာ program ထဲမွာ compare element ကို "series" အေနနဲ႔ အသုံးၿပဳေရးသားထားရင္ "AND logic" အၿဖစ္ program network နဲ႔ link ခ်ိတ္ဆက္ေနတာပါ။ အကယ္၍ paralle အေနနဲ႔ အသုံးၿပဳ ေရးသားထားမယ္ဆို ရင္ေတာ့ "OR logic" အၿဖစ္နဲ႔ Program network မွာ link ခ်ိတ္ဆက္ေနမွာပါ။


No comments:

Post a Comment