last day (62 days later) » 

10:17 AM
@John Rennie Hii
My Q is about conversion of number systems
 
@S.M.T Aha, found it :-)
 
@JohnRennie Hii
@JohnRennie Thank god.
I have written here conversion of a number into each number system.
 
OK ... ?
 
Ok. Now , in my textbook . It states this.
Ok so far sir ?
 
Yes, that looks fine.
 
10:22 AM
So , as we can notice . We used the base 2 for conversion of binary to decimal.
Now , if we have to convert this binary number into hexa decimal or octa ?
Wouldn’t we use the same base ?
But the answer will always be 9. Then , how is that correct ?
 
If you are converting to another base there are two approaches you can use:
1. convert directly into that other base (hard)
2. convert to decimal, then convert the decimal to the other base (easy)
 
Ok.
 
I generally use option 2.
 
@JohnRennie So , I have to convert decimal to hexa & octal now ?
 
Of course the answer is the same whatever way you use, but I find converting to decimal first is easier.
That's what I would do.
 
10:25 AM
In my textbook , there is only 1 method I.e Dabble method.
Is that what you’re talking about ?
 
Though in fact there is a quick way to convert binary to any base that is a power of 2.
 
@JohnRennie ok. What is it then ? I’m having lots of difficulty with textbook.
 
In binary one bit can hold the numbers zero to one. Yes?
 
@JohnRennie K
 
And two bits can hold the numbers zero to three i.e. 00 is zero, 01 is one, 10 is two and 11 is three. Yes?
 
10:28 AM
Ok.
 
So suppose you have a number 1010100 and you want to convert it to base 4 where each digit can be from zero to three. Then each digit in base 4 corresponds to two bits in binary. So you take your number 1010100 and divide it into pairs of digits ( 1)(01)(01)(00) like that.
Then each pair is one digit in base 4, so the number is 1110 in base four.
OK so far?
 
@JohnRennie Did not get this step
 
I need to drop out for ten minutes to do something ...
 
@JohnRennie Np sir. Just one thing. Did you mean what I wrote down below ?
 
@S.M.T I'm not sure what you are doing there ...
 
10:46 AM
@JohnRennie Hii sir.
@JohnRennie Ok. I didn’t get that part
@JohnRennie This one.
 
Give me a few minutes, I'm just doing something ...
 
@JohnRennie Sure sir.
 
11:01 AM
@JohnRennie Ping me when done sir.
 

  last day (62 days later) »