Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Binary Numbers!


Admiral Refuge
 Share

Recommended Posts

This is more of a rant from after reading that riddle game in Forum Games.

01010111 01010010 01001111 01001110 01000111
What do you see?

Do you know what these really say?
If you were to paste them into one of those ascii converters, you'd get
WRONG
But, what if you were to conver them by hand?
You would get:
87 82 79 78 71

Which of course, means WRONG if you follow the ascii table.

IDK, do they still teach Binary (or number systems of other bases) in schools anymore?  I'm sure about 95% of Eclipse knows what Binary is either way… Out of that, probably 60+% of the members would see the above, and paste it into the Binary to Ascii Converter thing...  The rest probably already know how the binary number system works.

But for those who don't, how does it work???

The most used number system is the Decimal System.  This is a number to the base of 10 (or, n10).  There is a very easy way of breaking numbers down from their bases.  Consider the following number:
5,39610
Can be broken down into:
5*103 + 3*102 + 9*101 + 6*100

The same can be said about a Binary didigt…
Only differnense, is that binary numbers are at the base 2.
Quick example:
1110012 = 1*25 + 1*24 + 1*23 + 0*22 + 0*21 + 1*20 = 57

Let's look at another number:
A30C616 = 10*164+3*163+0*162+12*161+6*160 = 667846

Am I making any sense?

What about converting Dec to Bin?

Try to remember these (or keep them for refrence):
20=1
21=2
22=4
23=8
24=16
25=32
26=64
27=128
28=256
29=512
210=1024
211=2048
212=4096
213=8192
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 16 +0 + 4 + 1
Say you want to convert the number 10421 into Binary.  How would you do this?

First, look at that chart above, and find the highest number to 10421 (without going over it).  In this case, it's 8192.

So we subtract 8192 from 10421, we get 2229.
So the new number, is:
8192 + 2129
Next, we see what comes closest to 2129.  It's 2048, isn't it?  But look! We're skipping 4096!  So this is what we do:
8192 + 0 + 2048 + 181
Next, we look for one that comes close to 181, which is 128.  But we're skipping three spaces, so the new number is:
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 53
Next, we do the same thing with 53, to get:
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 21
Then, we get:
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 16 + 5
Which equals:
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1
In binary, you would replace the numbers > 0 with 1s to get:
10100010110101

So the full thing, would be:
1042110 =
8192 + 2129 =
8192 + 0 + 2048 + 181 =
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 53 =
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 21 =
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 16 + 5 =
8192 + 0 + 2048 + 0 + 0 + 0 + 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 =
1*213 + 0*212 + 1*211 + 0*210 + 0*29 + 0*28+ 1*27 + 0*26 + 1*25 + 1*24 + 0*23 + 1*22 + 0*21 + 1*20 =
101000101101012

xD

PS:  Would this be better in one of the Programming Tutorial boards or something like that?
Link to comment
Share on other sites

I learned binary in school.

Was really easy. xD

I liked the

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
  0 | 0  | 0  | 1  | 1 | 0 | 1 | 1

Now, for every colum that has a 1 in it, add those numbers together, that is what binary is.

I know it's not so clear, the way I explained it, but that's how we learned it. xD
Link to comment
Share on other sites

@Bob:

> I learned binary in school.
>
> Was really easy. xD
>
> I liked the
>
> 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
>   0 | 0  | 0  | 1  | 1 | 0 | 1 | 1
>
> Now, for every colum that has a 1 in it, add those numbers together, that is what binary is.
>
> I know it's not so clear, the way I explained it, but that's how we learned it. xD

Actually, that's a pretty good way of explaining it; I've used columns before
Link to comment
Share on other sites

Binary is 100% useless as actual words and I hate when people use it this way. I learned binary years ago when covering boolean algebra for digital electronic logic diagrams. Its basically using the same concept of binary to represent conditions in electronic circuits.

Pretty nifty, however, even in programming, I don't ever worry about conversions, since there are functions to do it for you.

Anna, boolean is binary like I just described. 1 = true, 0 = false. Or in digital electronics On and Off.
Link to comment
Share on other sites

Binary can only produce two possibilities.

When speaking of computers, the hard drive stores binary data in terms of magnetic cell polarity. In compact discs or DVD's it store data in terms of hills and valleys ( a laser cuts microscopic holes in CD's to represent ones and zeros ).

Even though you can count forever in binary, its actually just saying on off on off off on on and etc. Actually counting binary is just a way of converting to the binary system. ACTUALLY counting in base 2 stops at 1 lol.
Link to comment
Share on other sites

Yes, ultimately it will be read as binary, which is able to feed voltages as On and Off to the electronic components of the actual PC to operate properly. Its quite phenomenal really.

Hippoman, no, that doesn't even make sense…..
Link to comment
Share on other sites

Also I just noticed, DDunit, you cant remove the zeros in front of the decimal, base 2 is in groups of 4 always. You cant just change it even though the zeros don't count hah.

For example:
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
10011
10100

Should be written:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0001 0000
0001 0001
0001 0010
0001 0011
0001 0100

Sorry to nit pick, but if someone was looking at this for school, would be wrong hah. Its very important to keep your places for when you start converting to bases that aren't in sections of four.
Link to comment
Share on other sites

Hippoman, that is considered spam ;)

@Bob Smith, I've never used that column system before, always just memorized the place values and added them together. I'm going to use that for now it, its epic.
Link to comment
Share on other sites

Binary is always in sets of four. Only one of the number systems isn't in a set of four, but actually three. I may be wrong on this as I never use it, but I think either octal or hex is in sets of 3.
Link to comment
Share on other sites

Oh man… I loved learning binary and how to use it for all sorts of things on the computer. Honestly learning binary in a computer science class is some of the most fun I've had  :P I is geek, I know. Oh the joys of seeing who is connected to what network using binary... That was amusing to me. Given two unique IP's and finding if they are on the same network lol I had a lot of fun with that junk.
Link to comment
Share on other sites

Admiral, on compent level, its no longer 1 and 0 but a digital high or low. Its measured in terms of voltage. In digital electronics they are called gates, they only trigger when a certain condition is met.

For example, and or gate is a chip with 2 inputs and 1 output. If either input 1 or 2 read a high (from 2-5 volts or something like that) then a high is sent from the output. Most logic gates are constructed of a few transistors to act like switches in passing voltage.

A processor core is really only millions and millions of transistors (small electronic components that act like gates/switches to register a binary one or zero) to flow logic. The whole mother board on a component level really only consists of a handful of different components. Thats the kind of things we learn about in my class. Its amazing<3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...