Binary
to decimal
Decimal
numbers are to base 10. Let us count
to 10. 1, 2, 3..... up to 9 and there is no single
digit for 10 and that's why we say decimal system is base 10.
Binary
numbers are to base 2. Let us count
to 2. 1,... up to 1 (and that's it) and there is no
single digit for 2 and hence binary system is base 2. In fact decimal-2 is binary-10 (this is read
'binary one zero' and not 'ten'), that is there is two digits for decimal-2
in binary form.
Conversion
is easy. Let's look through an example and you should
figure it out.
Let
us convert binary-10001011 to decimal.
Binary
1 0 0 0
1 0
1 1
Decimal
·
It seems if all digits of an 8-bit binary
are zero then we get decimal 0 for it. What is the equivalent decimal for an -bit binary
if all digits are 1? The answer is 255. Can
you work it out? How many binary bits do we need to present decimal
256?
·
How would you convert 139 back to its binary
form?
·
Do we have other numbering systems, say for
example to base 8?
·
If we do have to base 8, what would it be
called?
·
If we do have to base 8, how would it work?