Jump to content

Recommended Posts

Posted

Hi all

 

 

Im currently studying for an HND in mechatronics engineering. Working on an asignments for PLC's

 

Im stuck on a part of one question!

 

Its "what can BCD numbers do that pure Binary or Hexadecimal numbers cannot?"

 

Im struggling like hell to find an answer on the net, can anyone help?

Posted

Wiki's article on Binary Coded Decimal offers up several answers to this question. I don't think there is one thing in particular that BCD does that the others do not that fits this question precisely. The few things that are mentioned however do serve as the main factors for choosing to use this numerical representation for computational purposes. I'm particularly fond of its uses in representing certain values more precisely than other similar methods of numerical representation.

 

Someone with more experience might help so . . . .

Posted

Hi all

 

 

Im currently studying for an HND in mechatronics engineering. Working on an asignments for PLC's

 

Im stuck on a part of one question!

 

Its "what can BCD numbers do that pure Binary or Hexadecimal numbers cannot?"

 

Im struggling like hell to find an answer on the net, can anyone help?

 

In the sense that any number system can be used for mathematical operations given suitable hardware and software, one answer is "nothing" (IMO). There can be a benefit in that it can be a help to a human wishing to convert the numbers in this system straight into decimal. And it is easy for a human to convert a decimal number into BCD. http://en.wikipedia.org/wiki/Binary-coded_decimal

Posted

.2 is irrational in binary but rational in BCD. This means that computations that require precise decimal representation become less precise with the use of binary as rounding is involved. This extends to floating point mathematics under each respective representation!

 

"precise decimal representation" == common base 10 decimal numbers ie. .2

Posted (edited)

.2 is irrational in binary but rational in BCD. This means that computations that require precise decimal representation become less precise with the use of binary as rounding is involved. This extends to floating point mathematics under each respective representation!

 

"precise decimal representation" == common base 10 decimal numbers ie. .2

 

yeah... that :)

 

is this the same for hex as well?

 

hex and any base not a multiple of 10

Edited by Iggy
Posted

If it is irrational in binary how would it be rational in hex? Hex codes for binary so if it requires an infinite set of binary decimal places than it will require an infinite set of hex decimal places to code for it . .. . .

Posted

sorry could someone put this in slightly more simple terms, its friday night im on late shift til 11 and the brain is fried!

the answer to this...

 

Its "what can BCD numbers do that pure Binary or Hexadecimal numbers cannot?"

would seem to be that BCD can accurately represent decimal fractions (without rounding) while binary and hex cannot. Do you understand what that means?

Posted

yeah thanks! feeling a bit thick tonight! its been a long week, two huge assignments due in Monday as well as work, kids, wife etc! thanks all for the help!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.