Help With Decimal to Binary conversion

Reply

Join Date: Apr 2005
Posts: 11
Reputation: hammondlj is an unknown quantity at this point 
Solved Threads: 0
hammondlj hammondlj is offline Offline
Newbie Poster

Help With Decimal to Binary conversion

 
0
  #1
Oct 26th, 2005
One of my course assignments it to be able to convert between decimal and binary.
One of the questions is convert 42.25 from Decimal to Binary

I get the answer 10101010 but i'm not sure if im right as i checked it on the internet and got the answer 101010.

for some reason i have 2 extra digits can anyone point me in the right direction.

any help would be much appreciated

Thanks Liam
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Help With Decimal to Binary conversion

 
0
  #2
Feb 4th, 2006
First of all, it's rounded to 42.

think about the values of binary:

32  16  8  4  2  1 
1   0   1  0  1  0

That should kind of show you what's going on. If you've got any questions, let me know. For your reference, 10101010 is equal to 170.
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 675
Reputation: MartyMcFly is an unknown quantity at this point 
Solved Threads: 17
MartyMcFly MartyMcFly is offline Offline
Practically a Master Poster

Re: Help With Decimal to Binary conversion

 
0
  #3
Feb 8th, 2006
If you use Windows calculator, in Scientific mode, it allows you to convert decimal (dec) to binary (bin) via the check boxes. Useful to check you answers.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 1
Reputation: maunty05 is an unknown quantity at this point 
Solved Threads: 0
maunty05 maunty05 is offline Offline
Newbie Poster

Re: Help With Decimal to Binary conversion

 
0
  #4
Mar 1st, 2006
Originally Posted by hammondlj
One of my course assignments it to be able to convert between decimal and binary.
One of the questions is convert 42.25 from Decimal to Binary

I get the answer 10101010 but i'm not sure if im right as i checked it on the internet and got the answer 101010.

for some reason i have 2 extra digits can anyone point me in the right direction.

any help would be much appreciated

Thanks Liam
Hi Liam
I m maunty .I have a formula for converting any decimal number to binary . You can use this formula.that is 8421 if you have no 15 the use of formula

[B]
8+4+2+1=15 in this formula i use all the numbers of formula. the binary number is 1 1 1 1,because
8 4 2 1
1 1 1 1
other example
9
in no 8421 the combination of 9 is 8+1=9
the binary would be 1 0 0 1
84 2 1
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 4
Reputation: sandip.juit is an unknown quantity at this point 
Solved Threads: 0
sandip.juit sandip.juit is offline Offline
Newbie Poster

Re: Help With Decimal to Binary conversion

 
0
  #5
Apr 6th, 2006
hai friend,
the way to convert a decimal to bianary is:
convert the integral part to binary: binary of 42=101010
method of converting the decimal part:
multiply the decimal by 2 & take the integral part
.25*2=.5 0
.5*2=1.00 1
process terminates when decimal part turns to 0
ans=101010.01
if you are not satisfy with answer
mail me papu_sandip@rediffmail.com
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: chandra1984 is an unknown quantity at this point 
Solved Threads: 0
chandra1984 chandra1984 is offline Offline
Newbie Poster

Re: Help With Decimal to Binary conversion

 
0
  #6
Aug 26th, 2009
Converting decimal to binary

To convert decimal to binary is also very simple, you simply divide the decimal value by 2 and then write down the remainder, repeat this process until you cannot divide by 2 anymore, for example let's take the decimal value 157:
157 ÷ 2 = 78 with a remainder of 1
78 ÷ 2 = 39 with a remainder of 0
39 ÷ 2 = 19 with a remainder of 1
19 ÷ 2 = 9 with a remainder of 1
9 ÷ 2 = 4 with a remainder of 1
4 ÷ 2 = 2 with a remainder of 0
2 ÷ 2 = 1 with a remainder of 0
1 ÷ 2 = 0 with a remainder of 1

Next write down the value of the remainders from bottom to top (in other words write down the bottom remainder first and work your way up the list) which gives:

10011101 = 157
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: chandra1984 is an unknown quantity at this point 
Solved Threads: 0
chandra1984 chandra1984 is offline Offline
Newbie Poster

Re: Help With Decimal to Binary conversion

 
0
  #7
Aug 26th, 2009
Convert Binary to Decimal
Binary 1 1 0 0 1 0 1 0
Formula 1X128 1X64 0X16 0X16 1X8 0X4 1X2 0X0
Decimal 128 64 0 0 8 0 2 0

Decimal No- is 128+64+0+0+8+0+2+0 = 202
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,825
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 297
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Roasting Maven

Re: Help With Decimal to Binary conversion

 
0
  #8
Aug 27th, 2009
I think the Original poster kinda figured out the problem in the 4 years since he posted this question.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: chandra1984 is an unknown quantity at this point 
Solved Threads: 0
chandra1984 chandra1984 is offline Offline
Newbie Poster

Re: Help With Decimal to Binary conversion

 
0
  #9
Aug 27th, 2009
Originally Posted by hammondlj View Post
One of my course assignments it to be able to convert between decimal and binary.
One of the questions is convert 42.25 from Decimal to Binary

I get the answer 10101010 but i'm not sure if im right as i checked it on the internet and got the answer 101010.

for some reason i have 2 extra digits can anyone point me in the right direction.

any help would be much appreciated

Thanks Liam
decimal no-42.25 of Binary is 101010.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC