This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Bitwise complement of fi object


c = bitcmp(a)


c = bitcmp(a) returns the bitwise complement of fi object a. If a has a signed numerictype, the bit representation of the stored integer is in two's complement representation.

bitcmp only supports fi objects with fixed-point data types. a can be a scalar fi object or a vector fi object.


This example shows how to get the bitwise complement of a fi object. Consider the following unsigned fixed-point fi object with a value of 10, word length 4, and fraction length 0:

a = fi(10,0,4,0);


Complement the values of the bits in a:

c = bitcmp(a);


Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| | | |

Introduced before R2006a

Was this topic helpful?