# Base 10 computer

Discussion in 'Architecture and Products' started by Davros, Mar 18, 2016.

Joined:
Jun 7, 2004
Messages:
15,960
3,200
#1
2. ### 3dilettante LegendAlpha

Joined:
Sep 15, 2003
Messages:
8,365
3,954
Location:
Well within 3d
Various architectures do have instructions for decimal math. It can combine multiple bits within the representation and treat them as a single digit.
Non-binary logic is possible, as an alternate interpretation of that statement. It doesn't need to be 1s and 0s only, though there are some significant practical advantages for the way things are.

#2
3. ### bridgman NewcomerSubscriber

Joined:
Dec 1, 2007
Messages:
60
114
Location:
Toronto-ish
Yep, most business computers were base 10 (BCD) until what us old guys would call "fairly recently". At my first full time job maybe 90% of the work ran on an IBM 360 (32-bit binary) but the other 10% was still running on an IBM 1401, which was on the edge between binary and BCD. IIRC it had 6-bit "bytes" but performed arithmetic operations on variable-length words with a single BCD digit per "byte".

#3
Lightman likes this.
4. ### A1xLLcqAgt0qc2RyMz0y VeteranRegular

Joined:
Feb 6, 2010
Messages:
1,428
1,099
Burroughs Medium Systems

https://en.wikipedia.org/wiki/Burroughs_Medium_Systems

#4
Grall likes this.
5. ### arjan de lumens Veteran

Joined:
Feb 10, 2002
Messages:
1,274
50
Location:
gjethus, Norway
The IEEE-754-2008 standard defines a few decimal floating-point formats (32-bit, 64-bit and 128-bit) that generally use an encoding that packs three decimal digits into 10 bits. This has been implemented in some processors, such as IBM's POWER processors from POWER6 and up; its main use case is apparently financial calculations. Decimal floating-point ALUs are generally considerably slower and more expensive than binary floating-point ALUs, so I wouldn't expect to see them in e.g. GPUs anytime soon.

#5
Grall likes this.
6. ### Exophase Veteran

Joined:
Mar 25, 2010
Messages:
2,406
430
Location:
Cleveland, OH
Digital usually means binary and it probably used normal binary logic with some special handlers to adjust things for base-10 and not use all of the bits allocated.

The software may have stored numbers in BCD or some other decimal representation and the CPU may have had instructions to efficiently work with these but they'd still mostly have internal logic/ALUs/etc that were some multiple of base-2.

There were actual base-10 computers but I think they died out in the 40s or 50s.

#6
7. ### silent_guy VeteranSubscriber

Joined:
Mar 7, 2006
Messages:
3,754
1,380
#7
Alexko and Lightman like this.
8. ### Entropy Veteran

Joined:
Feb 8, 2002
Messages:
3,214
1,201
I remember that! Being a scientific type, I managed to avoid COBOL.
Also, it may bear mentioning in passing that word length (8-bit=byte) took some time solidifying as well. While it may seem odd now, 7-9 bits were used that I have some personal experience with, CDC Cybers (precursors and parallell to CRAYs) used 9-bit representation, 36-bit words and 72-bit d-words which actually bit me as I ported code to a 32-bit word system, where the dubious numerical stability of the coded algorithm made it very occasionally (grrrr) diverge rather than converge nicely.
Never trust an algorithm or piece of code that is dependant on the specifics of how numbers are represented or rounded.....

#8
9. ### dnavas Regular

Joined:
Apr 12, 2004
Messages:
375
7
The great thing about rounding is just how many strategies you have -- RoundingMode in Java has ceiling, floor, half-up, half-down, half-even (banker's), and then there's whatever that bastardization that java's Math.round uses which isn't any of those. And the great thing about having all those choices is how different vendors (like database providers) choose different strategies. Ugh, rounding!

#9
10. ### bridgman NewcomerSubscriber

Joined:
Dec 1, 2007
Messages:
60
114
Location:
Toronto-ish
My first full time job was with a typical insurance company - in 1979/80 payroll was still running on an IBM 650 emulator hosted on a 1401, with the 650 sitting over in the corner as backup. The 650 was decimal-oriented internally and the 1401 was character-oriented internally but numerical calculations were performed directly on digit-per-character decimal numbers without any conversion to internal base-2 representation (IIRC there was a dedicated bit in each character that indicated end of string or end of number).

The big news in 1981 was getting the 650 emulator running on a 1401 emulator hosted on the S360, allowing the 650 to be hauled away and the 1401 moved to cold backup status, while keeping the paycheques coming.

#10
11. ### Exophase Veteran

Joined:
Mar 25, 2010
Messages:
2,406
430
Location:
Cleveland, OH
I stand corrected, IBM 650 indeed looks like one of those decimal systems still being developed in the 50s. I guess I'm really disconnected from the world where these machines were being used even in the 1980s (although even that was still well before my time)

The way I put it was probably not that good, but the distinction I'm making is between whether or not it's implemented with digital logic. I would consider that to be the case with 1401, even if the data representation and instructions are strictly limited to decimal math.

#11
12. ### bridgman NewcomerSubscriber

Joined:
Dec 1, 2007
Messages:
60
114
Location:
Toronto-ish
Yeah... you were pretty much right on in terms of when they were being developed, but they were sold for another decade or so and used for another decade after that. Nobody wants to mess with payroll

#12
13. ### msxyz Newcomer

Joined:
May 5, 2006
Messages:
112
46
Some early HP 'desktop calculators' supported BCD math... See the marvellous 'Hybrid Processor' that powered the 9825 and other desktop calculators in the mid '70s: http://www.hp9845.net/9845/hardware/processors/
it's a multichip unit composed of three programmable chips: a I/O unit (16 bit bus, 5.7MHz), a general purpose ALU (it should be 16 bit as well) and... a BCD math coprocessor (0.15 MFlops).

#13

Replies:
16
Views:
901

Replies:
20
Views:
6,637

Replies:
1
Views:
782

Replies:
90
Views:
12,314

Replies:
16
Views:
10,143

Replies:
25
Views:
2,738