The primary functionality of each computer registers is given below. Each register is related to other in such a way that it pass instructions code or data to other registers.
Computer Registers Organization
The registers work together and they are organized in a particular way. See the figure below to understand their relationship. Each of the boxes is colored to show the affinity of a register to others registers, all single colored are directly related.
You can see that the memory units are kept separate and the accumulator which a type of register perform computation provided by data registers (operands), so they are kept together.
The rest of the registers are used for fetching, reading and decoding instruction. This is what is called the fetch-decode-execute cycle.
Mano, M. Morris. 1984. Digital Design. Pearson.
Mano, Morris. 1976. Computer System Architecture. Prentice Hall.
In the previous lesson, you learned about hardware part of a system. If you leave I/O then only CPU and memory is left in the system. In this lesson, you learn the relationship of CPU (Processor) with memory by understanding activities of a CPU.
The main function of CPU is to execute a program which is nothing but a set of instructions and data. A CPU gets the instruction as part of the response from memory.
Every memory location has an address. At this address, the instruction is located which gets as a response from memory. Sometimes the response is a data or operand.
Two major instruction processing phase of CPU is
During the execute phase, the data is fetched and operation is carried out on the data or operand. This major phase is known as Instruction Cycle.
The whole cycle is FETCH – DECODE – EXECUTE.
Suppose there is an instruction that fetch 3 unit of information and 3 unit for execute phase. Fetching one unit of information from memory over bus (called bus activity) which will be completed called Machine Cycle.
It is also possible that each machine cycle is divided into steps of small activities called the state of the processor. This small activity is controlled by the Basic clock of the computer.
Because the programs and data are stored, you have a Stored Program Digital Computer. This is known as VON NEUMANN Architecture, named after mathematician and physicist John von Neumann.
It is logical to say that CPU registers, bus width, and memory should be of an n-bit word, but not necessary. If registers in CPU have instructions and data, it need not fetch from memory.
CPU always gets what it does not have. Once it has everything then the execute phase happens.
There may be one operand, two operands in the instruction. Also, there is zero operand instructions
for example, ADD R1 R2 where R1 and R2 are two operands.
Finally, instructions always start with decoding the instructions.
In the previous lesson, you were introduced to the computer organization. You learned about system hardware and main components that make a computer system and software layer to help a user interact with the computer system. In this article, you will learn about the hardware part of the system in more detail.
The system hardware consists of following at a minimum.
The keyboard, display and printing devices need an interface to interact with the system and I/O board provide that interface for communication.
Keyboard generates ASCII codes for a system and by looking at the codes from the keyboard the CPU knows what the character is. The communication with the CPU and devices must be standardized and uniform. That is why all modern systems have device controllers so that the details of the device is hidden from the system.
There are many types of devices available today. You will find a variety of printers, display devices, newer CPUs and upgraded memory and storage units. All these variations in devices are handled by the I/O interface provided by the system.
Display Device Types
Note: They both are different because their processing inputs are different.
When you think of memory, consider following.
The high speed memory effect the size and the cost. The cost of high speed memory is high and size is less. The cost per bit of storage is higher near CPU and less near hard disk.
The following diagram shows the memory hierarchy.
Let us give a small summary of different types of memory.
100’s of MB
2 – 10 milli-secs
Technology classification of Memory
Dynamic RAM – It is a slower RAM than static.
Static RAM – It is a faster RAM.
Technology classification of Storage.
Storage also need I/O interface to communicate with the system. The system inputs are already stored in files and output from system is stored in these files again.
Classification of I/O interface
You can classify I/O interface into two.
As part of Operating system, there will be IO routines and software called device drivers.
You must ask this question – Why do we have networked computers?
There are only three reasons for a computer to establish a network.
In this article, you will begin learning Computer Organization. You appreciate the complexity involved in building a basic computer and type of specialize components required to make a computer.
The entire computing machine comes down to two important thing – Processor (or CPU) and Memory. A computer cannot function without these minimum components. The purpose of the computer is to interact with humans, I/O system works like an extended memory and helps computers to interact with humans.
CPU deals with I/O in the same way as with memory.
Computer Architecture vs Computer Organization
Computer architecture is from a designer point of view mostly deals with computer hardware system. Computer Organization is from a user point of view, mostly deals with software. The users are programmers.
Where do you use such a system? They are basically of two types.
1. Control Applications – Purpose is specific for these type of applications.
eg. ROM (read-only memory has fixed routine)
2.Data processing applications – General Purpose program for users comes under this category.
eg. RAM is software oriented and basically, run different programs from many users.
Both are complementary to each other. The focus of computing is shifted to storage and retrieval. But memory and storage devices must keep up with the processor or CPU. Arithmetic Logic Unit( ALU ) is the core of CPU. The arithmetic part of ALU does the arithmetic processing and logic part of ALU does logic processing of symbols.
Architecture Point of View
The hardware is the core of the system, however, it is very difficult for users to interact with hardware directly. So a software layer is added to soften the hardware aspect of the computing system. You know this layer as operating systems.
No matter how many layers you add to the hardware, the computer instructions are translated to machine code, the only language hardware understands. Users/programmer must know about machine code which is in a binary number.
You can see that the machine codes are difficult for human and nobody can remember such codes. Instead of using machine codes, we can use mnemonic codes.
ADD A, B
where ADD is a code and instruction to add contents of A and B.
The layers added to ease the interaction with hardware are given below.
Some examples of HLL are as follows.
The user/programmer writes the code in HLL and a translator software converts codes between the “coding systems”.
There are many translators at the different layer between coding systems.
Translator between machine code and assembly is called an “Assembler“.
Translator between high level language and assembly is called a “Compiler“.
An interpreter is a program that directly executes the code without compiling it into a machine code.
From the concept of a machine that consists of hardware such as CPU, memory, I/O we are moving towards System. A system has now compilers, assemblers, and interpreters to work with. You can develop programs that are available to users all the time and part of the system.
For I/O system, you can write routines, utility programs for devices and system libraries of programs. For example, Keyboard routines, Display routines, etc.
Users do not bother about hardware and they interact with OS now. For the same hardware, you can install many types of OS which issues different types of commands.
Relation between HLL and Machine Code
A user/programmer writes a program called the source code stored in a source file. The source code is translated into binary code or machine code and stored in object files.
There are many types of systems available for users. They are listed below.
BATCH PROCESSING – It is a single user system.
TIME SHARING – It is a multi-user system.
PROCESS CONTROL – Do active processing of data.
REAL TIME – Not only process data but return processed information in real time.
DISTRIBUTED SYSTEM – Many system collectively act as a single system.
NETWORKED OS – networked based operating system.
All OS are different, but if the OS has too many layers, then the response will slow. Systems closer to hardware can be very fast. For example, Real-time systems.
Computer systems are made of many components and each has a function. You can also call these components as functional units. Memory, CPU, Disks, Input-output devices are some examples of these functional units.
Computer organization is all about how these functional units are organized and how they interact with each other in an overall working of a computer system.
To learn computer organization and architecture, you must be familiar with fundamental concepts of digital design. Some understanding of computer system is necessary to get started.
Each topic below contains articles or lessons. You can start reading from top(easy) to bottom(difficult). You must be familiar with digital design concepts before learning from this tutorial.