Science Forums: What does the prefix 0x mean in hexadecimal? - Science Forums

Jump to content

Welcome to ScienceForums.Net!

Welcome to ScienceForums.Net! We welcome science discussion at all levels — from beginners to researchers, covering topics from biology to computer science, and much more. Registration is fast and free, and allows you to post on the forums, so register now and join the discussions!
  
After you've registered, come in and introduce yourself, or visit the forum index. If you need any help  registering, posting, or if you just have some questions about our site, please feel free to contact us at staff at scienceforums dot net.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Create a ScienceForums.Net Blog!
Guest Message © 2012 DevFuse
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

What does the prefix 0x mean in hexadecimal? Rate Topic: -----

#1 seriously disabled 


Baryon
What does the prefix 0x (as in 0x565) mean in the hexadecimal numeral system? What is this prefix for?
0

#2 Dudde 


Molecule

Quote

*nix (UNIX and related) shells, and likewise the C programming language, which was designed for UNIX (and the syntactical descendants of C[2]) use the prefix 0x for numeric constants represented in hex:


Wiki

looks like to denote the following number is hex

hope this helps
Having a pet rat is like having a dance studio next to a marble factory; hilarity is bound to ensue...its only a matter of time.
~ Blike
0

#3 Cap'n Refsmmat 


Icon
Mr. Wizard
It's a prefix to indicate the number is in hexadecimal rather than in some other base. The C programming language uses it to tell the compiler "this is hex, not some meaningless letters and numbers."
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#4 seriously disabled 


Baryon
Ok I get it now. Thanks a lot for the explanation guys!
0

#5 khaled 


Meson
0x[0-9|A|B|C|D|E|F]+ : Hexadecimal

0[0-7]+ : Octal

int Piano = (0xCDEFAB); // hexadecimal (0x..)

int Zero = (00); // octal (0..)

int JamesBond = (.007); // decimal (.xxx)

This post has been edited by khaled: 25 January 2012 - 01:17 PM

Everything is a graph

twitter: @khaledkhunaifer, Blog: KhaledKhunaifer:Blog
0

#6 Guest_SerDikov_*

IMHO, it is debatable all this
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users