This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vba:cast:bitandbyte [30.04.2014 11:30:50] yaslaw [[VBA] bitArray() char2byte() und byte2char()] |
vba:cast:bitandbyte [29.04.2015 11:15:38] (current) yaslaw |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== [VBA] bitArray() char2byte() und byte2char()====== | + | ====== [VBA] bitArray(), char2byte() und byte2char()====== |
- | {{:vba:functions:bitandbyte.bas|Download bitAndBytes.bas Version 1.0}} | + | //Drei Funktionen im Umgang mit Bits.// |
+ | |||
+ | {{:vba:cast:bitandbyte.bas|Download bitAndBytes.bas Version 1.0}} | ||
- | Drei Funktionen im Umgang mit Bits. | ||
- bitArray() zerlegt ein Zahl in ihre Bit-Teile. Ist also das Rekusive zu 1+2+4+8+... | - bitArray() zerlegt ein Zahl in ihre Bit-Teile. Ist also das Rekusive zu 1+2+4+8+... | ||
- Mit char2byte() kann man die Bit-Darstellung eines Zeichens ermitteln | - Mit char2byte() kann man die Bit-Darstellung eines Zeichens ermitteln | ||
Line 107: | Line 109: | ||
====Beispiele==== | ====Beispiele==== | ||
- | <code> | + | <code vb> |
'example 1) Byte einer Zahl. Zahlen sind tandart nach BCD-Codierung | 'example 1) Byte einer Zahl. Zahlen sind tandart nach BCD-Codierung | ||
print_r getChar("1001") | print_r getChar("1001") |