Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binary-coded decimal
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Advantages === * Scaling by a power of 10 is simple. * [[Rounding]] at a decimal digit boundary is simpler. Addition and subtraction in decimal do not require rounding.{{dubious|Rounding|date=November 2021}} * The alignment of two decimal numbers (for example 1.3 + 27.08) is a simple, exact shift. * Conversion to a character form or for display (e.g., to a text-based format such as [[XML]], or to drive signals for a [[seven-segment display]]) is a simple per-digit mapping, and can be done in linear ([[Big-O notation|O]](''n'')) time. Conversion from pure [[binary number|binary]] involves relatively complex logic that spans digits, and for large numbers, no linear-time conversion algorithm is known (see {{section link|Binary number|Conversion to and from other numeral systems}}). * Many non-integral values, such as decimal 0.2, have an infinite place-value representation in binary (.001100110011...) but have a finite place-value in binary-coded decimal (0.0010). Consequently, a system based on binary-coded decimal representations of decimal fractions avoids errors representing and calculating such values. This is useful in financial calculations.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)