cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
830
Views
0
Helpful
3
Replies

binary to decimal convrsion

amechi_xl
Level 1
Level 1
3 Replies 3

paul.matthews
Level 5
Level 5

What do you need to know?

How is the decimal number 452 converted into binary number using successive division by 2 =111000100.

2. How is the binary number 11101000111 converted into a decimal number using powers of 2 =1863

The second one is easier to start with

Righmost bit is one - set so add one. Next bit, multiply 1 by two, Value of bit is two, bit is set, add to the total (now three) Double the bit value for the next bit - four, the bit is set , so add four (seven) double the bit value (8), unset so add nothing (seven), next bit double to 16 - unset (seven) next bit 32 unset (seven) an carry on - I have got bored of that. I am sure you can carry on...

Converting decimal to binary, I do the reverse. In the case of 452 I look at the powers of two until one is more than half the number - 1,2,4,8,16,32,64,128,256,512 etc. In this case we have a 256, but not 512.

Thats is our first 1. Take 256 from 452 and we get 196. Next is 128 - Yup we have a number bigger than that, so next is a 1 - 11 take 128 and we get 68 - Yup 64 fits - 111 and we are left with 4. That means 32, 16 and 8 don't go so we get three 0s 111000 next up is 4, and 4 fits so we add a 1 for the 4 1110001 obviosly 2&1 don't go so we add two 0s - 111000100 Done.

Review Cisco Networking products for a $25 gift card