Dezimalzahlen und Binärzahlen

Zahlensysteme

Die Entwicklung der Modellbahn Steuerung in den späten 1970'ern und frühen 1980'ern war geprägt durch viele technische Sachzwänge. Vor allem durch Speicherknappheit die die Techniker zu striktem Sparen gezwungen haben. Auch 2017 ist Speicher in kleinen Prozessoren ein knappes Gut. So wurden in Speicherzellen Informationen die nur ein Ja / Nein kannten zusammen gefasst. Die einzelnen zusammengefassten Informationen wurden dann zur klaren Darstellung im 2'er System dargestellt. Da die meisten Bedienelemente aber das 10'er System verwenden musste umgerechnet werden. Weiters konnte man die 8 Speicherstellen schneller als 3-stellige Zahl eintippen. Für den nicht so Technik affinen Benutzer ist das leider etwas verwirrend.

Durch Foren und diversen Printmedien geistern immer wieder wilde "Flamewars" ob die Zählweise in diversen DCC Registern (CVs) mit 0 oder 1 beginnen soll. Hauptursache scheint die Angst von Herrn Lenz vor der Zahl Null gewesen zu sein. Für mich war die Fragestellung lange Zeit völlig unbegreiflich. Vor allem wo doch die 2'er Potenzen sich schon mit der Wertigkeiten bei der Konvertierung vom Binär in das Dezimalsystem zusammen passen.

Glücklicherweise haben alle DCC Hersteller den Vorteil begriffen, leider gibt es in den diversen Foren immer wider die sinnlosen Diskussionen.

Decimal Numbers or Binary ones

Number System

The development of
model railroading in the early years, especially late 1970'ies and early 1980'ies lack on resources forced many decisions to handle that. Especially limited memory was always an issue. Even in 2017 memory in small devices is limited. This forced engineers to group single decisions like yes / no together into one byte. The grouped information set is presented in binary format. As most of our user input devices use the 10' system those binary numbers need to be translated into the decimal system. Another reason is that it is faster to type at maximum 3 digits instead of 8. For non technical people the translation is always a big issue.
In many forums and printed media you'll frequently find flame wars whether counting starts at 1 or 0. A possible main reason is the fear of Mr. Lenz of the number 0. Especially regarding CVs in decoders. For me as a computer technician this was never a question. Especially as the powers of two for converting binary to decimal version fits nicely when we start counting with 0. Thanks good almost all DCC companies realized that advantage.

Unfortunately some media frequently start the discussion again.
Binär Umrechnung

 
Die Umrechnung geht sehr einfach. Das Bild zeigt an den Positionen 0 und 3 sind Bits gesetzt. Die Wertigkeiten der Positionen sind 1 bzw 8. die beiden Zahlen werden zusammengezählt und man hat die Dezimalzahl.
The conversion is pretty simple. The picture shows bits on position 0 and 3. The value of the active positions is 1 and 8. Just add these numbers together and the decimal value is found.
 

CV29

DCC Decoder gibt es in verschiedenen Ausführungen. So besteht die Möglichkeit bei vielen Decodern zwischen 14 und 28 Fahrstufen umzuschalten. Diese Umschaltung wird über Bit 1 der Konfigurationsvariable 29 gesteuert (siehe Binärumrechner). Darüber hinaus gibt es noch Decoder die 128 Fahrstufen beherrschen. Viele arbeiten intern bei der Ansteuerung der Motoren oft auch mit 256. Der Datenstrom am Gleis ist unterschiedlich wenn Kommandos an 14 Fahrstufendecoder gesendet werden gegenüber jenen mit 28 Stufen. Wenn ein 14 Fahrstufendecoder mit einem 28 Fahrstufenkomando angesprochen wird, kommt es zu "Fehlinterpretation" des Befehls. Das symtom ist zumeist, daß die Lampen nicht richtig funktionieren, oder daß die Maschine Bocksprünge mach. 128 Fahrstufen Befehle sehen grundsätzlich anders aus und führen dadurch zu keinen Verwirrungen. Nicht alle DCC Decoder  beherrschen 128 Fahrstufen.  

CV29

DCC decoders are available from various vendors in different versions. Many of the new ones offer 14 and 28 speed steps. The operations mode is defined with bit of in CV 29 (see also my binary calculator). Additionally some decoders offer 128 steps too. Some use 256 steps internally while interpolating between speed steps during acceleration. The data flow on the track is different for 14 / 28 steps. If a 14 step decoder receives a 28 step command the bits in it get misinterpreted. The usual symptom is that the lights don't work and sometime the engine does not move as expected. 128 steps have a totally different command structure and cant be misinterpreted that way. Not all DCC decoders are capable operating in 128 step mode.



 

(C) AMW 2017ff Visitors since 2017-07-01: Failed to execute CGI : Win32 Error Code = 2