Go to Post Ah, drills & motors. Brings back old memories of FIRST - nparikh [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 11-11-2005, 18:28
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 sciguy125
Does anyone know if it's possible to use binary numbers in C? Of course, it's just to make it easier to read the source. I'm doing some bitwise operations and 218 or 0xDA just isn't as meaningful as 11011010.
I don't believe the C standards have any support for entering numbers in binary. Just use hex - it'll be awkward for a bit but after a while you'll be able to read hex and "see" the binary without any trouble. Binary becomes cumbersome when you start talking about 16 and 32 bit (and larger) numbers too.

Most people who write a lot of software will tell you that 0xDA is much easier to read than 11011010.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary in Rose is Rose MisterX Chit-Chat 8 11-02-2004 18:26
pic: Dawning of a New Age. CD47-Bot Extra Discussion 90 31-07-2003 22:04
Fun with sensors Team852 Technical Discussion 7 06-01-2003 00:07
A couple of noodle scratchers Cheese Head Programming 11 07-12-2002 09:59
delphi: binary sort archiver 2000 0 24-06-2002 00:30


All times are GMT -5. The time now is 04:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi