Autor Beitrag
moddin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

WinXP Pro
Delphi 7 Enterprise ;-)
BeitragVerfasst: Fr 10.02.06 00:47 
123456 XOR 654321 = 530865

???? kann mir jemand sagen auf welchem Mathematischen system / gleichung / term was auch immer das beruht?


Moderiert von user profile iconUGrohne: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Do 09.02.2006 um 23:54
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 10.02.06 00:52 
ausblenden Quelltext
1:
2:
3:
4:
123456 = 00011110001001000000
654321 = 10011111101111110001
=============================
530865 = 10000001100110110001


Überall dort wo beide Stellen 0 oder 1 sind (also gleich) kommt 0, bei verschiedenen Werten kommt 1. Im Gegensatz zum normalen OR, wo auch bei zwei 1en eine 1 im Ergebnis gesetzt wird.

Binäre Addition eben :-)
Jetstream
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 222



BeitragVerfasst: Fr 10.02.06 09:51 
Das is doch keine binäre Addition!
Bei der Addition musste dir immer noch den Übertrag merken.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Fr 10.02.06 14:49 
Binäre Addition... d.h. Addition ohne Übertrag, also stellenweise.

0 xor 0 = 0
0 xor 1 = 1
1 xor 0 = 1
1 xor 1 = 0

xor ist ein ausschließendes (exklusives) ODER, d.h. es ist dann wahr, wenn genau eine Bedingung wahr ist (und die andere nicht).

AXMD