Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incrementing time represented as NBCD format
#1
NBCD stands for Natural Binary Coded Decimal and basically means that you store decimal numbers as you naturally would on paper, except as binary. So what does this mean? It means you use 4 bits to store one number, 0-9. And store them as the ordinary decimal positioning system. So the hexdecimal number 0x3459 stands for the decimal number 3459 and not what it actually means in binary (which is 13401). In this case we're storing time as minutes and seconds in the NBCD format. For example, 0x4712 means 47 minutes and 12 seconds. So the challenge is to write the most elegant code (in which ever language prefer) you can to increment an integer representing time (only minutes and seconds). You have to makes sure that 0x5959 wraps back to 0 once incremented. Challenge closes in exactly one week.

Good luck Smile
oship me and i will give you lots of guurrls and beeea
Reply


Messages In This Thread
Incrementing time represented as NBCD format - by Blitz - 12-05-2006, 08:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)