Am I right on this graph? - Techist - Tech Forum

 Techist - Tech Forum Am I right on this graph?

 05-05-2004, 06:35 PM #1 (permalink) Super Techie   Join Date: Apr 2004 Posts: 268 Am I right on this graph? On this graph, 0 = 0 1 = 1 2 = 10 3 = 11 4 = 100 5 = 101 6 = 110 7 = 111 8 = 1000 9 = 1001 10 = 1010 11 = 1011 12 = 1100 13 = 1101 14 = 1110 15 = 1111 16 = 10000 17 = 10001 18 = 10010 19 = 10011 20 = 10100 Does this mean that the number on the right is what the number on the left look like in binary language? For example the number 20 is 10100 in binary language. If im wrong than tell me what this graph really represents. thank you __________________ __________________
 05-05-2004, 06:47 PM #2 (permalink) Ultra Techie   Join Date: May 2003 Posts: 548 Yes the numbers on the right are binary for the numbers on the left. __________________ __________________
 05-06-2004, 07:59 AM #3 (permalink) Techie Beyond Description     Join Date: Jun 2003 Location: Melbourne, Australia Posts: 14,559 yeah they're right I know < is left and > is right I was a bit confused at which way he meant I think even numbers are 8-bit like 0 = {0000000[0]} 1 = {0000000[1]} 2 = {000000[10]} and so on __________________
Ultra Techie

Join Date: Mar 2004
Posts: 807
Re: Am I right on this graph?

Quote:
 Originally posted by NanoWarrior 0 = 0 1 = 1 2 = 10 3 = 11 4 = 100 5 = 101 6 = 110 7 = 111 Does this mean that the number on the right is what the number on the left look like in binary language? For example the number 20 is 10100 in binary language. If im wrong than tell me what this graph really represents. thank you
Technically speaking, that is incorrect. The author or where ever you got that information from took a very lazy & abbreviated route of explaing that.

It's more commonly shown (when using binary numbers) in groups of 4 digits. So just as they have shown 8 & 9 below, they should have shown it like thus:

0 = 0000
1 = 0001
2 = 0010
3 = 0011
..
8 = 1000
9 = 1001
__________________

 05-06-2004, 05:12 PM #5 (permalink) Wizard Techie   Join Date: Apr 2004 Posts: 3,247 just think of the octet 0000 0000 which is 1 byte. now u just put in the numerators for it like so: 0 0 0 0 0 0 0 0 = 0 128 64 32 16 8 4 2 1 = 255 soooo.... if you want, say the number 5 look at the chart and what bits flipped would give you said number? Well, 1 + 2 is 3... nope... so 1 + 4 = 5.... so now flip bit place 1 and 4 for the following 0000 0101 = 5 another example would be the number 182... by using the above we can find out which numbers to use to come up with that... its best actually to subtract... so starting at 128, look and see if that will go into 182? Yes, it will. so flip the bit representing 128. Now 182 - 128 = 54.... next in line is the it for 64. Well, 64 is bigger than 54 and we can't have negative numbers, so NOPE! leave that bit alone. so next is 32. will 32 go into 54? yes, it will. 54-32 = 22. So flip the bit representing 32. how about 16? will 16 subtract from 22? It will, also so flip that one and now we have 5 left. So far we have 1011 xxxx so now finish with the last 4. will 8 go into 5? nope. so leave that bit. will 4? yes, flip the 4 spot. you now have 1 left. so we know 2 wont go into 1 but 1 will leaving with 0! so the out come is this: 1011 0110 __________________ If you argue with an idiot he will drag you down to his level and beat you with experience. I am not a fast writer. I am not a slow writer. I am a half-fast writer. -Robert Asprin
 05-06-2004, 05:13 PM #6 (permalink) Wizard Techie   Join Date: Apr 2004 Posts: 3,247 this is also how to configure IP addresses and how to subnet using the 2n method to find addresses from a subnet and so on. the math gets a little more complicated. __________________ If you argue with an idiot he will drag you down to his level and beat you with experience. I am not a fast writer. I am not a slow writer. I am a half-fast writer. -Robert Asprin
 05-06-2004, 07:19 PM #7 (permalink) Super Techie   Join Date: Apr 2004 Posts: 268 how does this graph, 0 0 (OFF OFF) = Decimal 0 0 1 (OFF ON) = Decimal 1 1 0 (ON OFF) = Decimal 2 1 1 (ON ON) = Decimal 3 ----------------------------------------------------- relate to this graph? Decimal Binary Representation 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 __________________
Super Techie

Join Date: Apr 2004
Posts: 268

Quote:
 Originally posted by killians45 how about 16? will 16 subtract from 22? It will, also so flip that one and now we have 5 left.
Does'ent 22 - 16 = 6 instead of 5? When you said 182 on top, does this mean you are caculating what the number 182 is represented in the binary language?
__________________

 05-06-2004, 08:50 PM #9 (permalink) Wizard Techie   Join Date: Apr 2004 Posts: 3,247 oh, oops! heh, well my math isn't that great! just remember that as far as a byte you have 8 bits 8 bits = 1byte so, assuming that we have xxxx xxxx 8765 4321 bit /value1 1 = 1 2 = 2 3 = 4 4 = 8 5 = 16 6 = 32 7 = 64 8 = 128 so if you have the binary of 0001 0110 you have flipped the bit in the 2, 3 and 5th position... or as you also asked, these are turned 'on'. looking at the values, the 2nd position has a value of 2, the 3rd position has a value of 4, and the 5th position has a value of 16. So the decimal equivilant of 0001 0110 = 22 You can also work backwards from this. If you have number 25, then simple math will get the value. bit places 8, 7, and 6 are to large to fit into that value. So those will all be zeros. However, the 5th bit has a value of 16. That is less than 25, so we flip it, or turn it 'on'. That leaves 9. Next in line is the number 4th bit value of 8. That is also less than nine. So the 4th bit is on/flipped. Now we have 1 left. 3rd and 2nd bit are to large and we CANT have a negative number here. So that leaves the 1st bit value of 1. This zeros it out. So flip it/turn it on. So now we have the following bits flipped/on.... bit 5, 4 and 1... or values 16, 8, and 1 (16+8+1=25). So lets goto the xxxx xxxx and fill in the x's. anything not flipped/turned on gets a zero and anything flipped/on gets a one, like so: 0001 1001 bytes = 25 dec __________________ If you argue with an idiot he will drag you down to his level and beat you with experience. I am not a fast writer. I am not a slow writer. I am a half-fast writer. -Robert Asprin
 05-06-2004, 09:52 PM #10 (permalink) Super Techie   Join Date: Apr 2004 Posts: 268 Thanks for that great info, your info is Greatly presented by you. However I have three more questions 1. When you say 25....are you calculating what the actual number 25 is represented in binary language? Or the decimal? 2. How would I calculate what the letter t or a is in binary language? In other words how would I find out what the letter t or number 3 is represented in binary language? Every character on the keyboard is a byte in size I know. 3. Since the anwser was actually 6 instead of five....the 5 answer would look more like this 1011 0100, but if it was a six like it should of been it would of looked like this 1011 0110, right? thanks __________________ __________________

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

#### Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

#### Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities