Simple binary arithmetic.A one bit number can represent two states zero or one.A two bit number can represent four states: 0, 1, 2, 3 (in binary 00, 01, 10, 11)A three bit number can represent eight states 0, 1, 2, 3, 4, 5, 6, 7 (000, 001, 010, 011, 100, 101, 110, 111)For every extra bit, double the number of states.This is basic stuff, and pretty much essential that you understand
No, if you see decimal 10 in your code, it takes just four bits (1010) to represent in binary.
So 1 in binary is 10?
QuoteSo 1 in binary is 10?No, the great thing about 1 is that is only ever 1.Think about the number 15 in decimalWhat does the 1 represent?It actually represents 10 decimal, and the 5 represents 5 times 1.In binary (not decimal), each digit's position represents an increase not of ten decimal, but two.
Now for 15 the one is 1,
QuoteNow for 15 the one is 1,No, read it again - it is 1 * 10.15 decimal is 1111 binary.
can you PLEASE just explain?
How do you get three ones?
Quote1=12=11? 3=111?That's unary (finger counting), not binary.I've already written out the numbers 0..7 in binary:000001010011100101110111QuoteHow do you get three ones? I didn't - count them again
I'm going to see how high I can count before I give up/get tired!
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16