04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Exclusive OR (^)<br />

Structure - Math<br />

The ^ function is a binary operator. It sets the resulting bits to a 1 if either, but not both, of the<br />

matching bits are 1 or to 0 otherwise.<br />

1 ^ 1 = 0<br />

1 ^ 0 = 1<br />

0 ^ 1 = 1<br />

0 ^ 0 = 0<br />

Value1 0 1 0 1 1 1 0 1<br />

Value2 1 0 0 1 0 0 1 1<br />

Result 1 1 0 0 1 1 1 0<br />

AND NOT (&/)<br />

The AND NOT function is a binary operator. It compares the bits of two values. It sets the result bits to<br />

1 if neither bit is set or to a 1 for all other cases.<br />

1 &/ 1 = 1<br />

1 &/ 0 = 1<br />

0 &/ 1 = 1<br />

0 &/ 0 = 0<br />

OR NOT (|/)<br />

Value1 0 1 0 1 1 1 0 1<br />

Value2 1 0 0 1 0 0 1 1<br />

Result 1 1 1 0 1 1 1 0<br />

The OR NOT function is a binary operator. It compares two values bit by bit and sets the result to a 1<br />

if neither bit is a 1, all other conditions will return a 0.<br />

1 |/ 1 = 0<br />

1 |/ 0 = 0<br />

0 |/ 1 = 0<br />

0 |/ 0 = 1<br />

Value1 0 1 0 1 1 1 0 1<br />

Value2 1 0 0 1 0 0 1 1<br />

Result 0 0 1 0 0 0 0 0<br />

58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!