165k views
5 votes
Two input capture events occur at counts 0x1037 and 0xFF20 of the free-running counter. How many counts, in decimal have transpired between these two events?

A. 25,891
B. 57, 421
C. 61,161
D. 64, 551

User Milo P
by
5.3k points

1 Answer

5 votes

Answer:

The correct answer is C.

Step-by-step explanation:

You have to do 0xFF20 - 0x1037 but first, you need to convert the counts from hexadecimal base system to decimal base system using this formula:


N = x_(1) * 16^(0) + x_(2) * 16^(1) + x_(3) * 16^(2) + x_(4) * 16^(3) + ... + x_n 16^(n-1), where position of the x₀ is the rightmost digit of the number.

Note:

  • A = 10.
  • B = 11.
  • C = 12.
  • D = 13.
  • E = 14.
  • F = 15.

0xFF20 = 15*16³+15*16²+2*16¹ = 65312

0x1037 = 1*16³+3*16¹+7*16⁰ = 4151

Result: 65312 - 4151 = 61161

User Kebomix
by
5.3k points