Header

Larry’s Computer Classes

image
center ad

Learn Computers with Video's

Beginner Video's Classes

Basic computer skills and settings

Intermediate Video's Classes

Microsoft Word, PowerPoint and Excel

Advanced Video's Classes

Create and design your own website

Click For Video's

Binary Codes

Previous tutorials are listed in the left column.

Binary system using 0's and 1's

Binary is a set of instructions used to control the computer, and works with 1’s and 0’s, but the computer understands them as on or off signals. If the decimal system were used, there would need to be 10 different voltages, in which case there would be more room for error, therefore more room for corruption of data. When using the decimal system and ten different voltages we run into problem because of the lack of accuracy in voltage. For example: if we used 10v and gave each number a 1 volt reading, 0=0volt, 1=1volts, 2=2volts and so on you would think it would work. The problem is using analog like this as we have done for years we have to take into consideration variations. Using voltage like this is very inaccurate because any temperature changes, outside noise interference or internal noise such as lights, fans, disc drive player and so on will cause the voltages to change. And therefore make it very hard for the processor to read the code accurately, leaving much room for data errors and corrupt files.

With the binary system we use only 0’s and 1’s or on and off switches so to speak. It is like the old Morse code for example. Morse code used dot and dashes. Your processors work exactly the same way. Binary code works like this: it take a decimal number and converts it.

binary code
Each box above represents one bit 8 bits represent a byte. (hence kilobytes, mega bytes, gigabytes, terabytes and so on. These are all symbols we are familiar with. Your hard drive in your computer for example is 250 G or 250 gigabytes. Which means it can store 250 billion bytes of these codes.

Ok back on track: the code above will take a decimal number such as 205 and convert it to a binary number by simply taking the 205 number and finding the highest binary number possible, in this case it would be 128 so we place a one under 128

binary code
Now we subtract the 128 from 205 and we get 77. Now we repeat the previous step. The next highest number is 64 so we place a 1 under 64.
binary code
Now repeat again 64 from 77 equals 13 again repeat previous step. Highest number is 8. Place a one under the 8.
binary code
Now we repeat again 8 from 13 equal 5 so again the highest number is 4
binary code
Again 4 from 5 equal 1 so to finish we place a 1 under 1
binary code
The binary code for 205, If you add all the digits together that has a one under them you will come up with a total of 205. To complete the code simply add 0’s in the empty blocks.
binary code
The binary code equals 11001101 is equivalent to 205.

Now we ask is this long number worth it and the answer is yes. By using this system of on and off switches it is very accurate. There are no voltage spikes or fluctuations. When the processor in your computer reads this binary code using 0 for off and 1 for on it is very accurate. Welcome to the digital world. Using this binary code is called digital and using voltage for 0-9 scale is called analog. Remember back when 8 tracks and cassettes were popular. Remember listening to them and have back ground noise and a lot of interference as opposed to a disc with no back ground noise and no interference. This is because discs are digital and 8 tracks and cassettes are analog. The binary system is incredibly more accurate.

So back to our example above; these binary codes are used for everything. Each button on your keyboard has binary code attached to it. For example: a could be binary code 11001010 and A could be 01111011 and ? could be 11110000 and so on. So as I write this article and save it to my computer is taking each letter I write and converting it to binary code. When I save it it will be saved in this binary code format. If I email it to you my computer will send this binary code to your computer and your computer will save it. Then when you request to read it your processor will send a request to your hard drive asking for the data. Then the data will be placed in your random access memory or RAM memory while the processor processes the data. As the processor processes the code it will send the proper portion of code to the respectable devices. In this case the process will send the information to the computer screen converted to the actual lettering you see. If it was a music file the processor would send the binary code to the video card in your computer and the video card would process the data and convert it to an analog signal to send to the speakers and so on. This is what people mean when they say computers only understand 0’s and 1’s.

Beside the binary system being more accurate it is also fast than using voltages for 0-9 analog systems. These binary codes can be processed fast by your cpu(central processor unit) in your computer. The processor reads the codes and if it is a 0 the processor is off and if the code is a one the processor is on. I am not sure what the speed of the processors are today but I do know about 4 or 5 years ago around 2007 processors were able to process these code(meaning turn on and off) at a rate of 1 billion times a second, yes a billion times a second and that was 5 years ago I can only imagine how fast they are today. Maybe double that. And now today we have computers with dual processors, you may have heard this term. If your computer has dual processors it simply means there are two processors in your computer. My computer is a dual processor and it is about 4 years old so this technology has been around for a while. Imagine this computer with two processors can process 2 billion of these binary codes every second. And I have read there are high end computers (expensive computers) that now have quad processors in it. 4 billion codes a second, 240,000,000,000 bytes of code every minute. Not bad ha, could you imagine the Morse code operators 100 years ago sending a billion dots and dashes every second.

So when we talk about bytes of data it refers to this binary code. Each digit of 0 or 1 is a bit and 8 of these bits equal a byte. When you see a program that is 1.3 MB’s it means there are 1.3 million of these bytes that make it work. If your hard drive on your computer is 250 GB(250,000,000,000 bytes) and you install a program that is 1.3MB’s(1,300,000 bytes) then you have used up 1.3 MB’s of space on your hard drive leaving you with 250,000,0000,000 minus 1,300,000 equals 249,987,000,000 bytes of memory left on your hard drive. So to speak because you would have your operating system and other things already on your hard drive but you get the idea.

THANK YOU

For other articles also see previous tutorials.