Pronto - Arithmetic Functions - AAND()

AAND() is returning the arithmetic (binary) AND of two binary numbers.
Syntax
AAND(binary_number,binary_number)
Category
Arithmetic
Runtime
3.00 and above
Notes
This function is not intended for general use. It returns a decimal number that is the equivalent binary number when the two binary numbers passed are arithmetically ‘ANDed’ together.
Example:
SET ws-num = AAND(13,5)
//
// Result: ws-num = 5
//
// 1101  (13)
// 0101  (5)
// ----------
// 0101  (5) (ie. bit positions 2 and 4 are set (1) in both bytes)
Example:
SET ws-num = AAND(9,2)
//
// Result: ws-num = 0
//
// 1001  (9)
// 0010  (2)
// ----------

// 0000  (0) That is, no bit positions are set (1) in both bytes.)

Comments

Popular Posts