Hi,
mein Code rechnet dezimal in binär um. Wenn der Dezimalwert 00000000 ist, ist der Binärwert 0. Ich brauche aber 3mal die Null (000) bzw. muß der Binärwet immer 3stellig(auch bei zB. 32 soll 032 sein) sein.
Wie macht man das?
Gruß Andreas
mein Code rechnet dezimal in binär um. Wenn der Dezimalwert 00000000 ist, ist der Binärwert 0. Ich brauche aber 3mal die Null (000) bzw. muß der Binärwet immer 3stellig(auch bei zB. 32 soll 032 sein) sein.
Wie macht man das?
VB.NET-Quellcode
- configbyte1 = Eingabe_Konfig_Sound_Ausgabe.SelectedIndex + Eingabe_Konfig_Nacht_Modus.SelectedIndex * 2 + Eingabe_Konfig_Nacht_Synchronisierung.SelectedIndex * 4 + Eingabe_Konfig_DCF77_Pull_Up.SelectedIndex * 8 + Eingabe_Konfig_DCF77_Invertierung.SelectedIndex * 16 + Eingabe_Konfig_Position_der_Analoguhr.SelectedIndex * 32 + Eingabe_Konfig_Display_Invertierung.SelectedIndex * 64 + Eingabe_Konfig_Sprache.SelectedIndex * 128
Gruß Andreas