Binary question

Status
Not open for further replies.
Can you explain again what it is exactly you are trying to accomplish or understand?
Sometimes topics (especially binary) can be black and white and someone just needs it explained a particular way... then BAM, they get it
 
harnar123,

Maybe you can make some sense with this:

00000001 (binary) = 1 decimal
00000010 (binary) = 2 decimal

so

00000011 (binary) = 3 decimal

See what happened ? A "1" in the ones bit place (farthest one on the right in a row of bits) equals the decimal value of 1. A "1" in the second from the right spot equals the decimal value of 2. Putting them together in my third example makes decimal value 3, since the decimal values of 1 and 2 equal 3.

A zero bit is still a bit. It is an "off" signal, and a binary "1" is an "on" signal.

The thing that may be confusing you, harnar123, is that the 32 bits are filled with 1's and 0's, to yield a 32-bit IP address.

Example:

An IP address of 192.168.1.45 would look like this in binary:

11000000.10101000.00000001.00011101

This totals 32 bits, but not all of them have a face value, only a place value. So there are 32 places occupied, but only certain ones have 1's.

So in the left-most 8 bits (the 11000000 example), this would result in decimal value 192 because the 128 face value spot (the one all the way on the left of that series) is occupied by a 1, making that equal a decimal value of 128. The next one is the face value 64 spot. It is occupied by a 1, so the decimal value of 64 can be added to the 128 for the first bit to equal a decimal value of 198. The other three "octets" (groups of 8 bits) follow the same reasoning.

I hope this may have helped some. :)

EDIT:

Looking from left in an octet, the values are :

128 64 32 16 8 4 2 1
1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 = 192

I still dont get it.
24/2=0
12/2=0
6/2=0
3=1
1=1
that equals 00011 so wtf?

Simply put, a 1 represents an on message. So a 1 in 00000001 (binary) means 1 decimal.

The rightmost bit in "00000010" is zero, but the second from the right spot is a one. BUT, it is in the bit position with the "weight" of 2 in decimal. What this means is if there is a 1 (on message) in the second from the right position, give it a decimal value of 2. The "0" all the way to the right in the series "000000010" is a decimal value of zero, since there isn't a "1" or "on" value. You don't count it.

Thus:

00000001 (binary) = 1 (decimal) The "1" occupies the "one's spot"
00000010 (binary) = 2 (decimal) The "1" occupies the "two's spot"

So:

Add these two examples:

00000001 (1)
+ 00000010 (2)
________
00000011 (3)

Other examples:

00000100 (binary) equals decimal value 4, because the number 4 has been "turned on" by an "on", or more accurately, a "1". Hope I haven't confused you more, harner123. Good luck !
 
ok, I get how 192=bits, but how does 24=8bits ? do you just add enough zeros to make it happen because an ip address must have 32 bits?
 
"however, you can't use the IP address in which all host bits are 1's because ot
s the broadcast address for that networlk" um what?

The IP address 255.255.255.255 is a reserved address, used for broadcasting. So when a computer needs to speak to other computers in a network, it will send out a series of 1's that looks like this when written out:

11111111.11111111.11111111.11111111

This IP address ^^^^ is a reserved one. So isn't the address 0.0.0.0

00000000.00000000.00000000.00000000

You can't assign a computer an IP adress of 255.255.255.255 or 0.0.0.0 as these are reserved for computers to communicate to each other on their on "channels" for lack of a better word to describe it.


A couple links:

Kingsley-Hughes.Com | Quick Binary Tutorial

Basics of Binary Numbers

Binary Numbers - An intro to binary numbers & conversion formulas
 
I aprreciate your help man, I am just wondering how 24 = 8 bits? do you just add zeros to make it 8 bits because each ip address must be 32 bits long? Hey do you know much about subnetting because I am also lost on that.
 
ok, I get how 192=bits, but how does 24=8bits ? do you just add enough zeros to make it happen because an ip address must have 32 bits?

An octet must have 8 bits, and an IP address must have 32 (or 4 groups of octets, or 8-bit groups.)

00011000 binary = 0 (128's) + 0 (64's) + 0 (32's) + 1(16's) + 1 (8's) + 0 (4's) + 0 (2's) + 0 (1's)

So, 00011000 binary = 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 (binary) = 24 decimal. "24" is the value in decimal, in the binary octet "00011000". But there must be 32 bits in an IP address.

So the IP address 192.168.1.24 would look like:

11000000.10101000.00000001.00011000

You are starting to get it ! Yes, you add zeros in to make up the 8-bit octet. And remember, you need 4 octets to make a 32-bit IP address. :D Keep at it, you are getting it I think.

I aprreciate your help man, I am just wondering how 24 = 8 bits? do you just add zeros to make it 8 bits because each ip address must be 32 bits long? Hey do you know much about subnetting because I am also lost on that.

Subnetting means to take a network, and break it down to more manageable smaller networks, or "subnets". Example:

A "Class C" address of 192.168.1.x (the "x" here represents a number between 1 and 254). *NOTE : I will explain the range of 1 through 254 in a moment...

Take the address above, 192.168.1.x You can assign a group of computers an address between 192.168.1.1 and 192.168.1.254, and anywhere in between, such as 192.168.1.128. To "subnet" it means to give each of your 4 computers in my example an address an address that is in that range. A "subnet mask" means something a little more advanced, but I will let you digest this part for now, I don't want you to get too confused right away.

Simply put, a subnet mask is a special series of 1's and 0's, when combined with an IP address, tells other computers on a newtork or across the Internet what kind of network that a particular computer belongs to. This is how routers, gateways, etc. pass IP addresses back and forth. They need to know how the network is designed to pass information on.

I will help you out all I can, and I will check back to see how you are doing. ;)
Keep up the good work !

A "Class C" address of 192.168.1.x (the "x" here represents a number between 1 and 254). *NOTE : I will explain the range of 1 through 254 in a moment...

*Note: You can't assign an address of 192.168.1.0 or 192.168.1.255 to a class C subnet because they are reserved for computers to broadcast. And routers or other devices such as a gateway will usually be set for an IP address containing a zero in the last octet, for example :

192.168.1.0 is usually a router, or it could be 192.168.0.0. Point is, the "0" in the last octet is usually seen by people and computers as a router, or a gateway. If a computer on a network needed to broadcast something, such as an ARP broadcast, it would send packets (groups of data that a computer sends out and receives) with the destination IP address of 192.168.1.255, which tells all the computers on that network that it is broadcasting to all the computers on that network, as if to say "listen up all you computers, I got somethin' to say !" That's why it is a reserved address, and that is why you can't use it. It is to remain unused except by computers that broadcast from time to time.
 
sweet ok, I am starting to get it.

1. For the Class C network address 192.168.10.0, which of the following subnet masks delivers 30 subnets?
a. 255.255.255.252
b. 255.255.255.248
c. 255.255.255.240
d. 255.255.255.224
2. For the Class C network with the subnet mask described in the above question, how many hosts are available on each resulting subnet?
a. 2 b. 6 c. 14 d. 30
3. For the Class C network 192.168.220.0, what subnet mask supports up to 14 subnets?
a. 255.255.255.252
b. 255.255.255.248
c. 255.255.255.240
d. 255.255.255.224
4. For the Class C network with the subnet mask described in the last question, how many hosts are available per subnet?
a. 2 b. 6. c. 14 d. 30

now my assignment asks that, but I can't wrap my head around it. I don't care if you answer that specificly (because then I could just cheat) but could you explain maybe? and once again really appreciated.
 
I'd rather not come out with straight answers, because I don't want to ruin your homework, BUT, I will say that you can roam around the net and Google like I have done for those kind of specifics. Besides I have to go offline for now. But there are some cool tutorials on the net that will help with the answers you need. If I can find some subnetting links that will help you with this I will post them. I just don't want to be too specific because then it would be kinda like doing your work for ya. You understand, right ? ;) Keep it up harner, you are doing great :D
 
Status
Not open for further replies.
Back
Top Bottom