Pages

Monday, January 24, 2011

Touch Pad

A touch pad (also called track pad) is a pointing device consisting of specialized surface that can translate the motion and position of a user’s fingers to a relative position on screen. They are a common feature of laptop computers and also used as a substitute for a computer mouse where desk space is limited. Touch pads vary in size but are rarely made larger than 40 square centimeters (6.3 X 6.3 cm or about 6 inch2). They can also be found on personal digital assistants (PDAs) and some portable media players, such as the ipod using the click wheel. A touchpad is perhaps the most common kind of tactile sensor.

MEMORY HIERARCHY


MEMORY ORGANIZATION AND MEMORY HEIRARCHY

MAIN MEMORY

The main memory is the central storage unit in a computer system. It is a relatively large and fast memory used to store programs and data during the computer operation. The principal technology used for the main memory is based on semiconductor integrated circuits. Integrated circuit RAM chips are available in two possible operating modes, static and dynamic.
The static RAM consists essentially of internal flip-flops that store the binary information. The stored information remains valid as long as power is applied to the unit.
The dynamic RAM stores the binary information in the form of electric charges that are applied to capacitors. The capacitors are provided inside the chip by MOS transistors. The stored charge on the capacitors tend to discharge with time and the capacitors must be periodically recharged by refreshing the dynamic memory. Refreshing is done by cycling through the words every few milliseconds to store the delying charge. The dynamic RAM offers reduced power consumption and larger storage capacity in a single memory chip.
The static RAM is easier to use and has shorter read and write cycles.
Most of the main memory in a general –purpose computer is made up of RAM integrated circuit chips, but a portion of the memory may be constructed with ROM chips. Originally, RAM was used to refer to a random-access memory, but now it is used to designate a read/write memory to distinguish it from a read-only memory, although ROM is also random access. RAM is used for storing the bulk of the programs and data that are subject to change. ROM is used for storing programs that are permanently resident in the computer and for tables of constants that do not change in value once the production of the computer is completed.
The ROM portion of main memory is needed for storing an initial program called a bootstrap loader. The bootstrap loader is a program whose function is to start the computer software operating when power is turned on. Since RAM is volatile, its contents are destroyed when power is turned off. The contents of ROM remain unchanged after power is turned off and on again. The startup of a computer consists of turning the power on and starting the execution of an initial program. Thus, when power is turned on, the hardware of the computer sets the program counter to the first address of the bootstrap loader. The bootstrap program loads a portion of the operating system from disk to main memory and control is then transferred to the operating system, which prepares the computer for general use.
RAM and ROM chips are available in a variety of sizes. If the memory needed for the computer is larger than the capacity of one chip, it is necessary to combine a number of chips to form the required memory size.

AUXILIARY MEMORY

The Auxiliary memory devices used in a computer system are magnetic disk, tapes, magnetic drums and more recently optical disks. The important features of any devices are its access mode, access time, transfer rate, capacity and cost.
The average time to reach a storage location in memory and obtain its contents is the access time. In electro-mechanical devices access time is equal to the sum of seek time (time required to position the read, write heads and on the location) and transfer time(the time required to transfer data to and from any device). Auxiliary storage is logically divided into records or blocks. A record/block consists of a number of words. Input/Output from /on auxiliary memory is always done to enter blocks.

ASSOCIATIVE MEMORY

Many data processing applications require that the time required to find an item stored in memory be reduced to a minimum for efficiency. This can be done if stored data can be identified for access by content of the data rather than by its address. A memory unit addressed by its contents is called associative memory or content addressable memory (CAM). This type of memory can be accessed simultaneously in parallel on basis of data content. When a word is to be written into associative memory no address is specified, it is capable of finding an empty unused location to store the word. When a word is read from the memory, the content or part of the word is specified, the memory hardware locates all words which match the content and mark them for reading.

CACHE MEMORY

Analysis of a large number of typical programs has shown that the reference to memory at any given interval of time tend to be confined within a few localized areas in memory. This phenonmenon is known as the property of locality of reference. The reason for this property may be understood considering that a typical computer program flows in a straight line fashion with program loops and subroutine calls encountered frequently?
When a program loop is executed, the CPU repeatedly refers to the set of instructions in memory that constitute the loop. Every time a given subroutine is called, its set of instructions are fetched from memory. Thus, loops and subroutines tend to localize the references to memory for fetching instructions. To a lesser degree, memory references to data also send to be localized. Table-loopup procedures repeatedly refer to that portion in memory where the table is stored. Iterative procedures refer to common memory locations and array of numbers are confined within a local portion of memory. The result of all these observations is the locality of reference property, which states that over a short interval of time, the addresses generated by a typical program refer to a few localized areas of memory repeatedly, while the remainder of memory is accessed relatively infrequently.
If the active portions of the program and data are placed in a fast small memory, the average memory access time can be reduced, thus reducing the total execution time of the program. Such a fast small memory is referred to as a cache memory. It is placed between the CPU and main memory as shown in the figure. The cache is the fastest component in the memory hierarchy and approaches the speed of CPU components.
The fundamental idea of cache organization is that by keeping the most frequency accessed instructions and data in the fast cache memory, the average age memory access time will approach the access time of the cache. Although the cache is only a small fraction of the size of main memory, a large fraction of memory requests will be found in the fast cache memory because of the locality of reference property of programs.
The basic operation of the cache is as follows. When the CPU needs to access memory, the cache is examined. If the word is found in the cache, it is read from the fast memory. If the word addressed by the CPU is not found in the cache, the main memory is accessed to read the word. A block of words containing the one just accessed is then transferred from main memory to cache memory. The block size may vary from one word(in one just accessed) to about 16 words adjacent to the one just accessed. In this manner, some data are transferred to the cache so that future references to memory find the required words in the fast cache memory
The performance of cache memory is frequently measured in terms of a quantity called hit ratio. When the CPU refers to memory and finds the word in cache, it is said to produce a hit. If the word is not found in cache, it is in main memory and it counts as a miss. The ratio of the number of hits divided by the total CPU references to memory(hits plus misses) is the hit ratio. The hit ratio is best measured experimentally by running representative programs in the computer and measuring the number of hits and misses during a given interval of time. Hit ratios of 0.9 and higher have been reported. This high ratio verified the validity of the locality of reference property.
The average memory access time of a computer system can be improved considerably by use of a cache. If the hit ratio is high enough so that most of the time the CPU accesses the cache instead of main memory, the average access time is closer to the access time of the fast cache memory. For example, a computer with cache access time of 100 ns, a main memory access time of 1000 ns, and a hit ratio of 0.9 produces an average access time of 200 ns. This is a considerable improvement over a similar computer without a cache memory, whose access time is 1000 ns.
The basic characteristic of cache memory is its fast access time. Therefore, very little or no time must be wasted when searching for words in the cache. The transformation of data from main memory to cache memory is referred to as a mapping process. Three types of mapping procedures are of practical interest when considering the organization of cache memory:
1.      Associative mapping
2.      Direct mapping
3.      Set-associative mapping

Memory

Memory Unit : A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out of storage. The memory stores binary information in groups of bits called words. A word in memory is an entity of bits that move in and out of storage as a unit. A memory word is a group of 1’s and 0’s and may represent a number, an instruction code, one or more alphanumeric characters, or any other binary-coded information. There are two types of memories are used in computer systems: 1) Random-Access-Memory(RAM) 2) Read-Only-Memory
Types of ROM : The required path in a ROM may be programmed in three different ways. The first, mask programming, is done by the semiconductor company during the last fabrication process of the unit. The procedure for fabricating a ROM requires that the customer fill out the truth table that he or she wishes the ROM to satisfy. The truth table may be submitted in a special form provided by the manufacturer or in a specified format on a computer output medium. The manufacturer makes the corresponding mask for the paths to produce the 1’s and 0’s according to the customer’s truth table. This procedure is costly because the vendor charges the customer a special fee for custom masking the particular ROM. For this reasons mask programming is economical only if a large quantity of the same ROM configuration is to be ordered.
For small quantities it is more economical to use a second type of ROM called a programmable –read only memory or PROM. When ordered, PROM units contain all the fuses intact, giving all 1’s in the bits of the stored words. The fuses in the PROM are blown by application of current pulses through the output terminals for each address. A blown fuse defines a binary 0 state, and an intact fuse gives a binary 1 state. This allows user to program PROMs in their own laboratories to achieve the desired relationship between the input addresses and stored words. Special instruments called PROM programmers are available commercially to facilitate this procedure. In any case, all procedures for programming ROMs are hardware procedures even though the word “programming” is used.
The hardware procedure for programming ROMs or PROMs is irreversible, and once programmed, the fixed pattern is permanent and cannot be altered. Once a bit pattern has been established, the unit must be discarded if the bit pattern is to be changed. A third type of ROM available is called erasable PROM or EPROM.
The EPROM can be restructured to the initial value even though its fuses have been blown previously. When the EPROM is placed under a special ultraviolet light for a given period of time, the shortwave radiation discharges the internal gates that serve as fuses. After erasure, the EPROM returns to its initial state and can be reprogrammed to a new set of words. Certain PROMs can be erased with electrical signals instead of ultraviolet light. These PROMs are called electrically erasable PROM or EEPROM. Flash memory is a form of EEPROM in which a block of bytes can be erased in a very short duration. Example applications of EEPROM devices are :
1. Storing current time and date in a machine.
2. Storing port statuses
Examples of flash memory device applications are:
1. storing messages in a mobile phone.
2.storing photographs in a digital camera.

Friday, January 21, 2011

Assignment

Assignment -I
1. Explain Computer Organization, Computer Design and Computer Architecture
2. Explain the Evoluation of Computer
3. Explain the Functional Units of Digital Computer With the help of a block diagram
4. Explain the difference between Magnetic Tapes and Magnetic Disks
5. Explain the Instruction Execution steps involved in CPU?
6. Explain the Basic Operational Concepts and Connections between the processor and  the main memory?
7. What do you mean by Logic Gates and Explain with the help of Truth Table?
8. Explain about r's complement and r-1 complement with proper examples.

RISC&CISC

RISC : It means Reduced Instruction Set Computer, it is a computer with fewer instructions with simple constructs, so they can be executed much faster within the CPU without having to use memory as often. This type of computer is classified as a reduced instruction set computer or RISC.
RISC characteristics
1. Relatively few instructions
2. Relatively few addressing modes
3. Memory access limited to load and store instructions
4. All operations done within the registers of the CPU
5. Fixed length, easily decoded instruction format
6. Single cycle instruction execution, relatively large no of registers in the processor unit
7. Hardware rather than micro programmed control
8. RISC systems shorten execution time by reducing the clock cycles per instruction ( that is simple instructions take less time to interrupt)

CISC : It means complex instruction set computer, A computer with large number of instructions is classified as a complex instruction set computer.
Characteristics of CISC
1. A large number of instructions typically from 100 to 250 instructions
2. A large variety of addressing mode typically from 5 to 20 different modes
3. Some instructions that perform specialized tasks and are used frequently
4. Variable length instruction format
5. Instructions that manipulate operands in memory.
6. Includes multi-clock complex instructions Memory-to-memory: "LOAD" and "STORE" incorporated in instructions
7. Usually implemented as micro programmed control to tackle the variable length instructions.
8. CISC systems shorten execution time by reducing the number of instructions per program


Wednesday, January 5, 2011

FETCH-DECODE AND EXECUTE CYCLE

BASIC OPERATIONAL CONCEPTS
Connections between the processor and the main memory



In Addition to the ALU and CU, The processor contains a number of register used for several different purposes.
The PC (Program Counter) contains the memory address of the instruction to be executed. During execution, the contents of the PC are updated to point to the next instruction. Every time that an instruction is to be executed, the program counter releases its contents to the internal bus and sends it to the memory address register.
The MAR (Memory Address Register) holds the address of the location to or from which data are to be transferred. As can be seen from the figure above, the connection of the MAR to the main memory is one-way or unidirectional.
The MDR (Memory Data Register) contains the data to be written or read out of the addressed location.
During the fetch operation, the MDR contains the instruction to be executed or data needed during execution. In write operation, MDR the data to be written into the main memory.
The IR (Instruction Register) contains the instruction that is being executed. Before the IR executes the instruction it needs to be decoded first. As soon as the content of the MDR is transferred to the IR, the decoding process commences. After decoding, execution of the instruction will take place.
Operating Steps
1. PC is set to point to the first instruction of the program (the operating system loads the memory address of the first instruction).
2. The contents of the PC are transferred to the MAR (which is automatically transmitted to the MM) and a Read signal is sent to the MM (Main Memory).
3. The addressed word is read out of MM and loaded into the MDR.
4. The contents of MDR are transferred to the IR. The instruction is ready to be decoded and executed.
5. During execution, the contents of the PC are incremented or updated to point to the next instruction.
Example
Enumerate the different steps needed to execute the machine instruction
ADD LOCA, R0
Assume that the instruction itself is stored in the main memory at location INSTR, and that this address is initially in register PC. The first two steps might be expressed as:
1. Transfer the contents of register PC to register MAR.
2. Issue a READ command to the main memory, and then wait until it has transferred the requested word into register MDR.
CPU Instruction Execution Steps
Instruction execution in a CPU can now be summarized by the following steps:
1. Fetching the instruction from the memory into the instruction register.
2. Incrementing the PC to point to the next instruction to be executed.
3. Determining the type of instruction fetched (instruction decoding).
4. Determining the location of data in the memory. If the instruction uses data.
5. Fetching the required data into internal CPU registers.
6. Executing the instruction.
7. Storing the results in the designated locations.
8. Return to Step 1.
This is commonly referred to as the fetch-decode-execute cycle.

BASIC FUNCTIONS OF A COMPUTER

FUNCTIONAL UNITS: A Computer consists of five functionally independent main parts 1) input 2) memory 3) arithmetic and logic 4) control 5) output. The input unit accepts coded information from human operators, from electromechanical devices such as keyboards, or from other computers over digital communication lines. The information received is either stored in the computer’s memory for later reference or immediately used by the arithmetic and logic circuitry to perform the desired operations. The processing steps are determined by a program stored in the memory. Finally, the results are sent back to the outside world through the output unit. All of these actions are coordinated by the control unit.
Input unit: Computers accept coded information through input units, which read the data. The most well-known input device is the keyboard. Whenever a key is pressed, the corresponding letter or digit is automatically translated into its corresponding binary code and transmitted over a cable to either the memory or the memory or the processor.
Many other kinds of input devices are available, including joysticks, trackballs and mouse. These are often used as graphic input devices in conjunction with displays. Microphones can be used to capture audio input which is then sampled and converted into digital codes for storage and processing.
Memory Unit: The function of the memory unit is to store programs and data. There are two classes of storage, called primary and secondary.
Primary storage is a fast memory that operates at electronic speeds. Programs must be stored in the memory while they are being executed. The memory contains a large number of semi conductor storage cells. Each capable of storing one bit of information. These cells are rarely read or written as individual cells but instead are processed in groups of fixed size called words. The memory is organized so that the contents of one word, containing n bits, can be stored or retrieved in one basic operation.
To provide easy access to any word in the memory, a distinct address is associated with each word location. Addresses are numbers that identify successive locations. A given word is accessed by specifying its address and issuing a control command that starts the storage or retrieval process.
The number of bits in each word is often referred to as the word length of the computer. Typical word lengths range from 16 to 64 bits. The capacity of the memory is one factor that characterized the size of a computer. Small machines typically have only a few tens of millions of words, whereas medium and large machines normally have many tens or hundreds of millions of words. Data are usually processed within a machine in units of words, multiples of words, or parts of words. When the memory is accessed, usually only one word of data is read or written.
Programs must reside in the memory during execution. Instructions and data can be written into the memory or read out under the control of the processor. It is essential to be able to access any word location in the memory as quickly as possible. Memory in which any location can be reached in a short and fixed amount of time after specifying its address is called random access memory (RAM). The time required to access one word is called the memory access time. This time is fixed, independent of the location of the word being accessed. It typically ranges from a few nanoseconds (ns) to about 100 ns for modern RAM units. The memory of a computer is normally implemented as a memory hierarchy of three or four levels of semiconductor RAM units with different speeds and sizes. The small, fast, RAM units are called caches. They are tightly coupled with the processor and are often contained on the same integrated circuit chip to achieve high performance. The largest and slowest unit is referred to as the main memory. Secondary storage is used when large amount of data and many programs have to be stored, particularly for information that is accessed infrequently. A wide selection of secondary storage devices is available, including magnetic disks and tapes and optical disks (CD-ROMS).
ARITHMETIC AND LOGIC UNIT: Arithmetic and logic unit performs arithmetic operations and logical decisions. Suppose two numbers located in the memory are to be added. They are brought into the processor, and the actual addition is carried out by the ALU. The sum may be stored in the memory or retained in the processor for immediate use.
Any other arithmetic or logic operations, for example multiplication, division or comparison of numbers are initiated by brining the required operands into the processor, where the operation is performed by the ALU. When operands are brought into the processor, they are stored in high-speed storage elements called registers. Each register can store one word of data. Access times to registers are somewhat faster than access times to the fastest cache unit in the memory hierarchy.
The control and the arithmetic and logic units are many times faster than other devices connected to a computer system. This enables a single processor to control a number of external devices such as keyboards, displays, magnetic and optical disks, sensors, and mechanical controllers.
Output Unit: The output unit is the counter part of the input unit. It function is to send processed results to the outside world. The most familiar example of such a device is a printer. Any peripheral that receives or displays output from a computer.
Control Unit: The memory, arithmetic and logic, and input and output units store and process information and perform input and output operations. The operation of these units must be coordinated in some way. This is the task of the control unit. The control unit is effectively the nerve center that sends control signals to other units and senses their states.
I/O transfers, consisting of input and output operations, are controlled by the instructions of I/O programs that identify and devices involved and the information to be transferred. However, the actual timing signals that govern the transfers are generated by the control circuits. Timing signals are signals that determine when a given action is to take place. Data transfers between the processor and the memory are also controlled by the control unit through timing signals. It is reasonable to think of a control unit as a well-defined, physically separate unit that interacts with other parts of the machine.
The operations of a computer can be summarized as follows:
•The computer accepts information in the form of programs and data through an input unit and stores it in the memory.
•Information stored in the memory is fetched, under program control, into an arithmetic and logic unit. Where it is processed.
•Processed information leaves the computer through an output unit.
•All activities inside the machine are directed by the control unit.

Introduction to Digital Gates

The AND gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false."

AND gate


Input1 Input2 Output
0 0 0
0 1 0
1 0 0
1 1 1


The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."


OR gate


Input1 Input2 Output
0 0 0
0 1 1
1 0 1
1 1 1


The XOR ( exclusive-OR ) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.






XOR gate
Input1 Input2 Output
0 0 0
0 1 1
1 0 1
1 1 0


A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.





Inverter or NOT gate

Input Output
1 0
0 1


The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."



NAND gate
Input 1 Input 2 Output
0 0 1
0 1 1
1 0 1
1 1 0


The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false."


NOR gate


Input 1 Input 2 Output
0 0 1
0 1 0
1 0 0
1 1 0


The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and"false" if the inputs are different.



XNOR gate

Input1 Input2 Output
0 0 1
0 1 0
1 0 0
1 1 1

Using combinations of logic gates, complex operations can be performed. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space. Arrays of logic gates are found in digital integrated circuits (ICs). As IC technology advances, the required physical volume for each individual logic gate decreases and digital devices of the same or smaller size become capable of performing ever-more-complicated operations at ever-increasing speeds.

Introduction to Digital Computers


Digital Computers:  The digital computer is a digital system that performs various computational tasks. The word digital implies that the information in the computer is represented by variables that take a limited number of discrete values. These values are processed internally by components that can maintain a limited number of discrete states. The decimal digits 0, 1, 2…9 for example, provide 10 discrete values. The first electronic digital computers, developed in the late 1940s, were used primarily for numerical computations. In this case the discrete elements are the digits. From this application the term digital computer has emerged.  In practice, digital computers function more reliably if only two states are used. Because of the physical restriction of components, and because human logic tends to be binary (that is true or false, yes or no statements), digital components that are constrained to take discrete values are further constrained to take only two values and are said to be binary.  Digital computers use the binary number system, which has two digits: 0 and 1. A Single binary digit is called a bit.  A nibble is half a byte, or four bits. A word is the default data size for a processor. The default size does not apply in all cases. The word size is chosen by the processor’s designer(s) and reflects some basic hardware issues (such as internal or external buses). The most common word sizes are 16 and 32, but words have ranged from 16 to 60 bits. Typically there will be additional data sizes that are defined relative to the size of a word: halfword, half the size of a word; longword, usually double the size of a word; doubleword, usually double the size of a word (sometimes double the size of a longword); and quadword, four times the size of a word. Whether or not there is a space between the size designation and “word” is designated by the manufacturer, and varies by processor.
A sequence of instructions for the computer is called a Program. The data that are manipulated by the program constitute the data base.
A computer system is composed of its hardware and the system software available for its use. The system software of a computer consists of a collection of programs whose purpose is to make more effective use of the computer. The programs included in a systems software package are referred to as the operating system.
Computer Organization is concerned with the way the hardware components operate and the way they are connected together to form the computer system. The various components are assumed to be in place and the task is to investigate the organizational structure to verify that the computer parts operate as intended.  
Computer Design is concerned with the hardware design of the computer. Once the computer specifications are formulated, it is the task of the designer to develop hardware for the system. Computer design is concerned with the determination of what hardware should be used and how the parts should be connected. This aspect of computer hardware is sometimes referred to as computer implementation.                                                    
     Computer Architecture is concerned with the structure and behavior of the computer as seen by the user. It includes the information, formats, the instruction set, and techniques for addressing memory. The architectural design of a computer system is concerned with the specifications of the various functional modules, such as processors and memories, and structuring them together into a computer system.
Logic Gates:  Binary logic deals with binary variables and with operations that assume a logical meaning. It is used to describe, in algebraic or tabular form, the manipulation and processing of binary information. The manipulation of binary information is done by logic circuits called gates.  Gates are blocks of hardware that produce signals of binary 1 or 0 when input logic requirements are satisfied. A variety of logic gates are commonly used in digital computer systems. Each gate has a distinct graphic symbol and its operations can be described by means of an algebraic expression. The input-output relationship of the binary variables for each gate can be represented in tabular form by a truth table.