EmbeddedRelated.com
Forums

Hex format question

Started by Co August 25, 2010
Hello,

I did a search but I couldn't seem to find it or I didn't search correctly.

Anyways, I am currently going over some sample for the launchpad and looking over the .h file for the msp430g2231. I am doing the conversion from hex to binary to get a better visualization of what it is setting what bit in the registers. The question I am facing right now is that under the ADC10 section of the definition where they define certain syntax to a hex value one of them shows something like (2*0x800u). I never seen anything like this before. Can someone explain to me what this is? I tried doing a search on google but came up very short. How do you convert this into binary?

Thanks.

Beginning Microcontrollers with the MSP430

(2*0x800u) probably is the same as (2*(unsigned)0x800)

Let us build a tower whose top may reach unto heaven!

--- In m..., "Co" wrote:
>
> Hello,
>
> I did a search but I couldn't seem to find it or I didn't search correctly.
>
> Anyways, I am currently going over some sample for the launchpad and looking over the .h file for the msp430g2231. I am doing the conversion from hex to binary to get a better visualization of what it is setting what bit in the registers. The question I am facing right now is that under the ADC10 section of the definition where they define certain syntax to a hex value one of them shows something like (2*0x800u). I never seen anything like this before. Can someone explain to me what this is? I tried doing a search on google but came up very short. How do you convert this into binary?
>
> Thanks.
>