Field is empty
'%1' is not a valid email address.
Field must not be empty.
It must be at least %1 characters long.
It must be less than %1 characters long.
It must be the same as the field '%1' value.
Invalid symbol entered. Allowed symbols:'%1'.
Number expected.
Positive number expected.
Integer expected.
Positive integer expected.
Values must be in the range [%1 .. %2].
Symbol %1 is already entered in allowed character set.
Field value must be less than %1.
First character must be a Latin letter.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
January
February
March
April
May
June
July
August
September
October
November
December
century
B.C.
%1 century
Error occurred while importing data on line:%1. Invalid value: '%2'. Error: %3
"Could not determine a data field separator. You may use one of the following characters to separate data fields: tab, ';' or ','."
%2/%3/%1%4
%2/%3/%1%4 %6:%7
N
S
E
W
yes
no
Invalid file format. We support only the following formats: %1
Please leave your email or phone number.
minutes
minutes
minute
minutes
minutes
minutes
minutes
minutes
minutes
minutes
minutes
minutes
minutes
hour
hours
hours
hours
hours
hours
hours
hours
hours
hours
hours
days
day
days
days
days
days
days
days
days
days
days
days
month
months
months
months
months
months
months
months
months
months
months
year
years
years
years
years
years
years
years
years
years
years
ago
%1 minutes ago
%1 minutes ago
%1 minute ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 minutes ago
%1 hour ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 hours ago
%1 days ago
%1 day ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 days ago
%1 month ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 months ago
%1 year ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
%1 years ago
HTML code for site/blog
Appearance
Sample
Close
Sofia Vasilievna
ProfessionalComputers

Binary Coded Decimal (BCD)

This online calculator converts decimal number to binary code in BCD notation and vice versa
Timur2011-11-19 21:08:15
When I finished calculator Conversion of fractional numbers between numeral systems I thought that this was the final one on numeral systems. However, there appears the reason for another one. As I wrote on the link above, the problem which appears during convertion of fractional numbers from one numeral system to another is the loss of precision.

As example I used decimal 0.8, which can't be translated to binary system without precision error.

Since decimal numbers are "native" for human, and binary numbers are "native" for computer, the problem of precision (for these particular numeral systems) once got a solution - invention of binary coded decimal (BCD) format. Idea was simple - use one byte for each decimal digit. And this byte should hold this digit's binary code. Then, for example, 0.8 becomes 0.00001000.

Well, on second thought idea was tuned. Since upper nibble is always empty (since 9, the maximum, is 1001) - let's use only one nibble for each decimal digit. And this was called packed BCD.
In packed BCD our 0.8 becomes 0.1000, and, for example, 6.75 becomes 0110.01110101.

Good idea - no precision loss, convertation can be done with ease, rounding is simple - just shift unnecessary nibble. But it wasn't widely adopted, cause it makes life more difficult... for computers. BCD means more memory to hold numbers and more complex schemes for numbers operations.
So it is just old curious thing and I haven't known anything about it until I was told by site users.

Here is the calculator for BCD. You could enter decimal or packed BCD and get the conversion. Of course this can be done in mind (and this is the advantage of BCD), but just let the computer do it for you
Binary Coded Decimal (BCD)Creative Commons Attribution/Share-Alike License 3.0 (Unported)
 Decimal:
 Binary Coded Decimal:


Not suitable?

View all calculators
(228 calculators in total. )
Request a calculator
 

Comments

No comments yet!

Be the first to post a comment!
Spam filter
Send comment