Binary Maths

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Let me try and understand this I think this is where I'm getting confused

10^2 actualy mean 10x10=1 0 0 (Hundreds)

and then

10^3 (10x10x10) = 1 0 0 0 (Thousands)

I don't know the english word but it would mean that the "^" stands for (Eksperimag (To the power of?) *Afrikaans) ?
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Let me try and understand this I think this is where I'm getting confused

10^2 actualy mean 10x10=1 0 0 (Hundreds)

and then

10^3 (10x10x10) = 1 0 0 0 (Thousands)

I don't know the english word but it would mean that the "^" stands for (Eksperimag (To the power of?) *Afrikaans) ?

Yes, sorry, the ^ is just an exponent indicator, because I'm not sure how to do superscript here :p

so 10^3 = "ten to the power of three"
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Yes, sorry, the ^ is just an exponent indicator, because I'm not sure how to do superscript here :p

so 10^3 = "ten to the power of three"

FFS, could they not have just said that :D

Ok cool, so now I get that part, now to move on to the next step :eek:
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
FFS, could they not have just said that :D

Ok cool, so now I get that part, now to move on to the next step :eek:

Lol... I'm pretty sure they said that? It's about the first thing I learnt :D

GL!
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Lol... I'm pretty sure they said that? It's about the first thing I learnt :D

GL!

I was trying to get my head around this "^" thing then it hit me when I checked the answers :D This makes it soo much easier to visualise now ;) Thanx for the help mate.
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
I was trying to get my head around this "^" thing then it hit me when I checked the answers :D This makes it soo much easier to visualise now ;) Thanx for the help mate.

Haha... My bad... Anytime...

Btw, if you encounter "^" again, it could also refer to the bitwse-exclusive-or operator.
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
So since 2 (binary 10) + 2 (binary 10) = 4 (binary 100)

If I read this correct it would be 10^2 + 10^2 = 10^4

meaning:

100 +(x) 100 = 10000 ?
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
If I read this correct it would be 10^2 + 10^2 = 10^4

meaning:

100 +(x) 100 = 10000 ?

no no...

2 is 2 TIMES 10 to the power of zero.

Remember, the powers are the WEIGHTS of the digits.

So base-10 123 is
3 x 10^0
+
2 x 10^1
+
1 x 10^2
= 3 + 20 + 100 = 123

In the same way, binary 101 is
1 x 2^0
+
0 x 2^1
+
1 x 2^2
= 1 + 0 + 4 = 5 (in decimal)
= 1 + 00 + 100 = 101 (in binary)
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
no no...

2 is 2 TIMES 10 to the power of zero.

Remember, the powers are the WEIGHTS of the digits.

So base-10 123 is
3 x 10^0
+
2 x 10^1
+
1 x 10^2
= 3 + 20 + 100 = 123

In the same way, binary 101 is
1 x 2^0
+
0 x 2^1
+
1 x 2^2
= 1 + 0 + 4 = 5 (in decimal)
= 1 + 00 + 100 = 101 (in binary)

Just trying to visualise this so

it's:

3 x (10x0 *Tens*) = 3 (Normal maths this would be Zero)
2 x (10x10 *hundreds*) = 20 (Same as normal maths)
1 x (10x10x10 *thousands*) = 1000

Now I'm trying to understand how I slot them into place now. Do I work as decimal spaces being Tens/Hundreds/Thousands or do I fit them in Thousands/Hundreds/Tens

Because if I was to use normal decimals it would mean 0.321 where it's now 123.0 :confused:

*Just added the 0. as a reference to what I mean :)
 
Last edited:

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Just trying to visualise this so

it's:

3 x (10x0 *Tens*) = 3 (Normal maths this would be Zero)
2 x (10x10 *hundreds*) = 20 (Same as normal maths)
1 x (10x10x10 *thousands*) = 1000

Now I'm trying to understand how I slot them into place now. Do I work as decimal spaces being Tens/Hundreds/Thousands or do I fit them in Thousands/Hundreds/Tens

Because if I was to use normal decimals it would mean 0.321 where it's now 0.123 :confused:

*Just added the 0. as a reference to what I mean :)

It works the same as the numbers you're used to...

123

You look at this number and know that it's
3 x units
+
2 x tens
+
1 x hundreds

Which is the same as
3 x 10^0
+
2 x 10^1
+
1 x 10^2

since
10^0 = 1
10^1 = 10
10^2 = 100

Up until now (in this post), we've only discussed regular numbers that you're used to (I think this is what has been confusing you; the 10/100/1000 in binary vs the 10/100/1000 in decimal).

Thus in binary, we have

101

Which is

1 x (least significant)
+
0 x (next least significant)
+
1 x (next least significant)

which is
1 x 2^0
+
0 x 2^1
+
1 x 2^2

since
2^0 = 1
2^1 = 2
2^2 = 4

so we have 101 (binary) = 5 (decimal)
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Maybe something that will help with visualising it; here's how you count in binary vs how you count in base-10 (normal)
Code:
Binary		Decimal
(Base-2)	(Base-10)
0000	 	 0
0001	 	 1
0010	 	 2
0011	 	 3
0100	 	 4
0101	 	 5
0110	 	 6
0111	 	 7
1000	 	 8
1001	 	 9
1010		10
1011		11
1100		12
1101		13
1110		14
1111		15

Note that counting works as follows:
0 (decimal) = 0000 (binary)
1 (decimal) = 0001 (binary)
2 (decimal) = 0010 (binary)
3 (decimal) = 0011 (binary)

etc

This is because
0000 = 0 x 2^0 + 0 x 2^1 + 0 x 2^2 + 0 x 2^3
0001 = 1 x 2^0 + 0 x 2^1 + 0 x 2^2 + 0 x 2^3
0010 = 0 x 2^0 + 1 x 2^1 + 0 x 2^2 + 0 x 2^3
0011 = 1 x 2^0 + 1 x 2^1 + 0 x 2^2 + 0 x 2^3

Note we start at the right, at the least significant digit (as we do in normal numbers; the right-most digit is the least significant).
 
Last edited:

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
It works the same as the numbers you're used to...

123

You look at this number and know that it's
3 x units
+
2 x tens
+
1 x hundreds

Which is the same as
3 x 10^0
+
2 x 10^1
+
1 x 10^2

since
10^0 = 1
10^1 = 10
10^2 = 100

Up until now (in this post), we've only discussed regular numbers that you're used to (I think this is what has been confusing you; the 10/100/1000 in binary vs the 10/100/1000 in decimal).

Thus in binary, we have

101

Which is

1 x (least significant)
+
0 x (next least significant)
+
1 x (next least significant)

which is
1 x 2^0
+
0 x 2^1
+
1 x 2^2

since
2^0 = 1
2^1 = 2
2^2 = 4

so we have 101 (binary) = 5 (decimal)

OOOO RIGHT

So it's not an eqaution as such it's more a decription of the actual placement of numbers :)

123 Would be

3 = 10^0
2 = 10^1
1 = 10^2

If it was 23456 as an example it would have been

6 = 10^0
5 = 10^1
4 = 10^2
3 = 10^3
2 = 10^4

Correct?

Not really Maths as such, just a discription of where they are in the line above.

If they ask me where is 3 in that link I can make the table above and quote 3 = 10^3 (Thousands - 4th in line) as the answer?
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
OOOO RIGHT

So it's not an eqaution as such it's more a decription of the actual placement of numbers :)

123 Would be

3 = 10^0
2 = 10^1
1 = 10^2

If it was 23456 as an example it would have been

6 = 10^0
5 = 10^1
4 = 10^2
3 = 10^3
2 = 10^4

Correct?

Not really Maths as such, just a discription of where they are in the line above.

If they ask me where is 3 in that link I can make the table above and quote 3 = 10^3 (Thousands - 4th in line) as the answer?

Exactly...

Although binary is more useful than that. It's just a way of representing values, the same was as (regular) numbers represent values.

The unfortunate thing is that people see 1's and 0's and automatically relate them to 1 and 0 in a base-10 number system. It would be easier for many to understand if we took the symbols "A" and "B" instead (although this might cause problems for those learning hexadecimal too).

A few advantages of binary over base-10 (you're going to be asking yourself this a LOT over the next few months, trust me; "wtf? wtf can't we just use normal numbers?!?!?!?") ?

1) 1's and 0's can represent "on" and "off"; thus if you can mathematically state it, you can realise it in an electrical circuit
2) Binary math is accomplished in MUCH faster time than regular math (this is because of the way numbers are stored in a computer, which is related to (1) above
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Exactly...

Although binary is more useful than that. It's just a way of representing values, the same was as (regular) numbers represent values.

The unfortunate thing is that people see 1's and 0's and automatically relate them to 1 and 0 in a base-10 number system. It would be easier for many to understand if we took the symbols "A" and "B" instead (although this might cause problems for those learning hexadecimal too).

A few advantages of binary over base-10 (you're going to be asking yourself this a LOT over the next few months, trust me; "wtf? wtf can't we just use normal numbers?!?!?!?") ?

1) 1's and 0's can represent "on" and "off"; thus if you can mathematically state it, you can realise it in an electrical circuit
2) Binary math is accomplished in MUCH faster time than regular math (this is because of the way numbers are stored in a computer, which is related to (1) above

Perfect :)

Now I understand the base of all of this :) I'll try and work out the Binary you quoted just to see if I understand it correctly. Meaning this:

Note that counting works as follows:
0 (decimal) = 0000 (binary)
1 (decimal) = 0001 (binary)
2 (decimal) = 0010 (binary)
3 (decimal) = 0011 (binary)

etc

This is because
0000 = 0 x 2^0 + 0 x 2^1 + 0 x 2^2 + 0 x 2^3
0001 = 1 x 2^0 + 0 x 2^1 + 0 x 2^2 + 0 x 2^3
0010 = 0 x 2^0 + 1 x 2^1 + 0 x 2^2 + 0 x 2^3
0011 = 1 x 2^0 + 1 x 2^1 + 0 x 2^2 + 0 x 2^3

On this I just need to confirm that it will always only have 4 slots? As in your equation above?
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Perfect :)

Now I understand the base of all of this :) I'll try and work out the Binary you quoted just to see if I understand it correctly. Meaning this:



On this I just need to confirm that it will always only have 4 slots? As in your equation above?

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...
 
Top