User Tools

Site Tools


haas:spring2015:cprog:projects:eocehints

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
haas:spring2015:cprog:projects:eocehints [2015/04/19 20:42] – [0x1: Octal] wedgehaas:spring2015:cprog:projects:eocehints [2015/04/19 20:44] (current) – [0x1: more octal] wedge
Line 53: Line 53:
 As you can see, even if you had a 0640, the leading zero would be dropped in the conversion, because **atoi(3)** is apparently only cognizant of decimal values (and good, because that would have taken the fun out of this particular problem... you stand to learn some important things by working through this process). As you can see, even if you had a 0640, the leading zero would be dropped in the conversion, because **atoi(3)** is apparently only cognizant of decimal values (and good, because that would have taken the fun out of this particular problem... you stand to learn some important things by working through this process).
  
-And also, do you see that regardless of displaying it in octal, decimal, or hex, it is the same value? They're all being sourced from an integer variable called result... a regular old int... so it ultimately is up to how we instruct the computer to interpret it... after all, EVERYTHING is in binary, even if we are thinking through the problem exclusively in decimal.+And also, do you see that regardless of displaying it in octal, decimal, or hex, it is the same value? They're all being sourced from an integer variable called result... a regular old int... so it ultimately is up to how we instruct the computer to interpret it... after all, EVERYTHING is in binary, even if we are thinking through the problem exclusively in a different base.
  
 > Why doesn't adding the leading zero make it octal? > Why doesn't adding the leading zero make it octal?
haas/spring2015/cprog/projects/eocehints.1429476167.txt.gz · Last modified: 2015/04/19 20:42 by wedge