I'm writing assembler for imaginary processor of my design (kinda like DCPU-16) and I want to include all major number bases. I've got hex,bin and dec, but I cannot get oct, because there seem to be no OctToInt function. Any help?
0
votes
it's a bad idea to have a function for every base. Better make a general 'BaseToint(value: string, base: integer = 10): integer' function...
- BeniBela
I don't think octal is a major numeric base anymore. Usually only used for Unix permissions.
- Marco van de Voort
Oh, back in the days of 12 bit processors like PDP8, PDP12, Intersil 6100 (based on PDP machines). Ohh joy, octal worked very nicely on these machines. You might find the odd microcontroller which uses them. Octal was also handy if all you had was 7 segment displays and you wanted to output your data, addresses. I think the Heath H8 used such a system with the 8080 chips (8 bit chips). CHEERS!
- happy coder