Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hallo Micha,

Danke, ich habe die Zahlen dezimal vorliegen, da genügt also ein 
einfaches BITXOR(A1,255) - ein xor mit 0 ändert nichts.

Ja, da hat er sich vertan: 1 xor 1 = 0 ; 0 xor 1 = 1.

Jetzt geht es aber weiter: Ich brauche ein bitweises SHIFT. OK, ich
hab erstmal selbst gesucht und BITLSHIFT gefunden. Aber wo kann ich
angeben, von wie vielen Binärstellen ausgegangen wird.

Warum wird im Beispiel
"BITLSHIFT(6;1) ergibt 12" davon ausgeganen, dass die 6 als 0110 zu 
interpretieren ist und nicht als 00000110? Hier wäre das Ergebnis 
gleich, aber wenn ich 6 mit nur drei Stellen angebe (110) wird beim 
SHIFT 101 daraus, also eine 5...

Das sehe ich anders: bei einfachen "shiften" müsste aus "110" eine
"100" werden. Die shift-Funktion entspricht einer Multiplikation bzw
einer Division(ohne Rest) mit/durch 2.

Du könntest das "Abschneiden" von n Stellen durch ein BITAND()
erreichen. Bei drei stellen eben:

        BITAND(BITLSHIFT(6;1);7)

In Binärschreibweise:

           BITAND(BITLSHIFT('110';1);'111')
        -> BITAND('1100';'111')
        -> '100'

Gruß,
Michael

-- 
    ____        
   / / / / /__/      Michael Höhne /
  /   / / /  /  mih-hoehne@web.de /
 ________________________________/


-- 
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.