next up previous
Next: Dividieren in Binär Up: Spezifikation Previous: 4-Bit Binär nach BCD

n-Bit nach BCD

Ein allgemeiner Algorithmus in Pseudo-Code:
Z ist umzuwandelnde Zahl
Solange (Z>0)
  Gib (Z modulo 10) (in binaer) aus und
    wandere eine Cursorposition nach links (zur naechst hoeheren Dekade).
  Z = Z / 10


 

Ingo Rohloff
11/14/1997