Re: Integers
| From: | Stephen | Date: | Thu, 01 Jul 2010 02:12:45 +0000 |
| Subject: | Re: Integers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306586@lists.php.net to get a copy of this message | ||
On 10-06-30 10:02 PM, David McGlone wrote:
Hi again I'm trying to learn about octal numbers and I don't understand this: Binary: 001000101111 breakdown: (001)= 1 (000)= 0 (101)=5 (111)=7 I know it's similar to unix permissions, but I'm not understanding where for example: 111 = 7 In base 10, which you use every day, we go0 1 2 3 4 5 6 7 8 9 10 The number 10 is the number of distinct digits we use. In binary we only us two, 0 and 1, so 10 is 2 decimal So we go 0 = 0 decimal 1 = 1 << important 10 = 2 << important 11 = 3 100 = 4 << important 101 = 5 110 = 6 111 = 7 So binary 111 is 4 + 2 + 1 = 7 Stephen