History of the computer – It’s a binary world – How computers count

Many have cursed their computer for taking things too literally! It’s easy to blame the computer when something goes wrong.

You get to the market checkout and the item you bought “on special price” comes out at full price. The manager should be called to fix it and what does he say? “We’re having problems with the computer, it’s getting the wrong price for some things.”

You put an address list into your word processor and print invitations to next week’s party. You then find that today’s date has been inserted into the signature block – by the computer!

You may have heard the expression “Garbage in garbage out”? Someone at some point instructed the computer to do what it did, He didn’t set out to screw you up on purpose. The computers can only do what they are told, they are more logical than Spock and they take everything literally.

We’ll take a look at why they’re so meticulous!

The world around us has many aspects that work in the same way as a computer. There are many examples of opposites, for example up and down, left and right, forward and backward. A light can be on or off, it can be night or day. Yes or no? You can think of many others. This system of two possible states is called a binary system. If it’s not one, it must be the other.

A computer uses the binary system to perform all its functions, the basic unit, first a vacuum tube, then a transistor, then a chip, is used thousands of times to make the whole unit. The on or off light we mentioned above is controlled by a switch. In a computer, this switch is a transistor that is turned on or off.

Now we get to the math! Don’t worry, it’s very simple math! In fact, it’s so simple that we only count up to 1. That’s right, we can only have two states, so we count from 0 to 1. (This is another thing computers are picky about, they insist on starting from zero).

The binary system is a number system. You are familiar with the decimal system, which has 10 digits from 0 to 9 (think of a computer as 0 being first). You can create any number of systems for any purpose you wish. You probably know about a dozen (12) and have heard of half a dozen. If you’ve used your computer a lot, you may have come across the hexadecimal system. This one has 16 “digits” 0-9 and AF. Another number system used by computer people is the octal system, which has 8 digits, 0-7.

Ok, how do we count with just 0’s and 1’s. Simple, just the same way you count in decimal. The first ten numbers are OK, 0-9, but what comes next? We start again, but add 1, which makes 10, or “one, zero.” That takes us to “one, nine” and we go to “two, zero” and so on to “nine, nine,” then we add 1 again to make 100 – “one, zero, zero.”

DECIMAL 0-9, 10-19, 20-…..-99, 100.

If you’ve followed me so far, you’re ready for the binary sequence, it’s much simpler. Starting from zero, we have 0.1 – and that’s it. We follow the same rule and add 1, which makes “one, zero”. Followed by “one, one”; then “one, zero, zero”; -“one, zero, one”; etc. They are equivalent to Decimal 0,1,2,3,4,5. How does this relate to computers? This is the next one.

BINARY – 0 1 10 11 100 101

DECIMAL– 0, 1, 2, 3, 4, 5

In our computer we have transistor switches as described above. For the math example we just looked at, we need 3 switches. Each one represents a binary digit or bit. To represent a decimal number 1 these switches would be OFF, OFF, ON or 001. For a decimal number 5 we would have ON, OFF, ON or 101. By extension you can see that with 4 switches we can go to 1111 or 15 decimal.

TRANSISTORS [OFF OFF ON] [ON OFF ON] [ON ON ON ON]

BINARY …… 001 101 1111

DECIMAL ….. 1, 5, 15

Another point to note is that each binary digit or bit has a value. Just like in Decimal we have ones, tens, hundreds, etc. in Binary the values ​​are 1,2,4,8,16,32,64,128 etc. etc. The binary code 1111 mentioned above is 1+2+4+ 8=15. what would BINARY 1010 be in decimal?

BIT VALUE 8 4 2 1

BINARY… 1 0 1 0

DECIMAL… 8+2=10

If you want to find out what binary 100101100 is in decimal, you can add the individual values. In fact, the people who work on the underlying machines need to know the “machine code”! For them, 1010 would be A in hexadecimal or 12 in octal.

One of the reasons for using octal or hexadecimal code is to enable humans to interpret machine codes. Some mainframe computers use “words” made up of 24, 32, 36, or 72 bits. They are displayed or printed in groups of three for octal or four for hexadecimal. For example, a 24-bit binary word in a computer can be interpreted as shown here.

BINARY 100 111 000 011 010 000 011 100

EIGHT.. 4 7 0 3 2 0 3 4

BINARY 1001 1100 0011 0100 0001 1100

HEX… 9 D 3 4 1 D

This probably seems like a very long way to calculate numbers until you remember that these “switches” can operate at nanosecond speeds, on the order of 1,000,000,000 times per second, large calculations become possible.

That’s probably enough to grind in one go. Next we will look at how the computer adds and multiplies.



Source by Tony Stockill