BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
Search
 
 

Display results as :
 


Rechercher Advanced Search

December 2024
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

The Purpose / Function of Logical Operators

Go down  Message [Page 1 of 1]

SnB@BWH

SnB@BWH
Admin & Writer

The purpose / function of logical operators is to test whether a condition is true or false. There are logical operators, such as: AND, OR, NOT, etc. and mathematical operators, such as: add, divide, multiply, etc. I will show you the function of logical operators in this brief tutorial.

I will use the AND operator as an example.

We will use A and B as variables for the condition test, and will let the answer be Q and the result R.

If both A & B = Q, then R = True, otherwise R = False, if both bits are not equal to Q.

It's as simple as that. They are used to test conditions for being true or false based on a logical expression, like above.

Here is an example of AND being used in code in 6502 assembly:

The Purpose / Function of Logical Operators Screen36

We have the accumulator loaded with value 0 at address 00E7. The AND compares the accumulator to value 0x40, if it equals 0x40, the next instruction tells it to branch on equal to the instruction at B39F, which tells it to clear the carry. However, if it is false, it skips over the instruction and proceeds to the next instruction, which is to load the x register with value 0x06, then it loads again through slightly different logic. If the value has been subtracted, it will skip over to address B3A1. If that condition is false, it will increment the X register, and will compare X to value 0x09, if it equals 0x09, it will branch when the carry has been cleared. At least... That's what I think it does. My 6502 is a bit rough. I've only scratched the surace of it.

But at least now, you can see how logical opeators function, and if you don't... Go fuck yourself.  Smile

Wrote this because I was bored.


_________________
The Purpose / Function of Logical Operators Simple10

The Purpose / Function of Logical Operators LSTjSyDDiscord: SnB_BWH

Click HERE to earn free bitcoin, litecoin, dogecoin, and dash!

Win Free Bitcoins every hour!

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum