Thread: binary in C
View Single Post
  #4   Spotlight this post!  
Unread 11-11-2005, 19:58
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: binary in C

Quote:
Originally Posted by Mike Betts
I'm 1200 miles from my K&R right now...

0b11011010

should be equivalent to

0xDA
That's what I thought at first too, but gcc didn't seem to like it, and I found several discussions on some C newsgroups that suggested that binary constants aren't officially part of the language. However, I just checked it and MCC18 seemed to take it...

My advice still applies though: get used to hex, it's what everyone else uses