Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

The Binary and hexadecimal number systems explained

Status
Not open for further replies.

sanna

Member level 2
Joined
Jul 19, 2007
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,658
hexadecimal 0x0b

Hi, I am new in embedded system. I am wondring what is all these values (0x0B, 0x0D...) is any book or website whick I can learn these. I don't know how I should use them. for ex here I don't understand to set up inputs why should we have 0x1B?SET_TRIS_a(0x1B);

please help;
thanks
 

These values??0x0B

0x is just a prefix to indicate that the number is a hexadecimal number.
So 0x1b is equal to 27 decimal, or 0001 1011 in binary.
So SET_TRIS_a(0x1b) sets up, assuming 1 is input and 0 is output:

a0 = input
a1 = input
a2 = output
a3 = input

a4 = input
a5 = output
a6 = output
a7 = output

Another prefix used is 0b for binary.
eg: 0b00011011
 

Re: These values??0x0B

Hi,

See the attachment, which describes the Binary and hexadecimal number systems.

If you need more information, contact me.

Regards,

N.Muralidhara
 

Re: These values??0x0B

Hexadecimal is also very easy to convert to decimal once you understand how it works. Even though it looks confusing at first it actually makes things easier when working with registers that have single bit that require setting / clearing
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top