<< lowdisc_bitlo0 Support Functions lowdisc_bitxor >>

Low Discrepancy >> Low Discrepancy > Support Functions > lowdisc_bitor

lowdisc_bitor

bitwise OR

Calling Sequence

z = lowdisc_bitor(x,y)

Parameters

x :

a m-by-n matrix of doubles, integer value, positive

y :

a m-by-n matrix of doubles, integer value, positive

z :

a m-by-n matrix of doubles, integer value, positive

Description

Given x,y two positives integers this function returns the decimal number whose the binary form is the OR of the binary representations of x and y. If dimension of x is superior than 1 then z(i) is equal to bitor(x(i),y(i)).

Examples

// example 1 :
// '110000' : is the binary representation of 48
// '100101' : is the binary representation of 37
// '110101' : is the binary representation for the OR operator
// applied to the binary forms 48 and 37
// so the decimal number corresponding to the OR operator
// applied to binary forms 48 and 37 is : 53
x=48;
lowdisc_dec2bin(x)
y=37;
lowdisc_dec2bin(y)
z=lowdisc_bitor(x,y)
lowdisc_dec2bin(z)
// example 2 : the function is vectorized
x=[12,45];
y=[25,49];
z=lowdisc_bitor(x,y)

Authors

<< lowdisc_bitlo0 Support Functions lowdisc_bitxor >>