Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Purpose of BCD

Name: Anonymous 2010-02-10 4:50

Apparently, Binary Coded Decimal was an important feature in early CPUs. Can someone explain to me what its purpose is? I know that it makes it easier to print decimal values to a screen, but really, converting a binary integer into a string of decimal characters and vice versa are trivial problems. Is it really worth the extra CPU complexity and decreased data density just to give the programmer slightly less work to do when printing decimal numbers? You would think that with memory being so expensive back in the day, engineers would be more motivated to conserve its use.

Name: Anonymous 2010-02-10 5:00

It was cheaper to incorporate the well understood BCD circuitry into the CPU for the purpose of displaying decimal than it is to make use of the general CPU for the purpose of displaying decimals.

Name: !iN.MY.aRMs 2010-02-10 5:06

Binary Coded Decimal unuseble for atomic explozion calculation

Name: Anonymous 2010-02-10 6:48

engineers were stupid back then, they didnt know crap about computers and didnt have internet to look shit up or fap.

Name: Anonymous 2010-02-10 10:04

Probably because they coded most a lot in ASM.

Name: Anonymous 2010-02-10 10:32

I use HP42S emulator that uses BCD internally to avoid errors with inexact values that might be caused by binary representations.

Name: Anonymous 2010-02-10 10:35

>>6
They're both inexact.

Name: Anonymous 2010-02-10 10:37

All this bytefucking makes me sick. Why in the hell we don't have reduction machines yet?

Name: Anonymous 2010-02-10 11:40

>>7
True, but the BCD version correctly emulates the real hardware whereas the binary version does not.

Name: Anonymous 2010-02-10 21:24

>>2
But it's a trivial problem, just a matter of:

Get an array of decimal characters from the user
Starting from the rightmost character, do the following:
      Read the character, convert it into the proper binary value
      Multiply it by the 10^(n-1), where n is the place of the current digit
      Add the value to a counter

Once you've done that for all of the characters in the input string, you've got a valid, machine-useable number. Why exactly would they waste money on the hardware necessary for BCD and deal with smaller data density when it's just a simple subroutine call for a command line interpreter?

Name: Anonymous 2010-02-10 22:58

ISO9660 4lief

Name: Anonymous 2010-02-11 17:42

>>10
So what you're saying is it's a gigantic waste of registers and processing power and that you don't understand programming.

Name: Anonymous 2011-02-03 7:36

Name: Anonymous 2011-02-04 13:58

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List