Re: A86: .db numbers
[Prev][Next][Index][Thread]
Re: A86: .db numbers
Binary is simple if you know powers of 2 off the top of your head. They
go up from right to left (which seems backward), and for every 1 in a
place, you add that corresponding number to a running sum, like this:
2^ 7 6 5 4 3 2 1 0 <-- power of 2
1
2 6 3 1
8 4 2 6 8 4 2 1
Example:
0 0 1 0 1 1 0 1
32 +8+4 + 1 = 45
It's really that simple. For an 8 digit number like above, the range
goes from 0 to 255, and negatives just work the other way, start with
all ones and add up the zeros, but you'll never use that in programming.
-Joseph
Have A
:-)
Nice Day
References: