Thursday, November 11, 2010

Modern, think they are, computer experts.

Occasionally I read articles about legal issues related to the computer industry. Tonight I read an article about the lawsuit against Seagate for false advertising. It was not the article which drew my attention, rather it was the comment section which was truly an interesting read in ignorance. Several want to be experts tried to explain that it was really the memory manufacturers who were wrong. Memory should really be sold in multiples of 1000 not 1024 as it is being sold today. After all, computers use real numbers today it is only the old, primitive computers which need binary.


Well, guess what, every computer in use today only really understand binary.


The computer which most people think was the first electronic computer, ENIAC, just happened really to be a decimal machine. ENIAC did not, understand binary. Unfortunately, this led to several problems. For instance it literally took weeks to change a program, you had to rewire the machine, and it caused extreme limitations on the number of things which the machine could remember. (Usable memory, or should I say lack of in the case of these early machines).


In the old days, computers were word orientated. What this means is that the instruction and the data had to fit in a single computer word of memory. Back then computers came in various size words, 30 bit 60 bit, 28 bit 15 bit and a few in 68 bit. Please notice that none of these numbers are multiples of 8 bits, which is the byte length of modern computers.


In the old days, the primary number systems used were binary and octal. Why? Look at a very simple binary number for a 15-bit machine  101110111001000 or in octal 56710. A programmer can look at the binary and very quickly, without needing math, convert the binary to octal or vise-versa. Today we use binary and hexadecimal. Again, why? Well, we changed to byte orientated computers and using hex we can do the same trick with conversion between binary and hex. People can process hex or octal numbers much easier than binary. After all 56710 is much easier to remember than 101110111001000.


This means that memory will be either 8 16 32 64 or 128 bit. (Please note that this does not allow for ECC. Computer hardware designers must allow for ECC, computer programmers do not.)


Why did the computer world change to bytes? Quite simply because there were and to a small degree still are two ways to store written text such as this article in computer memory. These methods are ASCII, which requires 7 bits and EBCDIC, which requires 8 bits. Thus to store this sentence we need 56 bytes of memory. (This does not allow for control codes such as end of line or end of string.)


The thing is computers still work internally in binary. When the text of this document is saved in memory, it will use bytes of memory. So just how did we come up with 1K being 1024? Watch below and I think you will see:


1111111111 = 1023 decimal


10000000000 = 1024 decimal


So how do you get to this?


Start with the least significant digit.


0  x  1  = 0

0  x  2  = 0

0  x  4  = 0

0  x  8  = 0

0  x 16 = 0

0  x 32 = 0

0  x 64 = 0

0  x 128 = 0             (this is the eight bit)

0  X 256 = 0

0  X 512 = 0

1  X 1024 = 1024   (add all of the sums using decimal)


For those of you who are interested I leave the conversion of the first binary number.


The point is, the binary number system is hard wired in the very fiber of computers. You will need storage calculated using the same size, used for memory, to be able to save that word processor document you are writing. If you are using quick books, all of those DECIMAL numbers you enter are converted to binary before they reach the memory. Why? Computers do not really understand decimal. But then they really don't need to?


For those of you who still think that Seagate was correct, and the memory manufacturers are wrong; first you need totally to redesign the digital world we live in to get rid of binary.  Or learn how to put a 20 oz coke in a 16 oz can without spilling or disposing, or drinking, any of the coke in the bottle.


Having worked on computers for almost forty years, I personally will take binary over the vastly added complexity of trying to do what we do with binary, in decimal. Yes, we could probably build machines which use decimal numbers. Unfortunately, the machines would be hundreds of times more complex than what we are currently using. Remember the computer you are using to read this, will have over 10,000,000,000 transistors and every one of these little critters only understands 0 and 1.


For those of you who think all of the people who developed computers using binary were wrong. All I can say if you wish to duplicate them using decimal is.


Good Luck!

No comments:

Post a Comment