Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Bits and Bytes - Quick-Tutorial by sakura
30. Jan 2003, 10:16
Code:
Bit1 | Bit2 || AND | OR | XOR
0 | 0 || 0 | 0 | 0
1 | 0 || 0 | 1 | 1
0 | 1 || 0 | 1 | 1
1 | 1 || 1 | 1 | 0
Bit | NOT
0 | 1
1 | 0
Setzen eines Bits (BitIndex basierend auf 0)
Byte := Byte or (1 shl BitIndex)
Löschen eines Bits (BitIndex basierend auf 0)
Byte := Byte and (not (1 shl BitIndex))
Switchen eines Bits (BitIndex basierend auf 0)
Byte := Byte xor (1 shl BitIndex)
Michael Ein Teil meines Codes würde euch verunsichern.
|