docs.unity3d.com
    Show / Hide Table of Contents

    Complement (Bitwise)

    Menu Path : Operator > Bitwise > Complement

    The Complement Operator applies a bitwise logical NOT operation to each bit of a number in its binary form. This inverts each bit, meaning bits that are 0 become 1 and bits that are 1 become 0. For example:

    • A binary input of 01011101 outputs 10100010.

    • A hexadecimal input of 0xF0F0F0F0 outputs 0x0F0F0F0F.

    Operator properties

    Input Type Description
    X uint The value this Operator performs a bitwise logical NOT operation on.
    Output Type Description
    o uint The result of the bitwise NOT operation on the input value.
    In This Article
    • Operator properties
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023