Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Languages Question
Message
From
03/05/2003 00:09:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00784116
Message ID:
00784496
Views:
27
>Hi Martin,
>
>I took a look at the article but the one on communications is way over my head. What I was talking about is the binary system where with eight bits, I have a combination of 255 possibilities. For example:
>
>00000000 = 0
>10000000 = 1
>01000000 = 2
>11000000 = 3
>00100000 = 4
>10100000 = 5
>01100000 = 6
>11100000 = 7
>....

The ususal notation is just the opposite:

00000000 = 0
00000001 = 1
00000010 = 2

etc.

I have never seen it done the way you put it.

>Notice how each position doubles in value as you move from left to right. The positional values are as follows

Also in the usual notation, the place value increases from right to left - not the other way around.

>1 2 4 8 16 32 64 128 = 255
>
>The number 37 would be
>
>10100100 or 1 - 4 - - 32 - -
>
>Can you figure how to express the number 53?

The shortcut method which is often used here is to use repeated division by 2, with remainders:
53
26 1
13 0
 6 1
 3 0
 1 1
 0 1
The remainders are on the right. Then, the remainders are read from bottom to top, in this case, 110101. You may want to fill out with zeroes, if you want 8 bits for instance: 00110101.

In case of doubts, results can be double-checked with the scientific calculator that comes included with Windows (open the regular calculator, and give the commands "View | Scientific").

Converting from decimal to binary, in the Calculator, just requires that you make sure the calculator is in decimal, type in a number, and click on "binary".

While we are accustomed to a decimal (base 10) system, any integer >= 2 can be used as the base for the number system, in theory. Base 10 doesn't offer any intrinsic advantages over any other base - it is just that we are used to it.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform