Binary Maths

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Oh, and if you feel like taking it a step further, when I said earlier that regular mathematical principles still apply, think of how we used to do addition. That still applies here.

For subtraction, we represent the subtrahend by a negative number, then regular addition applies (just like in "regular" maths).
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Not at all... Each "slot" is referred to as a "bit". Therefore you can get huge numbers. In cryptography, we regularly work with keys as long as 1024 bits. That's a HUGE number (but luckily computers like dealing with large numbers).

When there are 4 bits, we refer to the number as a "nybble", when there are 8 bits, we refer to the number as a "byte" or an "octet" (as you'll learn in CCNA). Those are just length binary numbers, because computers generally work in bytes (so it makes sense to represent numbers according to the same standard).

But a binary number can have as many bits as you choose, just as a very large base-10 number can have an infinite number of places:

In decimal, 123 is the same as 0123 which is the same as 00123. We just drop the leading 0's because they're superfluous.

Thus, in binary, 101 is the same as 0101 whichis the same as 00101, etc...

This starting to make all allot of sense now. This is where bits/Bytes/KB and so forth comes in, it's all based on binary which is the actual "language" used to transfer data so to speak?

So a data file of 1Byte (8bits) would tell a PC do to something as an example 00101101 Broken up from a bigger binary code of lets say being in total 3 MBs big.

This is bloody interresting :)

Damn I'm going to love learning about this tbh :p
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
This starting to make all allot of sense now. This is where bits/Bytes/KB and so forth comes in, it's all based on binary which is the actual "language" used to transfer data so to speak?

So a data file of 1Byte (8bits) would tell a PC do to something as an example 00101101 Broken up from a bigger binary code of lets say being in total 3 MBs big.

This is bloody interresting :)

Damn I'm going to love learning about this tbh :p

Yup :)

It's all very interesting, with so many awesome applications; cryptography, telecommunications, programming... Even evolutionary algorithms like genetic algorithms :)
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Yup :)

It's all very interesting, with so many awesome applications; cryptography, telecommunications, programming... Even evolutionary algorithms like genetic algorithms :)

You should become a teacher TBH :D

I'm not the brightest student and you explained it in such a way even I can understand it :p
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
You should become a teacher TBH :D

I'm not the brightest student and you explained it in such a way even I can understand it :p

Lol... I'm glad... But the engineering world needs my brilliance :cool:

:rolleyes:
 

Lino

I am back
Joined
Jan 26, 2008
Messages
13,790
Well done!

I must admit it would have been nice if it was explained to me originally like that. Took myself 3 days to figure it out.
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
hehe

Binary maths is pretty easy since I got the understanding from you guys today :) I highly appreciate it. I can now do the dotted decimals of the binary string and binary string from dotted decimals :D I feel so smart now :p

I am however a little stuck on Subnetting/Subnets

I can't clearly grasp the concept, I have the graph now and that part is pretty easy to recreate. I also understand where it says 10.0.0.0/12 Network (11111111 11110000 00000000 00000000) First 12 bits = 1 being the same as 255.240.0.0 Also working this back to binary = first 12 bits = 1

I however can not see how they make this out to be a Class A :confused: Does it have to do with the IP range being between 250.0.0.0 and 250.250.0.0? Since 255.240.0.0 is not 250.250.0.0 just 10 short?
 

Ludjer

Well-Known Member
Joined
Jul 12, 2005
Messages
400
busy doing ccna right now its part of my BENG course at tuks and the binary calculations you do is pretty straight forward and on the online material they show you exactly what you need to know so i would not fear
Class A Network -- binary address start with 0, therefore the decimal number can be anywhere from 1 to 126. The first 8 bits (the first octet) identify the network and the remaining 24 bits indicate the host within the network. An example of a Class A IP address is 102.168.212.226, where "102" identifies the network and "168.212.226" identifies the host on that network.
http://en.wikipedia.org/wiki/Classful_network also basically explains it
 
Last edited:

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
hehe

Binary maths is pretty easy since I got the understanding from you guys today :) I highly appreciate it. I can now do the dotted decimals of the binary string and binary string from dotted decimals :D I feel so smart now :p

I am however a little stuck on Subnetting/Subnets

I can't clearly grasp the concept, I have the graph now and that part is pretty easy to recreate. I also understand where it says 10.0.0.0/12 Network (11111111 11110000 00000000 00000000) First 12 bits = 1 being the same as 255.240.0.0 Also working this back to binary = first 12 bits = 1

I however can not see how they make this out to be a Class A :confused: Does it have to do with the IP range being between 250.0.0.0 and 250.250.0.0? Since 255.240.0.0 is not 250.250.0.0 just 10 short?

If I'm not mistaken, having a 1 as the first bit of the IP address makes it class A, having a 10 as the first part makes it class B, and having 110 as the first part makes it class C.

You're also correct in saying that the class is defined by the range it falls into. But this should be obvious.

Subnetting is about the only "confusing" part of the Cisco courses. But if you take time to work through examples, it becomes easy, especially as you learn the 255, 254, 252, 248, 240, 224, 192, 128, 0 progression.
 

Morgoth

Executive Member
Joined
Apr 20, 2006
Messages
7,009
I wrote a math admission test at tuks this year, basically no one could prepare for it and Binary maths were one of the topics, it basically worked you through the math involved,

Neways nice explaining in this thread, it all came back to me :)
 
Top