Jump to content

172.16.30.56  = 10101100.00010000.00011110.00111000

 

The above example is equivalent in both binary and decimal. What's the best method of converting something like this without, preferably without a calculator? It's pretty simple for me, but getting numbers like 172 throws me off mainly because of their size.

 

 

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/
Share on other sites

Link to post
Share on other sites

00000000

76543210

 

2^0 = 1

2^1 = 2

2^2 = 4 

2^   = . 

2^7  = 128 

 

you just add them up if it's a 1 it holds that value if it's a 0 it doesn't 

CPU: Intel 3570 GPUs: Nvidia GTX 660Ti Case: Fractal design Define R4  Storage: 1TB WD Caviar Black & 240GB Hyper X 3k SSD Sound: Custom One Pros Keyboard: Ducky Shine 4 Mouse: Logitech G500

 

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6443903
Share on other sites

Link to post
Share on other sites

x = 0 0 1 1 1 0 0 0

      7 6 5 4 3 2 1 0 - > exponents of powers of two

x = 27*0 + 26*0 + 25*1 + 24*1 + 23*1 + 22*0 + 21*0 + 20*0 = 25 + 24 + 23 = 56

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6443908
Share on other sites

Link to post
Share on other sites

00000000

76543210

 

2^0 = 1

2^1 = 2

2^2 = 4 

2^   = . 

2^7  = 128 

 

you just add them up if it's a 1 it holds that value if it's a 0 it doesn't 

 

 

x = 0 0 1 1 1 0 0 0

      7 6 5 4 3 2 1 0 - > exponents of powers of two

x = 27*0 + 26*0 + 25*1 + 24*1 + 23*1 + 22*0 + 21*0 + 20*0 = 25 + 24 + 23 = 56

Thank you guys for the good methods, helped a lot!

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6443943
Share on other sites

Link to post
Share on other sites

Weights method maybe
128 64 32 16 8  4 2 1 
    1 0   1    0  1  1 0 0 
Basically values you are taking 1, ones you are not 0.
128+32+8+4 

 

Laptop: Acer V3-772G  CPU: i5 4200M GPU: GT 750M SSD: Crucial MX100 256GB
DesktopCPU: R7 1700x GPU: RTX 2080 SSDSamsung 860 Evo 1TB 

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6443948
Share on other sites

Link to post
Share on other sites

Weights method maybe

128 64 32 16 8  4 2 1 

    1 0   1    0  1  1 0 0 

Basically values you are taking 1, ones you are not 0.

128+32+8+4 

 

So you basically just see which combination of numbers add up to the decimal number and put ones under them? The rest are 0's

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6443973
Share on other sites

Link to post
Share on other sites

So you basically just see which combination of numbers add up to the decimal number and put ones under them? The rest are 0's

Pretty much. Just have to start from highest ones. 

Laptop: Acer V3-772G  CPU: i5 4200M GPU: GT 750M SSD: Crucial MX100 256GB
DesktopCPU: R7 1700x GPU: RTX 2080 SSDSamsung 860 Evo 1TB 

Link to comment
https://linustechtips.com/topic/480353-decimal-to-binary-help/#findComment-6444072
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×