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?

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:


