0

I found following statement in a higher engineering mathematics reference book, But couldn't understand how it has been determined ?

I have two values as follows: nanoseconds - could be any 30 bit value sub-nanoseconds - any 16 bit value

Now My queries is as mentioned below:

1) in the book, For sub-nanoseconds it mentioned that Bit n = 2(n-16) ns gives a resolution of approximately 15.2E-15 seconds, Can anyone please explain how it has been determined ? Specifically I didn't understand the highlighted parts.

2) if the two subnanoseconds(two 16-bit) x and y values added together, How could I set new nanoseconds value and new subnanosecond value properly ? ns = (x ? y) subns = ( x ? y)

1 Answers1

1

The sub-nanosecond counter is counting 65536ths of nanoseconds.

Because a 16-but value can represent numbers from 0 to 65535, inclusive, it will roll around to 0 after exactly one nanosecond.

It happens that $$\frac{10^{-9}}{65536} \approx 15.3\times 10^{-15}$$

  • Ok. Thanks for the reply. SO, How could I efficiently convert sub nanoseconds into nanoseconds ? sub-nanoseconds value of 65535, Is it (65535/65536)th part of nanoseconds.. Can you please elaborate ? – ronex dicapriyo Jul 22 '14 at 01:45
  • @ronexdicapriyo: I'm unsure what you're asking. If you have a number of 65536ths of nanoseconds, and want the same time interval in nanoseconds, divide that number by 65536. That's what "65536ths" means. – hmakholm left over Monica Jul 22 '14 at 02:06