docs.unity3d.com
Search Results for

    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
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)