Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Позааудиторне читання 2 курс КН.doc
Скачиваний:
1
Добавлен:
05.09.2019
Размер:
1.34 Mб
Скачать

Digital Data

Modern computers are digital, that is, all info is stored as a string of zeros or ones - off or on. All the thinking in the computer is done by manipulating these digits. The concept is simple, but working it all out gets complicated.

1 bit = one on or off position

1 byte = 8 bits

So 1 byte can be one of 256 possible combinations of 0 and 1. Numbers written with just 0 and 1, are called binary numbers.

Each 1 is a power of 2 so that the digits in the figure represent the number: = 2 7 + 0 + 2 5 + 0 + 2 3 + 2 2 + 0 +0 = 128 +0 +32 + 0 + 8 + 4 + 0 + 0 = 172

Every command and every input is converted into digital data, a string of 0's and 1's.

Digital Codes

All letters, numbers, and symbols are assigned code values of 1's and 0's. A number of different digital coding schemes are used by digital devices.

Three common code sets are:   ASCII    (used in UNIX and DOS/Windows-based computers) EBCDIC   (for IBM System 390 main frames) Unicode    (for Windows NT and recent browsers)

The ASCII code set uses 7 bits per character, allowing 128 different characters. This is enough for the alphabet in upper case and lower case, the symbols on a regular English typewriter, and some combinations reserved for internal use. An extended ASCII code set uses 8 bits per character, which adds another 128 possible characters. This larger code set allows for foreign languages symbols and several graphical symbols.

ASCII has been superceded by other coding schemes in modern computing. It is still used for transferring plain text data between different programs or computers that use different coding schemes.

Unicode uses 16 bits per character, so it takes twice the storage space that ASCII coding, for example,  would take for the same characters. But Unicode can handle many more characters. The goal of Unicode is to represent every element used in every script for writing every language on the planet. Whew! Quite a task!

Version 3 of Unicode has 49,194 characters instead of the wimpy few hundred for ASCII and EBCDIC. All of the current major languages in the world can be written with Unicode, including their special punctuation and symbols for math and geometry.

Parity

With all these 0's and 1's, it would be easy for the computer to make a mistake! Parity is a clever way to check for errors that might occur during processing.

In an even parity system an extra bit (making a total of 9 bits) is assigned to be on or off so as to make the number of on bits even. So in our example above 10101100 there are 4 on bits (the four 1's). So the 9th bit, the parity bit, will be 0 since we already have an even number of on bits.

In an odd parity system the number of on bits would have to be odd. For our example number 10101100, there are 4 on bits (the 1's), so the parity bit is set to on, that is 1, to make a total of 5 on bits, an odd number.

If the number of on bits is wrong, an error has occurred. You won't know which digit or digits are wrong, but the computer will at least know that a mistake occurred.

Memory chips that store your data can be parity chips or non-parity chips. Mixing them together can cause odd failures that are hard to track down.

CPU

The CPU, or Central Processing Unit, is the part of the computer where work gets done. In most computers, there is one processing chip.

Main Memory stores the commands that the CPU executes and the results.

ALU stands for Arithmetic/Logic Unit. This is the part that executes the computer's commands. A command must be either a basic arithmetic operation:

+   -  *  / or one of the logical comparisons: >  <  =  not =.

Everything else has to be broken down into these few operations. Only one operation is done in each Machine Cycle. The ALU can only do one thing at a time but can work very, very fast.

Applications

These are the various programs that are currently running on the computer.

By taking turns with the Machine Cycle, modern computers can have several different programs running at once. This is called multi-tasking.

Each open application has to have some data stored in Main Memory, even if the application is on rest break and is just sitting there. Some programs (graphics programs are notorious for this) require a lot of the Main Memory space, and may not give it up even if they are shut down! Rather rude, actually!!

Control Unit

This is the part of the computer that controls the Machine Cycle. It takes numerous cycles to do even a simple addition of two numbers.

The Machine Cycle

Fetch -

get an instruction from Main Memory

Decode -

translate it into computer commands

Execute -

actually process the command

Store -

write the result to Main Memory

CPU stands for Central Processing Unit. This is the part of the computer that does the "thinking."