Why converted values from Decimal to binary isn't the same?

48 Views Asked by At

the professor told us today about binary and decimal and how to convert them , and give us example of a decimal number (13) and we converted it to binary which is (1101) .

Now when I'm trying to do the same way with number (19) I found the binary is (10011) and to check it up I try to convert binary back to decimal , so when I try to do that it gives me a wrong number (not 19) so what's wrong ? I double check it and I even used an online tool to see if I got the binary wrong .

any help please , my brain on fire :D

Thanks in advance .

1

There are 1 best solutions below

1
On BEST ANSWER

It does give 19. $10011$ in base 2 is equal to $1(2^0)+1(2^1)+0(2^2)+0(2^3)+1(2^4)= 1(2^0)+1(2^1)+1(2^4)=1(1)+1(2)+1(16)=1+2+16=19$.