Documentation/Calc Functions/BITXOR

    From The Document Foundation Wiki
    This page is a translated version of the page Documentation/Calc Functions/BITXOR and the translation is 12% complete.
    Outdated translations are marked like this.


    Funktionsnavn:

    BITXELLER

    Kategori:

    Matematisk

    Resume:

    Returnerer et bitvis logisk "eksklusivt or (eller)" af parametrene. Enhver bit-position returneeres som 1, hvis værdierne af parametrene på denne bit-position ikke er ens; med andre ord: hvis den ene værdi er 0 og den anden er 1.

    Syntaks:

    BITXELLER(Number1; Number2)

    Returnerer:

    Returnerer et positivt heltal.

    Argumenter:

    Tal 1 og tal 2 er positive heltal mindre end 2 ^ 48 (281.474.976.710.656).

    Number2 is an integer in the range [0, 248-1], or a reference to a cell containing that number, that is the second value for the bitwise XELLER operation.

    • * Hvis ét af argumenterne er et decimaltal, tages der hensyn til dets gulvværdi.
    • Hvis ét af argumenterne er mindre end 0, returnerer BITXOR fejlkoden Err:502.
    • Hvis ét af argumenterne er ikke er et heltal eller er større end (2^48)-1, returnerer BITXOR fejlkoden Err:502.
    • If either Number1 or Number2 is a non-integer value, then BITXELLER truncates that value to an integer.
    • If either Number1 or Number2 is less than 0 or greater than 248-1, then BITXELLER reports an invalid argument error (Fejl:502).

    Yderligere oplysninger:

    • Ingen
    • 248 is equal to 281474976710656.

    Eksempler:

    Formula Description Returns
    =BITXELLER(6; 10) 6 is binary 0110 and 10 is binary 1010. The function evaluates 0110 XELLER 1010 and returns decimal 12 (binary 1100). 12
    =BITXELLER(D1; D2) where cells D1 and D2 contain the numbers 123 and 156 respectively. 123 is binary 01111011 and 156 is binary 10011100. The function evaluates 01111011 XELLER 10011100 and returns decimal 231 (binary 11100111). 231
    =BITXELLER(6,123; 10,9) The floor values of the two arguments are taken, giving 6 (binary 0110) and 10 (binary 1010). The function evaluates 0110 XELLER 1010 and returns decimal 12 (binary 1100). 12

    Beslægtede LibreOffice-funktioner:

    BITOG

    BITVFORSKYD

    BITELLER

    BITHFORSKYD

    XELLER

    ODF standard:

    Section 6.6.6, part 2

    Tilsvarende Excel-funktioner:

    BITXOR since v.2013.