*crys* Binary
I'm reading a book on asm, and it told me not to continue if I don't understand binary. I don't understand binary.
Can some complain to me in more depth?
I understand the 10110 is equal to :
1 x 2^4 = 16
0 x 2^3 = 0
1 x 2^2 = 4
1 x 2^1 = 2
0 x 2^0 = 0
^ = to the power of.
What defines those values in the center, if all we input it 10110?
If you mean what defines 101011 or whatever, that's what the BIOS/CPU does, if I'm not mistaken.
I'm not 100% if that is what you are asking, please refine. If you are talking about Base-2, it's because it's the easiest representation of On-Off, hence that's why we use Base-2.
Okay, I understand now. Thanks Arun.
The easiest way to understand binary is like this: the very rightmost number is worth 1, and then to the left of that, you multiply 1 by 2, that place is worth 2, etc
11 = 3
10 = 2
01 = -1 ( I think)
so think of it like this, take 1, and every number to the left of it, you multiply it by 2 every time, so you go 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc. Every number to the right of the one you're looking at is ALWAYS worth 1 value less than what you're looking at. I know I'm bad at explaining this, but it's how I understand it, so if you're looking at 10000, which is equal to 32, then the "0000" is 1+2+4+8+16, even though 0 represents off and 1 represents on.
I just realized this thread is a month old, but my post is educational, so gtfo and don't call me on a necro.