Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
laboratory.doc
Скачиваний:
6
Добавлен:
01.07.2025
Размер:
5.68 Mб
Скачать

2.1 Architecture of computer

2.2 Types of memory

2.3 Number system

Architecture of computer What is computer architecture? A computer architecture is a detailed specification of the computational, communication, and data storage elements (hardware) of a computer system, how those components interact (machine organization), and how they are controlled (instruction set).. Computer architecture includes the following areas:

• the fundamental physical components that constitute a computer system (the hardware)

• the kind of instructions/language the computer can understand

• the underlying computer technology that manipulates these instructions (sometimes referred to as microarchitecture).

The architecture of the computer is a description of its organization and the principles of functioning of its structural elements (the computer main device, communication in between).

The principles formulated in 1945 by John von Neumann are the basis for creation of the majority of a computer.

Picture 1 The Von Neumann or Store Program architecture.

The illustration above shows the essential features of the Von Neumann or stored-program architecture. Computers based on the stored program concept or the Von Neumann architecture store both their program code (i.e. instructions) and the data that is required for (or may result from) the computation in the computer’s memory. During computation, program instructions are retrieved from the memory and executed one after the other. The component in a computer that controls this computation is known as the central processing unit (CPU, or nowadays often just referred to as the processor). The CPU consists of:

• the arithmetic logic unit, which performs operations. This part of the architecture is solely involved with carrying out calculations upon the data. All the usual Add, Multiply, Divide and Subtract calculations will be available but also data comparisons such as 'Greater Than', 'Less Than', 'Equal To' will be available.

• the control unit, which coordinates the computer’s activities. The control unit will manage the process of moving data and program into and out of memory and also deal with carrying out (executing) program instructions - one at a time. This includes the idea of a 'register' to hold intermediate values.

• the registers, which are data storage cells that are used for the temporary storage of data; for example, the data that is required in a calculation that is carried out.

The 'one-at-a-time' phrase means that the von neumann architecture is a sequential processing machine.

Memory unit.

The computer will have memory that can hold both data and also the program processing that data. In modern computers this memory is RAM.

Input - Output

This architecture allows for the idea that a person needs to interact with the machine. Whatever values that are passed to and forth are stored once again in some internal registers.

The arrows between components, i.e. the connection between the CPU and the memory are known as a bus. This connection implies that information should flow between various parts of the computer. In a modern computer built to the Von Neumann architecture, information passes back and forth along a 'bus'. There are buses to identify locations in memory - an 'address bus'. And there are buses to allow the flow of data and program instructions - a 'data bus'.

Types of memory

A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed and instructions required for processing are stored. The memory is divided into large number of small parts called cells. Each location or cell has a unique address which varies from zero to memory size minus one. For example if computer has 64k words, then this memory unit has 64 * 1024=65536 memory locations. The address of these locations varies from 0 to 65535.There are two main categories of memories:

  • primary memory (internal) that temporarily memorises data while programs are running.

  • secondary memory (auxiliary) that stores information over the long term, including after the computer is turned off.

The main characteristics of a memory are:

Capacity, representing the global volume of information (in bits) that the memory can store

Access time, corresponding to the time interval between the read/write request and the

availability of the data

Cycle time, representing the minimum time interval between two successive accesses

Throughput, which defines the volume of information exchanged per unit of time, expressed in bits per second

Non-volatility, which characterises the ability of a memory to store data when it is not being supplied with electricity

The ideal memory has a large capacity with restricted access time and cycle time, a high throughput and is non-volatile. However, fast memories are also the most expensive. This is why memories that use different technologies are used in a computer, interfaced with each other and organized hierarchically. The fastest memories are located in small numbers close to the processor. Auxiliary memories, which are not as fast, are used to store information permanently.  Primary memory is mainly used by CPU, so it is termed as primary memory. It is also called main memory. Primary memory holds only those data and instructions on which computer is currently working. It has limited capacity and data is lost when power is switched off. It is generally made up of semiconductor device. These memories are not as fast as registers. The data and instruction required to be processed reside in main memory. It is divided into two subcategories RAM and ROM.

Random access memory, generally called RAM is the system's main memory, i.e. it is a space that allows you to temporarily store data when a program is running. Unlike data storage on an auxiliary memory such as a hard drive, RAM is volatile, meaning that it only stores data as long as it supplied with electricity. Thus, each time the computer is turned off, all the data in the memory are irremediably erased.

Read-only memory, called ROM, is a type of memory that allows you to keep the information contained on it even when the memory is no longer receiving electricity. Basically, this type of memory only has read-only access. However, it is possible to save information in some types of ROM memory.

Secondary memory. This type of memory is also known as external memory or non-volatile. It is slower than main memory. These are used for storing data/information permanently. CPU directly does not access these memories instead they are accessed via input-output routines. Contents of secondary memories are first transferred to main memory, and then CPU can access it. For example : Magnetic tapes, Magnetic disks(Hard disk, Floppy disk), Optical disks(CD-ROM, DVD, etc) .

Flash memory is an electronic non-volatile computer storage medium that can be electrically erased and reprogrammed.

Number system. Number system is a writing system for expressing numbers, it is way to represent any number with a certain set of symbols called digits. The total number of digits used in a number system is called its base of number system or radix. Number systems can be categorized into two groups: positional and non-positional systems.

Non-positional called the number system, in which the value of numbers does not depend on its place (position) in a record number. An example nonpositional number system can serve as a Roman. For example, to record the number one use the letter I, two and three look like a set of characters II, III, but for the record number of five selected new symbol V, six - VI, ten - introduced the character X, one hundred - with a thousand – M.

Positional number system is the system in which the value of the digit depends on its place (position) in a record number. Positional number system is familiar to us in everyday life it is decimal system, in which the value (weight) numbers depends on its position in the record number. The Decimal Number System consists of ten digits from 0 to 9. These digits can be used to represent any numeric value. The base of decimal number system is 10. It is the most widely used number system. The value represented by individual digit depends on weight and position of the digit.

All notations used in computer science (binary, octal, hexadecimal) are positional.

The binary number system (base 2).

Almost all modern computers are digital computers, which means that they can recognize only two distinct electronic states of electrical charge. For simplicity, these states are identified as 0 and 1, or equivalently, false and true, or off and on. This means that each digit can have only two possible values. These values are 0 and 1. Binary digits are called bits. System consists of two digits 0 and 1. Its base is 2.

In this system, the individual digits, 0 and 1 represent the coefficient of power of 2. For example, the base-ten "two" (210) is written in binary as 102. Here is a listing of the first few numbers:

decimal (base 10)

binary (base 2)

0

0

1

1

2

10

3

11

4

100

5

101

6

110

7

111

8

1000

9

1001

10

1010

11

1011

12

1100

13

1101

14

1110

15

1111

16

10000

Converting between binary and decimal numbers is fairly simple, as long as you remember that each digit in the binary number represents a power of two.

Convert 1011001012 to the corresponding base-ten number.

List the digits in order, and count them off from the RIGHT, starting with zero:

digits:

1  0   1  1  0  0  1  0  1

numbering:

8  7   6  5  4  3  2  1  0

The first row above (labelled "digits") contains the digits from the binary number; the second row (labelled " numbering") contains the power of 2 (the base) corresponding to each digits. I will use this listing to convert each digit to the power of two that it represents:

1×28 + 0×27 + 1×26 + 1×25 + 0×24 + 0×23 + 1×22 + 0×21 + 1×20

= 1×256 + 0×128 + 1×64 + 1×32 + 0×16 + 0×8 + 1×4 + 0×2 + 1×1

= 256 + 64 + 32 + 4 + 1   = 357

Converting decimal numbers to binaries is nearly as simple: just divide by 2.

Convert 35710 to the corresponding binary number.

To do this conversion, we need to divide repeatedly by 2, keeping track of the remainders as we go. Watch below:

As you can see, after dividing repeatedly by 2, we ended up with these remainders:

1

0

1

1

0

0

1

0

1

These remainders tell us what the binary number is. We read the numbers from around the outside of the division, starting on top and wrapping way around and down the right-hand side. As you can see:

35710 converts to 1011001012.

In binary, 0101 and 101 are the same number. In binary 0010 0011, 0100011, and 100 011 are all the same number.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]