Advanced Minds

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
c++ long int binary number (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: c++ long int binary number
#8261
Howard (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
There is no difference in the value STORED when you write any if the following: int hexInt = 0x08; int octInt = 08; int decInt = 8; You would have done better to pick 7 or less for the example. 0x08 == 010 there is no 8 in Octal. D'OH!  
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8262
Mike Wahler (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
There is no difference in the value STORED when you write any if the following: int hexInt = 0x08; int octInt = 08; int decInt = 8; You would have done better to pick 7 or less for the example. 0x08 == 010 there is no 8 in Octal. D'OH!   Should be: D'Zero! -Mike
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8263
Bern (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
hex numbers are specified by 0x prefix
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8264
Howard (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
Bern < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it wrote in message why doesn;t C/c++ support binary numbers? I take it you mean binary integer constants ?  (All numbers are stored as binary.) Well, we have the hex integer constant, which is easier for most people to read.  Compare (makng up my own format for binary): 0x8014 versus 0_1000000000010100 It's awfully easy to mis-count the number of zeros there, isn't it?  When I write such binary-format numbers on paper, I end up breaking them into groups, like this: 1000 0000 0001 0100 ..which is exactly the hexadecimal grouping!  But it's just as easy to say 0x8014, because I've gotten used to recognizing the bit patterns for hex numbers in my brain, and not having to write them down. But those are just MY reasons that I don't think it's needed.  You'd have to ask the standards committee why THEY chose not to use them. -Howard
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8265
Bern (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
ask the standards committee why THEY chose not to use them. -Howard
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8266
Carl Muller (Visitor)
Click here to see the profile of this user
Birthdate:
c++ long int binary number  
You would have done better to pick 7 or less for the example.   0x08 == 010 there is no 8 in Octal. I think now is the appropriate time to remind everyone that 31 OCT == 25 DEC which is why programmers get confused about the difference between halloween and christmas.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
wymiana linkow brak autoryzacji brak autoryzacji 905 nieautoryzowano
ivory flower knob traveloctiy funny news ap diving side liner emotional diving