Autor Beitrag
mega
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

Win XP
D3 Prof
BeitragVerfasst: Di 11.04.06 11:38 
Hallo,
wie bekommt man es hin, einer Variable eine Zahl im Binärformat zuzweisen, so wie man $ für HEX Zahlen nimmt?

Was ist das Zeichen für binär?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Di 11.04.06 12:13 
Das gibts IIRC nich. Sowas musst du dir selber proggen. Am besten, du holst dir mit IntToHex die Hexadezimal darstellung (in String Format) und wandelst immer ein Zeichen in vier 1en und 0en um. beispiel:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
 Dez 255
Hex FF
(F = 1111)
         F   F
=> Bin 1111 1111

oder
Dez 16
Hex 10
( 1= 0001
  0= 0000 )
         1    0
=> Bin 0001 0000

genauso kannst du natürlich umgekehrt rechnen. aber ein Zeichen wie $ gibts da nicht.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.