Hacker News new | past | comments | ask | show | jobs | submit login

Intel x86 can also work natively with BCD numbers.

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




Very cool. Unfortunately it's no longer supported in Long mode (x86-64). :-(


I used to do a lot of BCD in embedded POS stuff. No one will miss it. You can do anything you can do in BCD with regular integers if you have any understanding of integer arithmetic. Yeah, it is going to take a little more time to convert to/from decimal digits you can display/input but processors these days have fast integer division so that doesn't matter.

A current issue is that a lot of programmers are bad at integer arithmetic. It isn't really taught in school.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: