Can convert negatives and fractional parts too.
Number | As a standard number (default): | 101.01 |
0001 | Leading/trailing zeros, to match hexadecimal: | 0101.0100 |
signed 8-bit | twos-complement signed 8-bit | 11111111 |
signed 16-bit | twos-complement signed 16-bit | (16 bits) |
signed 32-bit | twos-complement signed 32-bit | (32 bits) |
Example of a Binary Number |
Binary | |
0 | We start at 0 |
1 | Then 1 |
??? | But then there is no symbol for 2 .. what do we do? |
Well how do we count in Decimal? | |||
0 | Start at 0 | ||
.. | Count 1,2,3,4,5,6,7,8, and then.. | ||
9 | This is the last digit in Decimal | ||
10 | So we start back at 0 again, but add 1 on the left |
Binary | ||
0 | Start at 0 | |
• | 1 | Then 1 |
•• | 10 | Now start back at 0 again, but add 1 on the left |
••• | 11 | 1 more |
•••• | ??? | But NOW what .. ? |
What happens in Decimal? | |||
99 | When we run out of digits, we .. | ||
100 | .. start back at 0 again, but add 1 on the left |
Binary | ||
0 | Start at 0 | |
• | 1 | Then 1 |
•• | 10 | Start back at 0 again, but add 1 on the left |
••• | 11 | |
•••• | 100 | start back at 0 again, and add one to the number on the left.. .. but that number is already at 1 so it also goes back to 0 .. .. and 1 is added to the next position on the left |
••••• | 101 | |
•••••• | 110 | |
••••••• | 111 | |
•••••••• | 1000 | Start back at 0 again (for all 3 digits), add 1 on the left |
••••••••• | 1001 | And so on! |
Decimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Binary: | 0 | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
Decimal: | 20 | 25 | 30 | 40 | 50 | 100 | 200 | 500 |
---|---|---|---|---|---|---|---|---|
Binary: | 10100 | 11001 | 11110 | 101000 | 110010 | 1100100 | 11001000 | 111110100 |
'Binary is as easy as 1, 10, 11.'
10.1 | |
The number to the left of the point is a whole number (such as 10) | |
As we move further left, every number place gets 2 times bigger. | |
The first digit on the right means halves (1/2). | |
As we move further right, every number place gets 2 times smaller (half as big). |
When you say a binary number, pronounce each digit (example, the binary number '101' is spoken as 'one zero one', or sometimes 'one-oh-one'). This way people don't get confused with the decimal number. |
'There are 10 kinds of people in the world,
those who understand binary numbers, and those who don't.'