0

I'm curious about the trade-offs that have been made in implementing different kinds of arithmetic in different models of computers, to which I'm trying to understand what the costs of various options would be.

Say you want to implement base-100, using 7 bits to store a decimal number from 0-99. So you want an adder circuit that takes a pair of 7-bit inputs and produces a 7-bit output (still 0-99) plus a carry flag.

How many logic gates would this take, roughly, compared to the obvious alternatives of either 7-bit binary or 8-bit BCD?

rwallace
  • 559
  • 3
  • 11
  • 1
    It really isn't a question of the number of gates required in the ALU -- which really doesn't change much in the options you've outlined -- but rather, the other operations you might need to do on those numbers. You need to take a higher-level systems view of the kind of data you need to process, how you get that data into and out of the system, and the kinds of operations you need to do on it. – Dave Tweed Jul 09 '20 at 14:51
  • @DaveTweed Okay, what other operations are required? Converting to and from decimal for I/O, is certainly much easier with base-100 than binary (albeit slightly more difficult than with BCD). – rwallace Jul 09 '20 at 15:23
  • Using 7-bits to store a...number from 0-99 isn't "base-100." That would just be straight-up _binary_. Now, if you used an _additional_ seven bits to represent the N*100 place (where 0<=N<100), and maybe seven more bits after that for the N*10000 place, then we would be talking about what might be called "binary-coded base-100 notation." – Solomon Slow Jul 09 '20 at 19:48
  • 1
    Well, take storage, for example. How many base-100 numbers do you need to store? Compared to pure binary, BCD requires 20% more bits, and base-100 requires 5% more bits. Same thing for bus widths throughout the machine. Gate count is rarely the driving factor in choices like these. – Dave Tweed Jul 09 '20 at 22:35
  • I don't see how converting base-100 to base-10 is significantly easier than converting 7-bit binary to base-10. In base-100 you have 100 different symbols, each represented by a 7-bit binary value. You have to convert these 100 symbols to 100 sets of two BCD values...you are still mapping a 7-bit binary value to an 8-bit, 2-digit, BCD representation. – Elliot Alderson Jul 12 '20 at 15:39
  • @ElliotAlderson Right, but compare e.g. converting a 63-bit binary number to base 10, versus converting nine 7-bit base-100 numbers to base 10. – rwallace Jul 13 '20 at 17:55
  • But that's not the situation you described in your question, is it? – Elliot Alderson Jul 13 '20 at 23:21

0 Answers0