| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Fixed-Point Toolbox |
| Contents | Index |
| Learn more about Fixed-Point Toolbox |
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); disp(bin(a)) 1010
Complement the values of the bits in a:
c = bitcmp(a); disp(bin(c)) 0101
bitand, bitget, bitor, bitset, bitxor
![]() | bitandreduce | bitconcat | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |