How to convert UDP header to Decimal

I'm studying for my GSEC exam and one practice question has me stumped!  It should be easy but I'm just not grasping it.

The questions is What is the length in bytes of the UDP datagram in this UDP header?

04 1a 00 a1 00 55 db 51

I know 00 55 is the datagram.  And I know the answer is 85.  However, I have no idea why the answer is 85.

This should be a hex to decimal conversion correct?

Thank you!!
cas_threeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave HoweSoftware and Hardware EngineerCommented:
if you look here you will see that the 5th and sixth byte are the length. this is 0x0055 which in decimal is 85

the double byte pairs are, in order:
0x041A (source port) = 1050
0x00A1 (dest port) = 161 (SNMP)
0x0055 (length) 85
oxDB51 (checksum) = 56145 (although this doesn't matter, and should be left in hex)
0
cas_threeAuthor Commented:
Thank you, but how does it convert to 85 please?
0
Dave HoweSoftware and Hardware EngineerCommented:
it is as you assumed a hex to decimal conversion.
so...
0 x 4096 (2^12) = 0
0 x 256 (2^8) =0
5 x 16 (2^4) = 80
5 x 1 = 5

80+5 = 85 :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cas_threeAuthor Commented:
Thank you so much!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.