The Binary Number System

I’m sure everyone has heard
that a computer runs on binary code. But, what is this?
Well, basically, it is a number system. Let’s look at it:

Most people use a number
system based on 10. We use the digits 0,1,2,3,4,5,6,7,8 and
9 to form our numbers. All numbers can be represented by any
number times 10 to some power. For instance:

14,393 =
1.4393 x 10^4

Using these numbers
we can form integers, decimals, etc. We all know this, so let me
not delve into this any more.

Now, the reason we
cannot use this system of numbering in the computer is pretty
simple. Yeah, it would make life easier for us. But, as we know, a
computer circuit is made out of transistors. Transistors have two
positions- on and off. The computer uses these positions to
represent 0 and 1. Since we do not have any systems with 10 stable
positions, and we do have the transistor with 2 stable positions,
we thus use the binary system.

The binary system
uses base 2 instead of base 10 like we are used to. To compare it,
let’s again look at base 10:

234 = (2 x 10^2) +
(3 x 10^1) + (4 x 10^0)

You can see how any
number can be represented by a base of 10. In binary we use base
2:

10111 = (1 x 2^4)
+ (0 x 2^3) + (1 x 2^2) + (1 x 2^1) + (1 x 2^0)
10111 = 16 + 0 + 4 + 2 + 1 = 23

So, 10111 in binary
is equal to a value of 23. To represent integers, which can be
positive or negative, computers typically use a sign notation on
the binary. 0 is positive and 1 is negative and this number
precedes the the rest of the number. 1 10111 would be -23 for
example. How does the computer differentiate this from 110111?
Simply be context in the program.

ASCII code is the
term for text characters represented by the computer. Since
computers ONLY think in binary, ASCII characters are represented
by certain binary numbers. Again, the only way the computer
differentiates between the ASCII character and the number itself
is by context. There is a whole chart showing all the ASCII characters
and their binary equivalents, but who the hell needs to see that?

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

Discuss This Article (Without Facebook)

Leave a Reply

PCMech Insider Cover Images - Subscribe To Get Your Copies!
Learn More
Every week, hundreds of tech enthusiasts, computer owners
and geeks read The Insider, the digital magazine of PCMech.

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: