azarbock said:I am confused about how the binary system works - I was working through some problems and got stuck on these two:
What is the base ten value for the binary number 01101011? and What is the binary value for the base ten number 193?
Any help/explination would be appreciated!
dragon2309 said:here is your binary index...
128 -- 64 -- 32 -- 16 -- 8 -- 4 -- 2 -- 1
here is a binary number
0 ----- 0 --- 1 --- 0 --- 0 --- 0 -- 1 -- 1 (or without the spaces its 00100011, all binary numbers have 8 binary digits to them, one correpsonding to each bvalue of the binary index shown above)
That binary number 00100011 actually equals 35 due to there being 1 x 32, 1 x 2 and 1 x 1...... 32 + 2 + 1 = 35
Get it yet......
dragon2309 said:this is the binary index, its standard everywhere, it never changes.....
128 - 64 - 32 - 16 - 8 - 4 - 2 - 1
when a binary number is generated or typed in, it is always 8 bits long each bit is either a 1 or a 0, either the 1 or the 0 is assigned to each value in the index. If there is a 1 on a value then it is counted, if there is a 0 on a value in the index, then it is NOT counted.... get it
so this, 00000000, will equal 0 because it is NOT counting any value from the index.....
00000001 will equal 1 because there is a 1 in the 1 value of the index
00000110 will equal 6 because there is 1 under the 4 in the index and one under the 2 in the index.... 4+2=6
10010110 - well, work it out, theres 1x128, 1x16, 1x4 and 1x2..... 128+16+4+2= 150
So, as you can see, there is going to be a limit to how big the resulting number can be..... 255 is the upper limit, this iscreated by 11111111, that being 1x128 1x64 1x32 1x16 1x8 1x4 1x2 1x1..... 128+64+32+16+8+4+2+1= 255
Understanding yet.......
dragon2309
PS - binary digits = bits, there are 8 bits in every number, so every number is a byte, just thought i'd tell you that, 00110100 is a byte as it has 8 bits in it.....
azarbock said:Alright - thank you again for all the help. It makes sense to me, there was one last question I was reviewing and I'm not sure if I did it right....
"Write your first name in all UPPER CASE letters, then write the base ten ASCII codes for each under each letter, then translate the base ten numbers into base 2 (binary) numbers. Do not use a table, but calculate the binary digits. (Hint: the ASCII code for ‘A’ is 65, the code for ‘B’ is 66, etc.)"
My result:
A M Y
(65) (78) (90)
That look about right?