Вы находитесь на странице: 1из 90

Skill Based Elective II:

Basics of Hardware

Unit I: Number systems Decimal, Binary, Octal, Hexadecimal Conversions LOGIC GATES Universal GATES NAND - NOR Karnaugh maps - Tabulation and Simplifications-Basics of Sequential and Combinational logic Multiplexer and Demultiplexer basics - GRAY code ASCII code representation Unit II: Introduction to Memories Types of memories Registers Caches Primary and Secondary memory - Associative memory Virtual memory Optical discs Flash memory systems Unit - III: Basic computer hardware architecture - Functional units Instruction formats types Addressing modes - Basic I/O devices Keyboard Console systems Mouse Printer plotters Scanners Basic CPU architecture Unit IV: Connecting & disconnecting computer peripherals and components & driver installation Hard disk partitioning and formatting Unit V: NTFS O.S installation like Linux, UNIX Internal component assembling and dissembling

UNIT-1: Number Systems:


Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems. The decimal system is clearly the most familiar to us because it is a tool that we use every day. Examining some of its characteristics will help us to better understand the other systems. which we will look at briefly.

Decimal Binary Octal Hexadecimal

In general, in any number system there is an ordered set of symbols known as digits with rules defined for performing arithmetic operations like addition, subtraction, multiplication and division. A collection of these digits makes a number which in general has two parts integer and fractional, set a part by a radix point ( . ), that is (N) b = d n-1, d n-2 ---- d 2, ...... d 1, ........ d 0 . d -1, d -2 ...... d -f ...... d -m Interger portion redix Point fractional portion

The digits in a number are placed side by side and each position in the number is assigned a weight or index. Following table gives the details of commonly used number systems.
Number system Binary Octal Decimal Hexadecimal 2 8 10 16 Base or radix(b) symbol used 0,1 0,1,2,3,4,5,6,7 0,1,2,3,4,5,6,7,8,9 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F weight assigned to position 2 i . 2-f 8 i . 8-f 10 i . 10-f 16 i . 16-f example 1011.11 3567.25 3974.57 3FA9.56

Decimal Number System: The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Using these symbols as digits of a number, we can express any quantity. The decimal system is also called the base-10 system because it has 10 digits. How to we form combinations of decimal digits to get 10, 11, 12 and so on. The following example explains it. 9 is highest value and add another one decimal digit 1, So roll back the digit 9 to 0 and add a carry of 1 to the next digit position. 9 +1 10

3
The same process performs 99+1, 999+1 and so on. 103 =1000 Most Significant Digit 102 =100 101 =10 100 =1 10-1 =0.1 10-2 10-3 =0.01 =0.001 Least Significant Digit

. Decimal point

Even though the decimal system has only 10 symbols, any number of any magnitude can be expressed by using our system of positional weighting. Example: 3125.9510 45.8978010 Binary Number System: The word binary comes from "Bi-" meaning two. We see "bi-" in words such as "bicycle" (two wheels) or "binocular" (two eyes). The number system with base (or radix ) two is known as the binary number system. Only two symbols are used to represent numbers in this system and these are 0 and 1. The binary digits or symbols are called bits. The word bit contraction of the two words binary and digit. It is a positional system that is every position is assigned a specific weight. Following table illustrates counting in binary number system. The corresponding decimal numbers are given in the right hand column. Similar to decimal number system the left most bit is known as most significant bit ( MSB) and the right most bit is known as the least significant bit(LSB). Any number of Os can be added to the left of the number without changing the value of the number. A group of four bits is known as nibble and a group of eight bits is known as a byte. Binary number 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Decimal Number 0 1 2 3 4 5 6 7 8 9 0 11 12 13 14 15

Representation A binary number can be represented by any sequence of bits (binary digits), which in turn may be represented by any mechanism capable of being in two mutually exclusive states. The following sequences of symbols could all be interpreted as the binary numeric value of 667:
1 | x y 0 o n 1 | x y 0 o n 0 o n 1 | x y 1 | x y 0 o n 1 | x y 1 | x y

The numeric value represented in each case is dependent upon the value assigned to each symbol. In a computer, the numeric values may be represented by two different voltages; on a magnetic disk, magnetic polarities may be used. A "positive", "yes", or "on" state is not necessarily equivalent to the numerical value of one; it depends on the architecture in use. In keeping with customary representation of numerals using Arabic numerals, binary numbers are commonly written using the symbols 0 and 1. When written, binary numerals are often subscripted, prefixed or suffixed in order to indicate their base, or radix. The following notations are equivalent: 100101 binary (explicit statement of format) 100101b (a suffix indicating binary format) 100101B (a suffix indicating binary format) bin 100101 (a prefix indicating binary format) 1001012 (a subscript indicating base-2 (binary) notation) %100101 (a prefix indicating binary format) 0b100101 (a prefix indicating binary format, common in programming languages) When spoken, binary numerals are usually read digit-by-digit, in order to distinguish them from decimal numbers. For example, the binary numeral 100 is pronounced one zero zero, rather than one hundred, to make its binary nature explicit, and for purposes of correctness. Since the binary numeral 100 is equal to the decimal value four, it would be confusing to refer to the numeral as one hundred. Octal Number System: The number system with base ( or redixy) eight is known as the octal number system. In this system eight symbols, 0, 1, 2, 3, 4, 5, 6, and 7 are used to represent the number. 0 having the least value and 7 having the greatest value. Columns are used in the same way as in the decimal system, in that the left most column is used to represent the greatest value. Decimal Number 0 1 2 3 4 5 Octal 0 1 2 3 4 5

5
6 7 8 9 0 11 12 13 14 15 Application of octal number system: It is highly in convenient to handle long strings of binary numbers while entering into the digital systems. It may cause errors also. Therefore, octal numbers are used for entering binary data and displaying certain information. Octal was used extensively in early mainframe computer systems, but has become less popular in favour of binary and hexadecimal today. Example: 127668 6128 Hexadecimal Number System: hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a to f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 163) + (10 162) + (15 161) + (3 160), or 10,995. Each hexadecimal digit represents four binary digits (bits) (also called a "nibble"), and the primary use of hexadecimal notation is as a human-friendly representation of binary coded values in computing and digital electronics. For example, byte values can range from 0 to 255 (decimal) but may be more conveniently represented as two hexadecimal digits in the range 00 through FF. Hexadecimal is also commonly used to represent computer memory addresses. Decimal Number 0 1 2 3 4 5 6 7 8 9 0 11 12 13 Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D 6 7 10 11 12 13 14 15 16 17

6
14 15 Example: 0AB6DH16 E F

Conversation
1) Binary to Decimal Conversation:
Any binary number can be converted into its equivalent decimal number using the weights assigned to each bit position. Since only two digits are used, the weights are powers of 2. these weights are 2 0 ( Units ), 21 ( two s), 22 ( fours ) 23 ( eights ) and 24 ( sixteen ). If longer binary number involved, the weights continue in ascending powers of 2. The decimal equivalent of a binary number equals the sum of all binary number equal the sum of all binary digits multiplied by their weights. To convert binary into decimal is very simple and can be done as shown below: Say we want to convert the 8 bit value 10011101 into a decimal value, we can use a formula like that below:
128 64 32 16 8 4 2 1 0 0 1 1 1 0 1 1

As you can see, we have placed the numbers 1, 2, 4, 8, 16, 32, 64, 128 (powers of two) in reverse numerical order, and then written the binary value below. To convert, you simply take a value from the top row wherever there is a 1 below, and then add the values together. For instance, in our example we would have 128 + 16 + 8 + 4 + 1 = 157. For a 16 bit value you would use the decimal values 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 (powers of two) for the conversion. Because we know binary is base 2 then the above could be written as: 1*27 + 0*26 + 0*25 + 1*24 + 1*23 + 1*22 + 0*21 + 1*20 = 157. Example 1: Find the decimal equivalent of binary number 111112 Solution: 111112 = 1 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 1 x 20 = 16 + 8 + 4 + 2 + 1 = (31)10 The steps involved in fast and easy conversion. 1. Write the binary number 2. Write the weights 1, 2, 4, 8 under binary digits. 3. Cross out any weight under a 0. 4. Add the remaining weights.

Example 2: 101101. 10101 Solution: (101101. 10101) 2 = 1x25 + 0x24 + 1x23 + 1x22 + 0x21 +1x24 + 1x2-1 + 0x2-2 + 1x2-3 + 0x2-4 + 1x2-5 = 32 + 0 + 8 + 4 + 0 + 1 + 1/2 + 0 + 1/8 + 0 + 1/32 = (65625.45)10 Example 2: (1001. 0101) 2 = 8 + 0 + 0 + 1+ 0 + 0.25 + 0 + 0.625 = (3125.9)10

2) Decimal to Binary Conversation:


Any decimal number can be converted into its equivalent binary number. For integers, the conversion is obtained by contineous division by 2 and keeping track of the remainders, while for fractional parts, the conversion is effected by continuous multiplications by 2 and keeping track of the integers generated. The conversion process is illustrated by the following examples. To convert decimal to binary is also very simple, you simply divide the decimal value by 2 and then write down the remainder, repeat this process until you cannot divide by 2 anymore, for example let's take the decimal value 157:
157 2 = 78 78 2 = 39 39 2 = 19 19 2 = 9 92=4 42=2 22=1 12=0 with with with with with with with with a a a a a a a a remainder remainder remainder remainder remainder remainder remainder remainder of of of of of of of of 1 0 1 1 1 0 0 1

<--- to convert write this remainder first.

Next write down the value of the remainders from bottom to top (in other words write down the bottom remainder first and work your way up the list) which gives: 10011101 = 157 How to convert decimal 1310 to its binary equivalent. 2 2 2 2 2 13 6 3 1 0 1 0 1 1

1310 = 1 1 0 12 Read down to up of remainders which is equalent to binary number.

Example 1: Convert ( 0.65625) 10 to an equivalent base 2 number Solution: 0.65625 0.31250 0.62500 0.250000.50000 X2 x2 x2 x2 x2 1.31250 0.62500 1.25000 0.500001.00000 1 0 1 0 0 Thus, ( 0.62500 ) 10 = ( 0.10101 ) 2 Example 1: Convert ( 13. 625) 10 to an equivalent base 2 number 2 13 2 2 2 2 6 3 1 0 1 0 1 1

Thus, (13)10 = (1 1 0 1)2 Fractional part. 0.625 x2 1.250 1 0.250 x2 0.500 0 0.500 x2 1.000 1

Thus, (0.625)10 = (0. 1 0 1)2 Therefore, (10.625) 10 = (1010.101) 2 3) Octal to Decimal Conversation: Similar to decimal and binary number systems, it is also a positional system and has, in general, two parts : Integer and fractional , set a part by a radix point. Decimal Form = (ai x 8i) In this formula, 'a' is the individual digit being converted, while 'i' is the number of the digit counting from the right-most digit in the number, the right-most digit starting with 0. For example convert (765)8 into decimal: (765)8 = (7 x 82) + (6 x 81) + (5 x 80) = (7 x 64) + (6 x 8) + (5 x 1) = 448 + 48 + 5 = 501 Hence (765)8 = (501)10 For example: ( 6327. 4051) 8 ( 6327. 4051) 8 = (6 x 83) + (3 x 82) + (2 x 81) + (7 x 80) + (4 x 8-1) + (0 x 8-2) + (5 x 8-3) + (1x8-4) = 3072 + 192 + 16 + 7 + 4/8 + 0 + 5/512 + 1/4096 = (3287. 5100098) 10

9
Example: Convert 24.368 to decimal:

Solution: 24.368 equals 20.4687510

4) Decimal to Octal Conversation: The conversion from decimal to octal is similar to the conversion procedure from decimal to binary. The only difference is that number 8 is used tin place of 2 for division in the case of integers and for multiplication in the case of fractional numbers. Example: Convert 24710 into octal 8 8 8 8 247 30 3 0 7 6 3

Solution: 24710 equals to 7638 Convert 12.6875 10 into octal 8 8 8 0.6 8 7 5 x8 5.5 0 0 0 5 12 1 0 4 3

0.5000 x8 4. 0 0 0 0 4

Solution: 12.687510 equals to 438

5) Decimal to Hexadecimal Conversation:


Steps: 1. Divide the decimal number by 16. Treat the division as an integer division. 2. Write down the remainder (in hexadecimal).

10
3. Divide the result again by 16. Treat the division as an integer division. 4. Repeat step 2 and 3 until result is 0. 5. The hex value is the digit sequence of the remainders from the last to first. Example: convert the 95.0510 into hexadecimal number. 16 16 16 95 5 0 15 5

Thus 9510 = 5F16 Fraction part: 0.5 x16 8.0

Thus 0.510 = 0.816 Therefore 95.0510 = 5F.816 6) Hexadecimal to Binary Conversion:

7)

Hexadecimal numbers can be converted into equivalent binary numbers by replacing each hex digit by its equivalent 4 bit binary numbers.

Example 1.18: convert 2F 9A16 find the binary equivalent of each hex digit. 2F 9A16 = 1010 1001 1111 00102 = (0110100010111110)2

Logic Gates
Logic gates: Circuits used to process digital signals are called logic gates. Logic symbols are used to identify these circuits. They have one or more input signals but only one output signal. Gates are often called logic circuits because they can be analyzed with Boolean algebra. A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. The logic is called Boolean logic and is most commonly found in digital circuits. Logic gates are primarily implemented electronically using diodes or transistors, but can also be constructed using electromagnetic relays (relay logic), fluidic logic, pneumatic logic, optics, molecules, or even mechanical elements.

AND gate: The AND gate is a digital logic gate that implements logical conjunction - it behaves according to the truth table.

11
Truth Table INPUT OUTPUT A B A AND B 0 0 0 0 1 0 1 0 0 1 1 1

AND gate

A HIGH output (1) results only if both the inputs to the AND gate are HIGH (1). If neither or only one input to the AND gate is HIGH, we get a LOW output (0) results. In another sense, the function of AND effectively finds the minimum between two binary digits, just as the OR function finds the maximum.

OR gate The OR gate is a digital logic gate that implements logical disjunction - it behaves according to the truth table. Truth Table I N P U T OUTPUT A B A+B 0 0 0 0 1 1 1 0 1 1 1 1

OR gate

A HIGH output (1) results if one or both the inputs to the gate are HIGH (1). If neither or both inputs are LOW, we get a LOW output (0) results. In another sense, the function of OR effectively finds the maximum between two binary digits, just as the complementary AND function finds the minimum.

Inverter (logic gate): In electronics a NOT gate is more commonly called an inverter, an inverter or NOT gate is a logic gate which implements logical negation. The truth table INPUT OUTPUT A NOT A 0 1 1 0

Traditional NOT Gate (Inverter) symbol

NOT gate reverse the input signal value. If the input value is 1 the output value is 0. If the input value is 0, then the output value is 1. Whatever the input signal is the output is always the opposite.

12
This represents perfect switching behavior, which is the defining assumption in Digital electronics. In practice, actual devices have electrical characteristics that must be carefully considered when designing inverters. In fact, the non-ideal transition region behavior of a CMOS inverter makes it useful in analog electronics as a class A amplifier. Negated AND(NAND) gate: The Negated AND, NO AND or NAND gate is the opposite of the digital AND gate, and behaves in a manner that corresponds to the opposite of AND gate, as shown in the truth table. INPUT OUTPUT A B A NAND B 0 0 1 0 1 1 1 0 1 1 1 0

NAND gate

A LOW output results only if both the inputs to the gate are HIGH (1). If one or both inputs are LOW (0), a HIGH output (1) results. The NAND gate is a universal gate in the sense that any boolean function can be implemented by NAND gates. Digital systems employing certain logic circuits take advantage of NAND's functional completeness. In complicated logical expressions, normally written in terms of other logic functions such as AND, OR, and NOT, writing these in terms of NAND saves on cost, because implementing such circuits using NAND gate yields a more compact result than the alternatives. NAND gates can also be made with more than two inputs, yielding an output of LOW if all of the inputs are HIGH, and an output of HIGH if any of the inputs is LOW. These kinds of gates therefore operate as n-ary operators instead of a simple binary operator. Algebraically, these can be expressed as the function NAND

NOR gate: The NOR gate is a digital logic gate that implements logical NOR - it behaves according to the truth table. INPUT OUTPUT A B A NOR B 0 0 1 0 1 0 1 0 0 1 1 0

NOR gate

A HIGH output (1) results if both the inputs to the gate are LOW (0). If one or both input is HIGH (1), a LOW output (0) results. NOR is the result of the negation of the OR operator. NOR is a functionally complete operation - combinations of NOR gates can be combined to generate any other logical function. By contrast, the OR operator is monotonic as it can only change LOW to HIGH but not vice versa. In most, but not all, circuit implementations, the negation comes for freeincluding CMOS and TTL. In such logic families, the only way to implement OR is with 2 or more gates, such as a NOR followed by an inverter. A significant exception is some forms of the domino logic family.

13
XOR gate: The XOR gate (sometimes EOR gate, or EXOR gate) is a digital logic gate that implements an exclusive disjunction; that is, it behaves according to the truth table. INPUT OUTPUT A B A XOR B 0 0 0 0 1 1 1 0 1 1 1 0

XOR Symbol

A true output (1) results if one, and only one, of the inputs to the gate is true (1). If both inputs are false (0) or both are true (1), a false output (0) results. A way to remember XOR is "one or the other but not both". It represents the inequality function, i.e., the output is HIGH (1) if the inputs are not alike otherwise the output is LOW (0). This function is addition modulo 2. As a result, XOR gates are used to implement binary addition in computers. A half adder consists of an XOR gate and an AND gate. XNOR gate: The XNOR gate (sometimes spelled "exnor" or "enor") is a digital logic gate whose function is the inverse of the exclusive OR (XOR) gate. The two-input version implements logical equality, behaving according to the truth table. XNOR Truth Table Input Output A B 0 0 1 1 0 1 0 0 1 1 1

XNOR Symbol

A HIGH output (1) results if both of the inputs to the gate are the same. If one but not both inputs are HIGH (1), a LOW output (0) results.

Karnaugh map:
The Karnaugh map (K-map for short), Maurice Karnaugh's 1953 refinement of Edward Veitch's 1952 Veitch diagram, is a method to simplify Boolean algebra expressions. The Karnaugh map reduces the need for extensive calculations by taking advantage of humans' pattern-recognition capability, permitting the rapid identification and elimination of potential race conditions. The Karnaugh map provides a simple and straight-forward method of minimising boolean expressions. With the Karnaugh map Boolean expressions having up to four and even six variables can be simplified.

14
What is a Karnaugh map? A Karnaugh map provides a pictorial method of grouping together expressions with common factors and therefore eliminating unwanted variables. The Karnaugh map can also be described as a special arrangement of a truth table. The diagram below illustrates the correspondence between the Karnaugh map and the truth table for the general case of a two variable problem.

The outputs of a truth table correspond on a one-to-one basis to Karnaugh map entries. Starting at the top of the truth table, the A=0, B=0 inputs produce an output . Note that this same output is found in the Karnaugh map at the A=0, B=0 cell address, upper left corner of K-map where the A=0 row and B=0 column intersect. The other truth table outputs , , from inputs AB=01, 10, 11 are found at corresponding K-map locations. Rules of Simplification 1. 2. 3. 4. 5. 6. 7. No zeros allowed. No diagonals. Only power of 2 number of cells in each group. Groups should be as large as possible. Everyone must be in at least one group. Overlapping allowed. Wrap around allowed. 8. Fewest numbers of groups possible. Below, we show the adjacent 2-cell regions in the 2-variable K-map with the aid of previous rectangular Venn diagram like Boolean regions.

Cells and are adjacent in the K-map as ellipses in the left most K-map below. Referring to the previous truth table, this is not the case. There is another truth table entry () between them. Which brings us to the whole point of the organizing the K-map into a square array, cells with any Boolean variables in common need to be close to one another so as to present a pattern that jumps out at us.

15
For cells and they have the Boolean variable B' in common. We know this because B=0 (same as B') for the column above cells and . Compare this to the square Venn diagram above the K-map. A similar line of reasoning shows that and have Boolean B (B=1) in common. Then, and have Boolean A' (A=0) in common. Finally, and have Boolean A (A=1) in common. Compare the last two maps to the middle square Venn diagram.

Example 1: Consider the following map. The function plotted is: Z = f(A,B) = A + AB

Note that values of the input variables form the rows and columns. That is the logic values of the variables A and B (with one denoting true form and zero denoting false form) form the head of the rows and columns respectively. Bear in mind that the above map is a one dimensional type which can be used to simplify an expression in two variables. There is a two-dimensional map that can be used for up to four variables, and a threedimensional map for up to six variables.

Using algebraic simplification, Z = A + AB Z = A( + B) Z=A Variable B becomes redundant due to Boolean Theorem T9a. Referring to the map above, the two adjacent 1's are grouped together. Through inspection it can be seen that variable B has its true and false form within the group. This eliminates variable B leaving only variable A which only has its true form. The minimised answer therefore is Z = A.

Example 2: Consider the expression Z = f(A,B) = +A + B plotted on the Karnaugh map:

16
Pairs of 1's are grouped as shown above, and the simplified answer is obtained by using the following steps: Note that two groups can be formed for the example given above, bearing in mind that the largest rectangular clusters that can be made consist of two 1s. Notice that a 1 can belong to more than one group. The first group labeled I, consists of two 1s which correspond to A = 0, B = 0 and A = 1, B = 0. Put in another way, all squares in this example that correspond to the area of the map where B = 0 contains 1s, independent of the value of A. So when B = 0 the output is 1. The expression of the output will contain the term For group labeled II corresponds to the area of the map where A = 0. The group can therefore be defined as . This implies that when A = 0 the output is 1. The output is therefore 1 whenever B = 0 and A = 0. Hence the simplified answer is Z = + Example 3: Z = f(A,B,C) = B + B + BC + A

By using the rules of simplification and ringing of adjacent cells in order to make as many variables redundant, the minimised result obtained is B + A

We show our previously developed Karnaugh map. We will use the form on the right

Note the sequence of numbers across the top of the map. It is not in binary sequence which would be 00, 01, 10, 11. It is 00, 01, 11 10, which is Gray code sequence. Gray code sequence only changes one binary bit as we go from one number to the next in the sequence, unlike binary. That means that adjacent cells will only vary by one bit, or Boolean variable. This is what we need to organize the outputs of a logic function so that we may view commonality. Moreover, the column and row headings must be in Gray code order, or the map will not work as a Karnaugh map. Cells sharing common Boolean variables would no longer be adjacent, nor show visual patterns. Adjacent cells vary by only one bit because a Gray code sequence varies by only one bit. Let us move on to some examples of simplification with 3-variable Karnaugh maps. We show how to map the product terms of the unsimplified logic to the K-map. We illustrate how to identify groups of adjacent cells which leads to a Sum-of-Products simplification of the digital logic.

17
Above we, place the 1's in the K-map for each of the product terms, identify a group of two, then write a p-term (product term) for the sole group as our simplified result.

Mapping the four p-terms yields a group of four, which is covered by one variable C.

After mapping the six p-terms above, identify the upper group of four, pick up the lower two cells as a group of four by sharing the two with two more from the other group. Covering these two with a group of four gives a simpler result. Since there are two groups, there will be two p-terms in the Sumof-Products result A'+B

Mapping the four p-terms above yields a group of four. Visualize the group of four by rolling up the ends of the map to form a cylinder, then the cells are adjacent. We normally mark the group of four as above left. Out of the variables A, B, C, there is a common variable: C'. C' is a 0 over all four cells. Final result is C'.

Below we repeat the Boolean algebra simplification of Toxic waste incinerator for comparison.

18

Below we repeat the Toxic waste incinerator Karnaugh map solution for comparison to the above Boolean algebra simplification. This case illustrates why the Karnaugh map is widely used for logic simplification.

The Karnaugh map method looks easier than the boolean algebra.

Sequential logic:
In digital circuit theory, sequential logic is a type of logic circuit whose output depends not only on the present input but also on the history of the input. This is in contrast to combinational logic, whose output is a function of, and only of, the present input. In other words, sequential logic has storage (memory) while combinational logic does not. Sequential logic is therefore used to construct some types of computer memory, other types of delay and storage elements, and finite state machines. Most practical computer circuits are a mixture of combinational and sequential logic.

19
There are two types of finite state machine that can be built from sequential logic circuits:

Moore machine: the output depends only on the internal state. (Since the internal state only changes on a clock edge, the output only changes on a clock edge too). Mealy machine: the output depends not only on the internal state, but also on the inputs.

Depending on regulations of functioning, digital circuits are divided into synchronous and asynchronous. In accordance with this, behavior of devices obeys synchronous or asynchronous logic. Synchronous sequential logic Nearly all sequential logic today is 'clocked' or 'synchronous' logic: there is a 'clock' signal, and all internal memory (the 'internal state') changes only on a clock edge. The basic storage element in sequential logic is the flip-flop. The main advantage of synchronous logic is its simplicity. Every operation in the circuit must be completed inside a fixed interval of time between two clock pulses, called a 'clock cycle'. As long as this condition is met (ignoring certain other details), the circuit is guaranteed to be reliable. Synchronous logic also has two main disadvantages, as follows. 1. The clock signal must be distributed to every flip-flop in the circuit. As the clock is usually a highfrequency signal, this distribution consumes a relatively large amount of power and dissipates much heat. Even the flip-flops that are doing nothing consume a small amount of power, thereby generating waste heat in the chip. 2. The maximum possible clock rate is determined by the slowest logic path in the circuit, otherwise known as the critical path. This means that every logical calculation, from the simplest to the most complex, must complete in one clock cycle. One way around this limitation is to split complex operations into several simple operations, a technique known as 'pipelining'. This technique is prominent within microprocessor design, and helps to improve the performance of modern processors. Asynchronous sequential logic Asynchronous sequential logic expresses memorizing effect by fixing moments of time, when digital device changes its state. These moments are represented not in explicit form, but taking into account principle before/after in temporal relations of logical values. For asynchronous logic it is sufficient to determine a sequence of switchings irrespective of any connections of the corresponding moments with real or virtual time. Theoretical apparatus of sequential logic consists of mathematical instruments of sequention and venjunction as well as of logic-algebraic equations on their basis. Sequential Logic Basics They are generally termed as Two State or Bistable devices which can have their output set in either of two basic states, a logic level "1" or a logic level "0" and will remain "latched" indefinitely in this current state or condition until some other input trigger pulse or signal is applied which will cause it to change its state once again. Sequential Logic Circuit

20
The word "Sequential" means that things happen in a "sequence", one after another and in Sequential Logic circuits, the actual clock signal determines when things will happen next. Simple sequential logic circuits can be constructed from standard Bistable circuits such as Flip-flops, Latches or Counters and which themselves can be made by simply connecting together NAND Gates and/or NOR Gates in a particular combinational way to produce the required sequential circuit. Sequential Logic circuits can be divided into 3 main categories:

1. Clock Driven - Synchronous Circuits that are Synchronised to a specific clock signal. 2. Event Driven - Asynchronous Circuits that react or change state when an external event
occurs. 3. Pulse Driven - Which is a Combination of Synchronous and Asynchronous.

Classification of Sequential Logic

As well as the two logic states mentioned above logic level "1" and logic level "0", a third element is introduced that separates Sequential Logic circuits from their Combinational Logic counterparts, namely TIME. Sequential logic circuits that return back to their original state once reset, i.e. circuits with loops or feedback paths are said to be "Cyclic" in nature. SR Flip-Flop An SR Flip-Flop can be considered as a basic one-bit memory device that has two inputs, one which will "SET" the device and another which will "RESET" the device back to its original state and an output Q that will be either at a logic level "1" or logic "0" depending upon this Set/Reset condition. A basic NAND Gate SR flip flop circuit provides feedback from its outputs to its inputs and is commonly used in memory circuits to store data bits. The term "Flip-flop" relates to the actual operation of the device, as it can be "Flipped" into one logic state or "Flopped" back into another. The simplest way to make any basic one-bit Set/Reset SR flip-flop is to connect together a pair of cross-coupled 2-input NAND Gates to form a Set-Reset Bistable or a SR NAND Gate Latch, so that there is feedback from each output to one of the other NAND Gate inputs. This device consists of two inputs, one called the Reset, R and the other called the Set, S with two corresponding outputs Q and its inverse or complement Q as shown below.

21

Truth Table for this Set-Reset Function


State Set Reset Invalid S 1 1 0 1 0 R 0 1 1 1 0 Q 1 1 0 0 1 Q 0 0 1 1 1

The JK Flip-Flop From the previous tutorial we now know that the basic gated SR NAND Flip-flop suffers from two basic problems: Number 1, the S = 0 and R = 0 condition or S = R = 0 must always be avoided, and number 2, if S or R change state while the enable input is high the correct latching action will not occur. Then to overcome these two problems the JK Flip-Flop was developed. The JK Flip-Flop is basically a Gated SR Flip-Flop with the addition of clock input circuitry that prevents the illegal or invalid output that can occur when both input S equals logic level "1" and input R equals logic level "1". The symbol for a JK Flip-flop is similar to that of an SR Bistable as seen in the previous tutorial except for the addition of a clock input.

The Truth Table for the JK Function


J 0 0 0 0 1 1 1 1 K 0 0 1 1 0 0 1 1 Q 0 1 0 1 0 1 0 1 Q 0 1 0 0 1 1 1 0 toggle action same as for the SR Latch

22

Combinational logic:
In digital circuit theory, combinational logic (sometimes also referred to as combinatorial logic) is a type of digital logic which is implemented by boolean circuits, where the output is a pure function of the present input only. This is in contrast to sequential logic, in which the output depends not only on the present input but also on the history of the input. In other words, sequential logic has memory while combinational logic does not. Combinational logic is used in computer circuits to do this Boolean algebra on input signals and on stored data. Practical computer circuits normally contain a mixture of combinational and sequential logic. For example, the part of an arithmetic logic unit, or ALU, that does mathematical calculations is constructed using combinational logic. Other circuits used in computers, such as half adders, full adders, half subtractors, full subtractors, multiplexers, demultiplexers, encoders and decoders are also made by using combinational logic. Combinational Logic Circuits Unlike Sequential Logic Circuits whose outputs are dependant on both their present inputs and their previous output state giving them some form of Memory, the outputs of Combinational Logic Circuits are only determined by the logical function of their current input state, logic "0" or logic "1", at any given instant in time as they have no feedback, and any changes to the signals being applied to their inputs will immediately have an effect at the output. In other words, in a Combinational Logic Circuit, the output is dependant at all times on the combination of its inputs and if one of its inputs condition changes state so does the output as combinational circuits have "no memory", "timing" or "feedback loops". Combinational Logic

Combination Logic Circuits are made up from basic logic NAND, NOR or NOT gates that are "combined" or connected together to produce more complicated switching circuits. These logic gates are the building blocks of combinational logic circuits. An example of a combinational circuit is a decoder, which converts the binary code data present at its input into a number of different output lines, one at a time producing an equivalent decimal code at its output. Combinational logic circuits can be very simple or very complicated and any combinational circuit can be implemented with only NAND and NOR gates as these are classed as "universal" gates. The three main ways of specifying the function of a combinational logic circuit are:

Truth Table Truth tables provide a concise list that shows the output values in tabular form for each possible combination of input variables. Boolean Algebra Forms an output expression for each input variable that represents a logic "1" Logic Diagram Shows the wiring and connections of each individual logic gate that implements the circuit.

23
and all three are shown below.

As combination logic circuits are made up from individual logic gates only, they can also be considered as "decision making circuits" and combinational logic is about combining logic gates together to process two or more signals in order to produce at least one output signal according to the logical function of each logic gate. Common combinational circuits made up from individual logic gates that carry out a desired application include Multiplexers, De-multiplexers, Encoders, Decoders, Full and Half Adders etc.

Classification of Combinational Logic

One of the most common uses of combination logic is in Multiplexer and De-multiplexer type circuits. Here, multiple inputs or outputs are connected to a common signal line and logic gates are used to decode an address to select a single data input or output switch. A multiplexer consist of two separate components, a logic decoder and some solid state switches, but before we can discuss multiplexers, decoders and de-multiplexers in more detail we first need to understand how these devices use these "solid state switches" in their design.

24
Representation Combinational logic is used for building circuits where certain outputs are desired, given certain inputs. The construction of combinational logic is generally done using one of two methods: a sum of products, or a product of sums. A sum of products can be easily visualized by looking at a truth table: Resul Logical equivalent t F F F F T F F T

A F F F F T T T T

B F F T T F F T T

C F T F T F T F T

Using sum of products, we take the sum of all logical statements which yield true results. Thus, our result would be:

It could then be simplified using Boolean algebra to:

Logic formulas minimization Minimization (simplification) of combinational logic formulas is produced on the basis of the following rules:

Owing to minimization logical function is simplified, and combinational circuit becomes more compact and convenient for realization.

25

Multiplexer and Demultiplexer:


Multiplexer: In electronics, a multiplexer or mux (occasionally the terms muldex or muldem are also found for a combination multiplexer-demultiplexer) is a device that performs multiplexing; it selects one of many analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2 n inputs has n select lines, which are used to select which input line to send to the output. A data selector, more commonly called a Multiplexer, shortened to "Mux" or "MPX", are combinational logic switching devices that operate like a very fast acting multiple position rotary switch. They connect or control, multiple input lines called "channels" consisting of either 2, 4, 8 or 16 individual inputs, one at a time to an output. Then the job of a multiplexer is to allow multiple signals to share a single common output. For example, a single 8-channel multiplexer would connect one of its eight inputs to the single data output. Multiplexers are used as one method of reducing the number of logic gates required in a circuit or when a single data line is required to carry two or more different digital signals. Digital Multiplexers are constructed from individual analogue switches encased in a single IC package as opposed to the "mechanical" type selectors such as normal conventional switches and relays. Generally, multiplexers have an even number of data inputs, usually an even power of two, n 2 , a number of "control" inputs that correspond with the number of data inputs and according to the binary condition of these control inputs, the appropriate data input is connected directly to the output. An example of a Multiplexer configuration is shown below. 4-to-1 Channel Multiplexer

Addressing b 0 0 1 1 a 0 1 0 1

Input Selected A B C D

The Boolean expression for this 4-to-1 Multiplexer above with inputs A to D and data select lines a, b is given as: Q = abA + abB + abC + abD In this example at any one instant in time only ONE of the four analogue switches is closed, connecting only one of the input lines A to D to the single output at Q. As to which switch is closed depends upon the addressing input code on lines "a" and "b", so for this example to select input B to the output at Q, the binary input address would need to be "a" = logic "1" and "b" = logic "0". Adding

26
more control address lines will allow the multiplexer to control more inputs but each control line configuration will connect only ONE input to the output. Then the implementation of this Boolean expression above using individual logic gates would require the use of seven individual gates consisting of AND, OR and NOT gates as shown. 4 Channel Multiplexer using Logic Gates

The symbol used in logic diagrams to identify a multiplexer is as follows. Multiplexer Symbol

An electronic multiplexer makes it possible for several signals to share one device or resource, for example one A/D converter or one communication line, instead of having one device per input signal. Demultiplexer: An electronic multiplexer can be considered as a multiple-input, single-output switch, and a demultiplexer as a single-input, multiple-output switch. The data distributor, known more commonly as a Demultiplexer or "Demux", is the exact opposite of the Multiplexer we saw in the previous tutorial. The demultiplexer takes one single input data line and then switches it to any one of a number of individual output lines one at a time. The demultiplexer converts a serial data signal at the input to a parallel data at its output lines as shown below.

27 1-to-4 Channel De-multiplexer

Addressing b 0 0 1 1 a 0 1 0 1

Output Selected A B C D

The Boolean expression for this 1-to-4 Demultiplexer above with outputs A to D and data select lines a, b is given as: F = ab A + abB + abC + abD The function of the Demultiplexer is to switch one common data input line to any one of the 4 output data lines A to D in our example above. As with the multiplexer the individual solid state switches are selected by the binary input address code on the output select pins "a" and "b" and by adding more address line inputs it is possible to switch more outputs giving a 1-to-2 n data line outputs. Some standard demultiplexer ICs also have an "enable output" input pin which disables or prevents the input from being passed to the selected output. Also some have latches built into their outputs to maintain the output logic level after the address inputs have been changed. However, in standard decoder type circuits the address input will determine which single data output will have the same value as the data input with all other data outputs having the value of logic "0". The implementation of the Boolean expression above using individual logic gates would require the use of six individual gates consisting of AND and NOT gates as shown.

4 Channel Demultiplexer using Logic Gates

28
The symbol used in logic diagrams to identify a demultiplexer is as follows.

Demultiplexer Symbol

Standard Demultiplexer IC packages available are the TTL 74LS138 1 to 8-output demultiplexer, the TTL 74LS139 Dual 1-to-4 output demultiplexer or the CMOS CD4514 1-to-16 output demultiplexer. Another type of demultiplexer is the 24-pin, 74LS154 which is a 4-bit to 16-line demultiplexer/decoder. Here the individual output positions are selected using a 4-bit binary coded input. Like multiplexers, demultiplexers can also be cascaded together to form higher order demultiplexers. In telecommunications, a multiplexer is a device that combines several input information signals into one output signal, which carries several communication channels, by means of some multiplex technique. A demultiplexer is in this context a device taking a single input signal that carries many channels and separates those over multiple output signals. In telecommunications and signal processing, an analog time division multiplexer (TDM) may take several samples of separate analogue signals and combine them into one pulse amplitude modulated (PAM) wide-band analogue signal. Alternatively, a digital TDM multiplexer may combine a limited number of constant bit rate digital data streams into one data stream of a higher data rate, by forming data frames consisting of one timeslot per channel. In telecommunications, computer networks and digital video, a statistical multiplexer may combine several variable bit rate data streams into one constant bandwidth signal, for example by means of packet mode communication. An inverse multiplexer may utilize several communication channels for transferring one signal.

29

Gray code:
The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one bit. The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. Definition: An ordering of 2 binary numbers such that only one bit changes from one entry to the next. Gray codes for 4 or more bits are not unique, even allowing for permutation or inversion of bits. This is a variable weighted code and is cyclic. This means that it is arranged so that every transition from one value to the next value involves only one bit change. The gray code is sometimes referred to as reflected binary, because the first eight values compare with those of the last 8 values, but in reverse order. The gray code is often used in mechanical applications such as shaft encoders.
n

Decimal Binary Gray 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0000 0000 0001 0001 0010 0011 0011 0010 0100 0110 0101 0111 0110 0101 0111 0100 1000 1100 1001 1101 1010 1111 1011 1110 1100 1010 1101 1011 1110 1001 1111 1000

Excess 3 Gray Code: In many applications, it is desirable to have a code that is BCD as well as unit distance. A unit distance code derives its name from the fact that there is only one bit change between two consecutive numbers. The excess 3 gray code is such a code, the values for zero and nine differ in only 1 bit, and so do all values for successive numbers. Outputs from linear devices or angular encoders may be coded in excess 3 gray code to obtain multidigit BCD numbers. Decimal 0 1 2 3 4 5 6 7 8 9 Excess 3 Gray 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010

30

ASCII Representation:
The American Standard Code for Information Interchange (ASCII; pronounced "askee") was first introduced in 1968 as a method of encoding alphabetic and numeric data in digital format. Although ASCII code was originally developed for the teletypewriter industry, it has since found widespread use in computer and information-transfer technologies . Because ASCII code is standardized, computers and other electronic devices can use it to exchange data with each other. This is true even of computers that use different operating systems, for example PCs and Macintoshes. ASCII includes definitions for 128 characters: 33 are non-printing control characters (now mostly obsolete) that affect how text and space is processed; 94 are printable characters, and the space is considered an invisible graphic. The most commonly used character encoding on the World Wide Web was US-ASCII until December 2007, when it was surpassed by UTF-8. In this representation, each alphanumeric character was uniquely assigned a number between 0 and 127, which was represented by its binary equivalent in a string of seven 0s and 1s. The ASCII notation for the capital letter A, for example, is the binary code representation (1000001) for the base-10 number 65; similarly, a blank space has the binary code for the base-10 number 32. Inside computers, each English alphabet character is represented by a string of eight 0s and 1s. Each of the digits in the string is known as a bit, and a series of eight bits is known as a byte. Because ASCII code as originally formulated constituted only 7 bits, when 7-bit ASCII code was embedded in the eight-bit computer code, there was one bit left over. At one time, this extra bit was used primarily for the purpose of checking errors in data transmission. But today, computers use this extra bit to encode an additional 128 characters for the purpose of representing special symbols. Note that with eight-bit encoding, the number of possible arrangements of 0s and 1s increases from 128 to 256. As an example of the eight-bit encapsulation of seven-bit ASCII code, note that the eight-bit representation for the letter "A" (01000001) simply places a 0 in the eighth-bit position relative to the seven-bit representation (1000001). Seven-bit ASCII still has some advantages, however, as it is recognized by all computers, including PCs, Macs, UNIX or VMS mainframes, printers, and any other computer-related equipment.

Binary 110 0000 110 0001 110 0010 110 0011 110 0100 110 0101 110

Oct Dec Hex Glyph Binary 110 140 96 60 ` 1101 110 141 97 61 a 1110 110 142 98 62 b 1111 111 143 99 63 c 0000 111 144 100 64 d 0001 111 145 101 65 e 0010 146 102 66 f 111

Oct Dec Hex Glyph 155 109 6D 156 110 6E 157 111 6F 160 112 70 161 113 71 162 114 72 163 115 73 m n o p q r s

31 0110 110 0111 110 1000 110 1001 110 1010 110 1011 110 1100 0011 111 0100 111 0101 111 0110 111 0111 111 1000 111 1001

147 103 67 150 104 68 151 105 69 152 106 6A 153 107 6B 154 108 6C

g h i j k l

164 116 74 165 117 75 166 118 76 167 119 77 170 120 78 171 121 79

t u v w x y

UNIT - II Introduction to Memories:


Computer data storage, often called storage or memory, refers to computer components and recording media that retain digital data used for computing for some interval of time. Computer data storage provides one of the core functions of the modern computer, that of information retention. It is one of the fundamental components of all modern computers, and coupled with a central processing unit (CPU, a processor), implements the basic computer model used since the 1940s. In contemporary usage, memory usually refers to a form of semiconductor storage known as randomaccess memory, typically DRAM (Dynamic-RAM) but memory can refer to other forms of fast but temporary storage. Similarly, storage today more commonly refers to storage devices and their media not directly accessible by the CPU (secondary or tertiary storage) typically hard disk drives, optical disc drives, and other devices slower than RAM but more permanent.[1] Historically, memory has been called main memory, real storage or internal memory while storage devices have been referred to as secondary storage, external memory or auxiliary/peripheral storage. Internal storage areas in the computer. The term memory identifies data storage that comes in the form of chips, and the word storage is used for memory that exists on tapes or disks. Moreover, the term memory is usually used as a shorthand for physical memory, which refers to the actual chips capable of holding data. Some computers also use virtual memory, which expands physical memory onto a hard disk. Every computer comes with a certain amount of physical memory, usually referred to as main memory or RAM. You can think of main memory as an array of boxes, each of which can hold a single byte of information. A computer that has 1 megabyte of memory, therefore, can hold about 1 million bytes (or characters) of information. Volatile memory Volatile memory is computer memory that requires power to maintain the stored information. Current semiconductor volatile memory technology is usually either static RAM (see SRAM) or dynamic RAM (see DRAM). Static RAM exhibits data remanence, but is still volatile, since all data is lost

32
when memory is not powered. Whereas, dynamic RAM allows data to be leaked and disappear automatically without a refreshing. Non-volatile memory Non-volatile memory is computer memory that can retain the stored information even when not powered. Examples of non-volatile memory include read-only memory (see ROM), flash memory, most types of magnetic computer storage devices (e.g. hard disks, floppy discs and magnetic tape), optical discs, and early computer storage methods such as paper tape and punched cards.

The Role of Memory The term "memory" applies to any electronic component capable of temporarily storing data. There are two main categories of memories:

internal memory that temporarily memorises data while programs are running. Internal memory uses microconductors, i.e. fast specialised electronic circuits. Internal memory corresponds to what we call random access memory (RAM). auxiliary memory (also called physical memory or external memory) that stores information over the long term, including after the computer is turned off. Auxiliary memory corresponds to magnetic storage devices such as the hard drive, optical storage devices such as CD-ROMs and DVD-ROMs, as well as read-only memories.

Technical Characteristics 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.

Types of Memories:
RAM (Random-Access Memory): This is the same as main memory. When used by itself, the term RAM refers to read and write memory; that is, you can both write data into RAM and read data from RAM. This is in contrast to ROM, which permits you only to read data. Most RAM is volatile, which means that it requires a steady flow of electricity to maintain its contents. As soon as the power is turned off, whatever data was in RAM is lost.

33
There are generally two broad categories of random access memory:

DRAM memories (Dynamic Random Access Module), which are inexpensive. They are used essentially for the computer's main memory SRAM memories (Static Random Access Module), which are fast and costly. SRAM memories are used in particular for the processor's cache memory

ROM (Read-Only Memory): Computers almost memory that holds instructions for starting up

always contain a small amount of read-only the computer. Unlike RAM, ROM cannot be

written to.
PROM (Programmable Read-Only Memory): A PROM is a memory chip on which you can store a program. But once the PROM has been used, you cannot wipe it clean and use it to store

something else. Like ROMs, PROMs are non-volatile.

EPROM (Erasable Programmable Read-Only Memory):

An EPROM is a special type of PROM

that can be erased by exposing it to ultraviolet light. An EEPROM is a special type of PROM that can be erased by exposing it to an electrical charge.
EEPROM (Electrically Erasable Programmable Read-Only Memory):

Auxiliary memory: Auxiliary memory units are among computer peripheral equipment. They trade
slower access rates for greater storage capacity and data stability. Auxiliary memory holds programs and data for future use, and, because it is nonvolatile (like ROM), it is used to store inactive programs and to archive data. Early forms of auxiliary storage included punched paper tape, punched cards, and magnetic drums. Since the 1980s, the most common forms of auxiliary storage have been magnetic disks, magnetic tapes, and optical discs.

Register:
A, special, high-speed storage area within the CPU. All data must be represented in a register before it can be processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register. (The register can contain the address of a memory location where data is stored rather than the actual data itself) The number of registers that a CPU has and the size of each (number of bits) help determine the power and speed of a CPU. For example a 32-bit CPU is one in which each register is 32 bits wide. Therefore, each CPU instruction can manipulate 32 bits of data. Usually, the movement of data in and out of registers is completely transparent to users, and even to programmers. Only assembly language programs can manipulate registers. In high-level languages, the compiler is responsible for translating high-level operations into low-level operations that access registers.

34
Registers are temporary memory units that stores words. The registers are located in the processor.

Categories of registers
Registers are normally measured by the number of bits they can hold, for example, an "8-bit register" or a "32-bit register". A processor often contains several kinds of registers, that can be classified accordingly to their content or instructions that operate on them:

User-accessible Registers - The most common division of user-accessible registers is into data registers and address registers. Data registers are used to hold numeric values such as integer and floating-point values. In some older and low end CPUs, a special data register, known as the accumulator, is used implicitly for many operations. Address registers hold addresses and are used by instructions that indirectly access memory. o Some processors contain registers that may only be used to hold an address or only to hold numeric values (in some cases used as an index register whose value is added as an offset from some address); others allow registers to hold either kind of quantity. A wide variety of possible addressing modes, used to specify the effective address of an operand, exist. o A stack pointer, sometimes called a stack register, is the name given to a register that can be used by some instructions to maintain a stack. Conditional registers hold truth values often used to determine whether some instruction should or should not be executed. General purpose registers (GPRs) can store both data and addresses, i.e., they are combined Data/Address registers. Floating point registers (FPRs) store floating point numbers in many architectures. Constant registers hold read-only values such as zero, one, or pi. Vector registers hold data for vector processing done by SIMD instructions (Single Instruction, Multiple Data). Special purpose registers ( SPR ) hold program state; they usually include the program counter (aka instruction pointer), stack pointer, and status register (aka processor status word). In embedded microprocessors, they can also correspond to specialized hardware elements. o Instruction registers store the instruction currently being executed. In some architectures, model-specific registers (also called machine-specific registers) store data and settings related to the processor itself. Because their meanings are attached to the design of a specific processor, they cannot be expected to remain standard between processor generations.

35

Control and status registers - It has three types. Program counter, instruction registers, Program status word (PSW). Registers related to fetching information from RAM, a collection of storage registers located on separate chips from the CPU (unlike most of the above, these are generally not architectural registers): o Memory buffer register o Memory data register o Memory address register o Memory Type Range Registers (MTRR)

Hardware registers are similar, but occur outside CPUs.

Primary Memory:
Primary memory is the memory that can be directly accessed by the CPU which constantly interacts with it, retrieves data stored therein, goes through instructions and execute them as per the requirement. All the information, data and application are loaded there in uniform manner. Earlier William tubes, delay lines or rotating magnetic drums were used as primary storage which were later replaced by magnetic core memory. Solid-state silicon chip technology revolutionized the electronic memory and paved the way for Random Access Memory (RAM). RAM is volatile (temporary) but fast form of memory. Apart from the main large capacity Random Access Memory (RAM), there are two sub-layers of the primary memory. Processor registers within the processor, which are one of the fastest forms of data storage, contain a word of data (usually 32 or 64 bits). The CPU instructs and helps the Arithmetic and logic unit to perform a number of calculations on this data. Processor cache, which is meant for enhancing the performance of the computer, links the fast registers to the slower main memory. Cache memory loads the duplicated information that is used most actively. It is much faster than the main memory but relatively can store limited data. It is also much slower but much larger than the processor registers. Cache setup is further split into different levels with smallest and fastest primary cache and relatively larger but slower secondary cache.

RAM
The most familiar form of system memory, Random Access Memory (RAM) derives its name from the fact that any of its memory cells can be accessed directly if you are aware of the row and column that intersect at that cell. The columns are referred to as bitlines while the rows are referred to as wordlines. The intersection of a wordline and bitliine is the address of the memory cell onto a silicon wafer. In case of Serial Access Memory (SAM), the opposite of RAM, the

36
data is stored as a series of memory cells and can be accessed sequentially whereas data stored in RAM can be accessed in any order. Bus width and bus speed control the RAM speed. The number of bits that can be sent to the CPU at the same point of time is referred to as bus width while the number of times a group of bits can be sent each second is referred to as bus speed. A bus cycle takes place as the information moves from the system memory to the CPU. With latency (the number of clock cycles needed to read a bit of data) changing the equation thoroughly, RAM, generally, does not operate at optimum speed. Burst mode hinges on the anticipation that the information required by the CPU will be loaded in sequential memory cells. The memory controller reads a number of consecutive bits of information together as it expects that the working of the CPU will keep coming from this same series of memory addresses. In this manner only the first bit is affected by the latency and the successive ones take much lesser time. The four number with dashed between them denote the rated burst mode of the system memory. The first one gives information about the number of clock cycles required to commence a read operation while the rest of the numbers inform about the wordline which are the number of cycles that are needed to read each consecutive bit in the row. Pipelining, together with the burst mode is also used to minimize the effects of latency dramatically. It enables the memory controller to read from the memory, send the data to the CPU and write it to memory cells simultaneously.

Some common types of RAM are as follows:


SRAM: Used primarily to create CPUs speed-sensitive cache, Static Random Access memory (SRAM) uses multiple transistors for each memory cell. It does not have a capacitor in each cell. Each bit of memory is held by a flip-flop memory which takes four to six transistors besides some wiring. SRAM is not required to be refreshed which makes it significantly fast. As compared to DRAM, SRAM has more parts and therefore it consumes a lot more space on a chip. With less memory available per chip, the SRAM becomes costlier. DRAM: Dynamic Random Access Memory needs to be refreshed consistently and contains memory cells with a paired transistor. In order to activate the transistor at each bit in the column, DRAM sends a charge through the appropriate column (CAS). The level of charge is determined by the sense-amplifier while reading. If the level of charge exceeds fifty percent, it is read as a 1 whereas if the charge is below fifty percent it is read as a 0. For dynamic memory to work, Either the CPU or the memory controller recharges all the capacitors before they are discharged to zero. To ensure this the memory is read and written back which if referred to as refresh operation. DRAM is required to be refreshed dynamically all the time otherwise it will lose the information. This refreshing operation consumes a lot of time and causes the memory to slow down.

37
The refresh sequence is tracked by the counter after determining the order in which the rows have been accessed. The time required to do the entire task is expressed only in nanoseconds. A memory chip rating of 100 nanosecond will mean than it take 100 nanoseconds to read each cell completely and recharge them. Memory cells have a support infrastructure of other specialized circuits so that information can be put in and retrieved from them. These circuits identify each and column, keep track of the refresh sequence, read and restore the signal from a cell and tell a cell whether it should take a charge or not. SDRAM: Synchronous dynamic random access memory enhances the systems performance by utilizing the burst mode concept. With maximum transfer rate to L2 cache of 528 mbps, SDRAM stays on the row that contains the requested bit and moves quickly through the columns to read each bit as it moves on. FPM DRAM: The pristine form of DRAM, Fast Page Mode Dynamic Random Access memory waits through the process of locating a bit of data by column and row and then reading the bit and then starts on the next bit. It has a maximum transfer rate to L2 cache of about 176 mbps. EDO DRAM: Contrary to FPM DRAM, Extended data-out dynamic random access memory does not wait and as the address of the first bit is located it starts looking for the next bit. With maximum transfer rate to L2 cache of about 264 mbps, it is 5 percent faster than the FPM. RDRAM: Rambus dynamic random access memory uses a special high speed data bus called the Rambus channel. It generates more heat than other chips as they operate at high speeds. DDR SDRAM: Double data rate synchronous dynamic random access memory is somewhat similar to SDRAM but has higher bandwidth. It has a maximum transfer rate to L2cache of about 1064 mbps. ROM Read Only Memory (ROM) is an integrated circuit programmed with data that holds instructions for starting up the computer. Data stored in ROM is non volatile and is not lost when powered off. These data cannot be changed or a special operation is needed to be performed to change it. ROM chips also comprise of columns and rows but it is different from RAM in terms of intersection of these. These chips use diodes instead of transistors to connect the lines if the value is 1 whereas if the value is 0 the lines are not connected. A diode has the property of letting the current flow in one direction. It also has a threshold, called forward breakover, which is used to ascertain the current required. After the required flow of current the diode passes it on. Voltage of the memory chips forward breakover hover around 0.6 volts. Using the diode, a chip can send a charge that is above the forward breakover to the appropriate column with the selected row grounded to connect at a particular cell. If the charge is conducted through to the ground, in presence of the diode at the intersection, the cell will be read as a 1. On the other hand if the value of the cell is zero, there is no diode at the intersection to establish the connection between the column and the row.

38
A ROM chip cannot be reprogrammed or rewritten therefore when the chip is created it requires the programming of perfect and complete information. ROM chips are cost effective and use very little power. PROM Programmable read only memory (PROM) is a type of ROM. These chips are non volatile and cannot be purged to store something else once it has been used. Blank PROM chips can be coded with the help of a tool known as a programmer. Similar to ROM, PROM chips also have a grid of rows and columns but here fuses connect the intersections. A charge towards the columns passes through the fuse in a cell to a grounded row and indicates a value of 1. Initially PROM chips are all 1s for all cells have a fuse. In order to change the value of a cell to 0, a programmer is used to send the current to the cell. The connection between the column and the row snaps as the higher voltages while passing through burns out the fuse. EPROM Erasable Programmable Read Only Memory can be erased with the help of ultraviolet light and rewritten many times. These chips are configured by the EPROM programmer, providing the voltage at the specified levels. The floating gate is linked to the row through the control gate. The cell has a value of 1 till the link remains established. A process known as Fowler-Nordheim tunneling is performed to change the value to zero. The tunneling changes the placement of electrons in the floating gate. An electrical charge of 10 to 13 volts is passed through the bitline which drains to a ground after entering the floating gate. The electrical charge excites the electrons of the transistor at the floating gate and they are pushed through and trapped on the side of the flimsy oxide layer to give a negative charge. A call sensor monitors the level of the charge that passes through the threshold of floating gate. Is shows a value of 1 if the flow is more than fifty percent. On the other hand if the flow is below fifty percent, the value change to 0. Blank EPROM chips have a value of 1 for each cell as the have all of the gates opened completely. EEPROM Electrically Erasable Programmable Read Only Memory chips are not required to removed to be erased or rewritten. These chips do not require to be erased altogether and specific portion of it can be easily altered. Additional dedicated equipment are also not required to change the content the EEPROM chips. These chips are erased and rewritten with the help of electric charge.

Secondary Memory:
Secondary memory (or secondary storage) is the slowest and cheapest form of memory. It cannot be processed directly by the CPU. It must first be copied into primary storage (also known as RAM ). Secondary memory is not directly accessible to the CPU. Input/output channels are used to access this

39
non volatile memory. This memory does not lose the data when the system is powered off. The most familiar form of secondary memory that is widely used is Hard Disk. Some examples of secondary memory are USB sticks, floppy drives and Zip drives. Optical Disc Storage Optical Disc Drives use electromagnetic waves or laser light to read and write information to optical discs. There are drives that only read while on the other hand some drives are also there that performs both reading and writing. These devices include CD, DVD and Blue-ray Disc.

Hard Disks A Hard Disks Drive (HDD) is a non volatile secondary storage device which stores digitally encoded data on the magnetic surface of it.

Associative memory:
Data-storage device in which a location is identified by its informational content rather than by names, addresses, or relative positions, and from which the data may be retrieved. Also known as associative storage. Associative memory may refer to:

A type of memory closely associated with neural networks o Bidirectional Associative Memory o Autoassociative memory o Hopfield net Content-addressable memory, a type of computer memory Transderivational search, an aspect of human memory

Example
Content-addressable memory is often used in computer networking devices. For example, when a network switch receives a data frame from one of its ports, it updates an internal table with the frame's source MAC address and the port it was received on. It then looks up the destination MAC address in the table to determine what port the frame needs to be forwarded to, and sends it out on that port. The MAC address table is usually implemented with a binary CAM so the destination port can be found very quickly, reducing the switch's latency. Ternary CAMs are often used in network routers, where each address has two parts: the network address, which can vary in size depending on the subnet configuration, and the host address, which occupies the remaining bits. Each subnet has a network mask that specifies which bits of the address are the network address and which bits are the host address. Routing is done by consulting a routing table maintained by the router which contains each known destination network address, the associated network mask, and the information needed to route packets to that destination. Without CAM, the

40
router compares the destination address of the packet to be routed with each entry in the routing table, performing a logical AND with the network mask and comparing it with the network address. If they are equal, the corresponding routing information is used to forward the packet. Using a ternary CAM for the routing table makes the lookup process very efficient. The addresses are stored using "don't care" for the host part of the address, so looking up the destination address in the CAM immediately retrieves the correct routing entry; both the masking and comparison are done by the CAM hardware. Other CAM applications include:

CPU cache controllers and Translation Lookaside Buffers Database engines Data compression hardware Artificial neural networks Intrusion Prevention System

Virtual Memory:
If the computer lacks the random access memory (RAM) needed to run a program or operation, Windows uses virtual memory to compensate. Virtual memory combines the computers RAM with temporary space on the hard disk. When RAM runs low, virtual memory moves data from RAM to a space called a paging file. Moving data to and from the paging file frees up RAM to complete its work. The purpose of virtual memory is to enlarge the address space, the set of addresses a program can utilize. For example, virtual memory might contain twice as many addresses as main memory. A program using all of virtual memory, therefore, would not be able to fit in main memory all at once. Nevertheless, the computer could execute such a program by copying into main memory those portions of the program needed at any given point during execution. To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each of which contains a fixed number of addresses. Each page is stored on a disk until it is needed. When the page is needed, the operating system copies it from disk to main memory, translating the virtual addresses into real addresses. The process of translating virtual addresses into real addresses is called mapping. The copying of virtual pages from disk to main memory is known as paging or swapping.

Optical Discs:
An optical disk is a compact disk or CD. The formatting of the optical disk will dictate whether it is a DVD, CD, read-only or rewritable. Optical disks have replaced vinyl records, cassette tapes, videotapes and floppy disks.

41
The optical disk became the preferred medium for music, movies and software programs because of its many advantages. Compact, lightweight, durable and digital, the optical disk also provides a minimum of 650 megabytes (MB) of data storage. A double-layered and double-sided DVD optical disk holds up to 15.9 gigabytes (GB) of data. A direct access storage device that is written and read by light. The most common optical discs in use are CDs and DVDs, and they come in three types: read-only, write-once and rewritable. CD, CDROM, DVD-ROM, DVD-Video as well as BD-ROM (Blu-ray) are read-only discs that are recorded at the time of manufacture and cannot be erased. CD-R, DVD-R, DVD+R, BD-R, WORM and magneto-optic (in WORM mode) discs are write-once. They are recorded in the user's environment, but cannot be erased. CD-RW, DVD-RAM, DVD-RW, DVD+RW, BD-RE and MO discs are rewritable. As removable media, optical discs have advantages over the mostly obsolete removable magnetic disk cartridges. They have higher capacities and are not subject to head crashes or corruption from stray magnetic fields. They also have a 30-year life and are less vulnerable to extremes of hot and cold. However, external hard disks that plug into the USB port have given optical discs a run for their money as a transportable storage medium. They have higher capacities than CDs, DVDs and even Blu-ray media, and they are increasingly smaller and lighter. While current optical disc technologies such as DVD, DVDR, DVDRW, and DVD-RAM rely on a red laser to read and write data, the new format uses a blue-violet laser instead, hence the name Bluray. Despite the different type of lasers used, Blu-ray products can easily be made backwards compatible with CDs and DVDs through the use of a BD/DVD/CD compatible optical pickup unit. The benefit of using a blue-violet laser (405 nm) is that it has a shorter wavelength than a red laser (650 nm), which makes it possible to focus the laser spot with even greater precision. This allows data to be packed more tightly and stored in less space, so it's possible to fit more data on the disc even though it's the same size as a CD/DVD. This together with the change of numerical aperture to 0.85 is what enables Blu-ray Discs to hold 25 GB/50 GB. Recent development by Pioneer has pushed the storage capacity to 500 GB on a single disc by using 20 layers. First movies on Blu-ray discs were released in June 2006. Blu-ray eventually prevailed in a high definition optical disc format war over a competing format, the HD DVD. A standard Blu-ray disc can hold about 25 GB of data, a DVD about 4.7 GB, and a CD about 700 MB. First-generation Initially, optical discs were used to store music and computer software. The laser disc format stored analog video signals, but commercially lost to the VHS videotape cassette, due mainly to its high cost and non-re-recordability; other first-generation disc formats were designed only to store digital data and were not initially capable of use as a video medium. Most first-generation disc devices had an infrared laser reading head. The minimum size of the laser spot is proportional to its wavelength, thus wavelength is a limiting factor against great information density, too little data can be stored so. The infrared range is beyond the long-wavelength end of the visible light spectrum, so, supports less density than any visible light colour. One example of highdensity data storage capacity, achieved with an infrared laser, is 700MB of net user data for a 12 cm compact disc. NOTE: other factors affecting data storage density are, for example, a multi-layered infrared disc would hold more data than an identical single-layer disc; whether CAV, CLV, or zoned-CAV; how the data are encoded; how much clear margin at the center and the edge

Compact Disc (CD) and derivatives o Video CD o Super Video CD Laserdisc

42

GD-ROM Phase-change Dual Double Density Compact Disc (DDCD) Magneto-optical disc mini disc

Second-generation Second-generation optical discs were for storing great amounts of data, including broadcast-quality digital video. Such discs usually are read with a visible-light laser (usually red); the shorter wavelength and greater numerical aperture[2] allow a narrower light beam, permitting smaller pits and lands in the disc. In the DVD format, this allows 4.7 GB storage on a standard 12 cm, single-sided, single-layer disc; alternately, smaller media, such as the MiniDisc and the DataPlay formats, can have capacity comparable to that of the larger, standard compact 12 cm disc.

Hi-MD DVD and derivatives o DVD-Audio o DualDisc o Digital Video Express (DIVX) Super Audio CD Enhanced Versatile Disc DataPlay Universal Media Disc Ultra Density Optical

Third-generation Third-generation optical discs are in development, meant for distributing high-definition video and support greater data storage capacities, accomplished with short-wavelength visible-light lasers and greater numerical apertures. The Blu-ray disc uses blue-violet lasers and focusing optics of greater aperture, for use with discs with smaller pits and lands, thereby greater data storage capacity per layer. [2] In practice, the effective multimedia presentation capacity is improved with enhanced video data compression codecs such as H.264, and VC-1.

Currently shipping: o Blu-ray Disc (up to 50 GB) o HD VMD Disc o CBHD Disc In development: o Forward Versatile Disc o Digital Multilayer Disk or Fluorescent Multilayer Disc Abandoned: o HD DVD

Fourth-generation The following formats go beyond the current third-generation discs and have the potential to hold more than one terabyte (1TB) of data:

Holographic Versatile Disc LS-R Protein-coated disc

43

Specifications: Base (1) and (current) maximum speeds by generation Base Max Generation (Mbit/s) (Mbit/s) 1st (CD) 1.17 65.62 56 2nd (DVD) 10.55 210.94 20 3rd (BD) 36 432 12

Capacity and nomenclature Capacity Layers Diameter Designation Sides (total) (cm) (GB) (GiB) BD SS SL 1 1 8 7.8 BD SS DL 1 2 8 15.6 BD SS SL 1 1 12 25 BD SS DL 1 2 12 50 CDROM 74 min SS SL 1 1 12 0.682 0.635 CDROM 80 min SS SL 1 1 12 0.737 0.687 CDROM SS SL 1 1 8 0.194 0.180 DDCDROM SS SL 1 1 12 1.364 1.270 DDCDROM SS SL 1 1 8 0.387 0.360 DVD1 SS SL 1 1 8 1.46 1.36 DVD2 SS DL 1 2 8 2.66 2.47 DVD3 DS SL 2 2 8 2.92 2.72 DVD4 DS DL 2 4 8 5.32 4.95 DVD5 SS SL 1 1 12 4.70 4.37 DVD9 SS DL 1 2 12 8.54 7.95 DVD10 DS SL 2 2 12 9.40 8.74 DVD14 DS DL/SL 2 3 12 13.24 12.32 DVD18 DS DL 2 4 12 17.08 15.90 DVDR 1.0 SS SL 1 1 12 3.95 3.68 DVDR (2.0), +R, RW, +RW SS SL 1 1 12 4.70 4.37 DVD-R, +R, RW, +RW DS SL 2 2 12 9.40 8.75 DVDRAM SS SL 1 1 8 1.46 1.36 DVDRAM DS SL 2 2 8 2.65 2.47 DVDRAM 1.0 SS SL 1 1 12 2.58 2.40 DVDRAM 2.0 SS SL 1 1 12 4.70 4.37 DVDRAM 1.0 DS SL 2 2 12 5.16 4.80 DVDRAM 2.0 DS SL 2 2 12 9.40 8.75 HD DVD SS SL 1 1 8 4.70

44
HD DVD HD DVD HD DVD HD DVD HD DVD HD DVD HD DVD HD DVDRAM SS DL DS SL DS DL SS SL SS DL DS SL DS DL SS SL 1 2 2 1 1 2 2 1 2 2 4 1 2 2 4 1 8 8 8 12 12 12 12 12 9.40 9.40 18.80 15.00 30.00 30.00 60.00 20.00

Magnetic disk drives:


Magnetic disks are coated with a magnetic material such as iron oxide. There are two types: hard disks made of rigid aluminum or glass, and removable diskettes made of flexible plastic. In 1956 the first magnetic hard drive (HD) was invented at IBM; consisting of 50 21-inch (53-cm) disks, it had a storage capacity of 5 megabytes. By the 1990s the standard HD diameter for PCs had shrunk to 3.5 inches (about 8.9 cm), with storage capacities in excess of 100 gigabytes (billions of bytes); the standard size HD for portable PCs (laptops) was 2.5 inches (about 6.4 cm). Since the invention of the floppy disk drive (FDD) at IBM by Alan Shugart in 1967, diskettes have shrunk from 8 inches (about 20 cm) to the current standard of 3.5 inches (about 8.9 cm). FDDs have low capacity generally less than two megabytes and have become obsolete since the introduction of optical disc drives in the 1990s. Hard drives generally have several disks, or platters, with an electromagnetic read/write head for each surface; the entire assembly is called a comb. A microprocessor in the drive controls the motion of the heads and also contains RAM to store data for transfer to and from the disks. The heads move across the disk surface as it spins up to 15,000 revolutions per minute; the drives are hermetically sealed, permitting the heads to float on a thin film of air very close to the disks surface. A small current is applied to the head to magnetize tiny spots on the disk surface for storage; similarly, magnetized spots on the disk generate currents in the head as it moves by, enabling data to be read. FDDs function similarly, but the removable diskettes spin at only a few hundred revolutions per minute. Data are stored in close concentric tracks that require very precise control of the read/write heads. Refinements in controlling the heads have enabled smaller and closer packing of tracksup to 20,000 tracks per inch (8,000 tracks per cm) by the start of the 21st centurywhich has resulted in the storage capacity of these devices growing nearly 30 percent per year since the 1980s. RAID (redundant array of inexpensive disks) combines multiple disk drives to store data redundantly for greater reliability and faster access. They are used in high-performance computer network servers.

Magnetic tape Magnetic tape, similar to the tape used in tape recorders, has also been used for auxiliary storage, primarily for archiving data. Tape is cheap, but access time is far slower than that of a magnetic disk because it is sequential-access memoryi.e., data must be sequentially read and written as a tape is unwound, rather than

45
retrieved directly from the desired point on the tape. Servers may also use large collections of tapes or optical discs, with robotic devices to select and load them, rather like old-fashioned jukeboxes.

Flash memory:
Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed. It is primarily used in memory cards, USB flash drives, MP3 players and solid-state drives for general storage and transfer of data between computers and other digital products. It is a specific type of EEPROM (electrically erasable programmable read-only memory) that is erased and programmed in large blocks; in early flash the entire chip had to be erased at once. Flash memory costs far less than byte-programmable EEPROM and therefore has become the dominant technology wherever a significant amount of non-volatile, solid state storage is needed. Example applications include PDAs (personal digital assistants), laptop computers, digital audio players, digital cameras and mobile phones. It has also gained popularity in console video game hardware, where it is often used instead of EEPROMs or battery-powered static RAM (SRAM) for game save data. Flash memory is non-volatile, meaning no power is needed to maintain the information stored in the chip. In addition, flash memory offers fast read access times (although not as fast as volatile DRAM memory used for main memory in PCs) and better kinetic shock resistance than hard disks. These characteristics explain the popularity of flash memory in portable devices. Another feature of flash memory is that when packaged in a "memory card," it is extremely durable, being able to withstand intense pressure, extremes of temperature, and even immersion in water. Although technically a type of EEPROM, the term "EEPROM" is generally used to refer specifically to non-flash EEPROM which is erasable in small blocks, typically bytes. Because erase cycles are slow, the large block sizes used in flash memory erasing give it a significant speed advantage over old-style EEPROM when writing large amounts of data. Principles of operation Flash memory stores information in an array of memory cells made from floating-gate transistors. In traditional single-level cell (SLC) devices, each cell stores only one bit of information. Some newer flash memory, known as multi-level cell (MLC) devices, can store more than one bit per cell by choosing between multiple levels of electrical charge to apply to the floating gates of its cells. The floating gate may be conductive (typically polysilicon in most kinds of flash memory) or nonconductive (as in SONOS flash memory). Flash file systems Because of the particular characteristics of flash memory, it is best used with either a controller to perform wear leveling and error correction or specifically designed flash file systems, which spread writes over the media and deal with the long erase times of NOR flash blocks. The basic concept

46
behind flash file systems is: When the flash store is to be updated, the file system will write a new copy of the changed data to a fresh block, remap the file pointers, then erase the old block later when it has time. In practice, flash file systems are only used for memory technology devices (MTDs), which are embedded flash memories that do not have a controller. Removable flash memory cards and USB flash drives have built-in controllers to perform wear leveling and error correction so use of a specific flash file system does not add any benefit Capacity Multiple chips are often arrayed to achieve higher capacities for use in consumer electronic devices such as multimedia players or GPS. The capacity of flash chips generally follows Moore's Law because they are manufactured with many of the same integrated circuits techniques and equipment. Consumer flash drives typically have sizes measured in powers of two (e.g., 512 MB, 8 GB). This includes SSDs as hard drive replacements, even though traditional hard drives tend to use decimal units. Thus, an SSD marked as "64 GB" is actually 64 1,0243 bytes (64 GB). In reality, most users will have slightly less capacity than this available, due to the space taken by file system metadata. In 2005, Toshiba and SanDisk developed a NAND flash chip capable of storing 1 GB of data using multi-level cell (MLC) technology, capable of storing two bits of data per cell. In September 2005, Samsung Electronics announced that it had developed the worlds first 2 GB chip. In March 2006, Samsung announced flash hard drives with a capacity of 4 GB, essentially the same order of magnitude as smaller laptop hard drives, and in September 2006, Samsung announced an 8 GB chip produced using a 40-nm manufacturing process. In January 2008, Sandisk announced availability of their 16 GB MicroSDHC and 32 GB SDHC Plus cards. In 2009, Kingston announced a 256 GB flash drive available only in the UK and other parts of Europe. As of 2010, however, it is available in the USA. There are still flash-chips manufactured with capacities under or around 1 MB, e.g., for BIOS-ROMs and embedded applications. Transfer rates NAND flash memory cards are much faster at reading than writing so it is the maximum read speed that is commonly advertised. As a chip wears out, its erase/program operations slow down considerably, requiring more retries and bad block remapping. Transferring multiple small files, each smaller than the chip-specific block size, could lead to much a lower rate. Access latency also influences performance, but less so than with their hard drive counterpart. The speed is sometimes quoted in MB/s (megabytes per second), or as a multiple of that of a legacy single speed CD-ROM, such as 60, 100 or 150. Here 1 is equivalent to 150 kB/s. For example, a 100 memory card gives 150 kB/s 100 = 15,000 kB/s = 14.65 MB/s.

47
Performance also depends on the quality of memory controllers. Even when the only change to manufacturing is die-shrink, the absence of an appropriate controller can result in degraded speeds.

Applications Serial flash Serial flash is a small, low-power flash memory that uses a serial interface, typically SPI, for sequential data access. When incorporated into an embedded system, serial flash requires fewer wires on the PCB than parallel flash memories, since it transmits and receives data one bit at a time. This may permit a reduction in board space, power consumption, and total system cost. There are several reasons why a serial device, with fewer external pins than a parallel device, can significantly reduce overall cost:

Many ASICs are pad-limited, meaning that the size of the die is constrained by the number of wire bond pads, rather than the complexity and number of gates used for the device logic. Eliminating bond pads thus permits a more compact integrated circuit, on a smaller die; this increases the number of dies that may be fabricated on a wafer, and thus reduces the cost per die. Reducing the number of external pins also reduces assembly and packaging costs. A serial device may be packaged in a smaller and simpler package than a parallel device. Smaller and lower pin-count packages occupy less PCB area. Lower pin-count devices simplify PCB routing.

Firmware storage With the increasing speed of modern CPUs, parallel flash devices are often much slower than the memory bus of the computer they are connected to. Conversely, modern SRAM offers access times below 10 ns, while DDR2 SDRAM offers access times below 20 ns. Because of this, it is often desirable to shadow code stored in flash into RAM; that is, the code is copied from flash into RAM before execution, so that the CPU may access it at full speed. Device firmware may be stored in a serial flash device, and then copied into SDRAM or SRAM when the device is powered-up. Using an external serial flash device rather than on-chip flash removes the need for significant process compromise (a process that is good for high speed logic is generally not good for flash and viceversa). Once it is decided to read the firmware in as one big block it is common to add compression to allow a smaller flash chip to be used. Typical applications for serial flash include storing firmware for hard drives, Ethernet controllers, DSL modems, wireless network devices, etc. Flash memory as a replacement for hard drives One more recent application for flash memory is as a replacement for hard disks. Flash memory does not have the mechanical limitations and latencies of hard drives, so a solid-state drive, or SSD, is attractive when considering speed, noise, power consumption, and reliability. Flash drives are gaining traction as mobile device secondary storage devices; they are also used as hard drives in highperformance desktop computers and some servers with RAID and SAN architectures. There remain some aspects of flash-based SSDs that make them unattractive. Most important, the cost per gigabyte of flash memory remains significantly higher than that of platter-based hard drives.

48
Although this ratio is decreasing rapidly for flash memory, it is not yet clear that flash memory will catch up to the capacities and affordability offered by platter-based storage. Still, research and development is sufficiently vigorous that it is not clear that it will not happen, either. There are many competing, incompatible memory card formats, almost one for every manufacturer. Among these formats of memory cards, the most common are

Compact Flash Secure Digital cards (called SD Card) Memory Stick SmartMedia MMC (MultimediaCard) xD picture card

UNIT III: Basic Computer Hardware Architecture:


Computer architecture or digital computer organization is the conceptual design and fundamental operational structure of a computer system. It's a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit (CPU) performs internally and accesses addresses in memory. It may also be defined as the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals. Computer architecture comprises at least three main subcategories:

Instruction set architecture, or ISA, is the abstract image of a computing system that is seen by a machine language (or assembly language) programmer, including the instruction set, word size, memory address modes, processor registers, and address and data formats.

Micro architecture, also known as Computer organization is a lower level, more concrete and detailed, description of the system that involves how the constituent parts of the system are interconnected and how they interoperate in order to implement the ISA. The size of a computer's cache for instance, is an organizational issue that generally has nothing to do with the ISA.

System Design which includes all of the other hardware components within a computing system such as:

1. System interconnects such as computer buses and switches 2. Memory controllers and hierarchies

49 3. CPU off-load mechanisms such as direct memory access (DMA) 4. Issues like multiprocessing.
Most computers follow ISA or Stored Program Architecture or the Fetch-Decode-Execute Architecture. It simply means that programs (together with data) are stored in main memory during execution. Type of Programming Languages: 1. 2. 3. 4.

Machine Language Assembly Language High-Level Language 4GL Language

Machine Language the natural or primitive language that the computer actually understands. This programming language consists of 0s and 1s which makes programming very difficult. Assembly Language a programming language that uses abbreviations or mnemonics in place of binary patterns in order to make the task of programming easier. Assembler is a special program that translates assembly language mnemonics into machine language. Both Machine Language and Assembly Language are Low-Level Languages. High Level Language a programming language that uses English-like commands or instructions. Also known as the third generation language. A compiler is a special program that translates high-level language instructions into machine language. Examples are FORTRAN, COBOL, BASIC, and PASCAL. Fourth-Generation Language (4GL) is a programming language designed with a specific purpose in mind such as the development of commercial business software. All 4GLs are designed to reduce: Programming effort The time it takes to develop software The cost of software development

Advantages of High-Level Languages: 1. Easy to learn. 2. Predefined Functions. 3. Portability. Advantages of Low-Level Languages: 1. Compact Code 2. Speed 3. Flexible Once both ISA and micro architecture have been specified, the actual device needs to be designed into hardware. This design process is called the implementation. Implementation is usually not considered architectural definition, but rather hardware design engineering.

50
Implementation can be further broken down into three (not fully distinct) pieces:

Logic Implementation design of blocks defined in the micro architecture at (primarily) the register-transfer and gate levels. Circuit Implementation transistor-level design of basic elements (gates, multiplexers, latches etc.) as well as of some larger blocks (ALUs, caches etc.) that may be implemented at this level, or even (partly) at the physical level, for performance reasons. Physical Implementation physical circuits are drawn out, the different circuit components are placed in a chip floor plan or on a board and the wires connecting them are routed.

For CPUs, the entire implementation process is often called CPU design. Design goals: Performance Computer performance is often described in terms of clock speed (usually in MHz or GHz). This refers to the cycles per second of the main clock of the CPU. However, this metric is somewhat misleading, as a machine with a higher clock rate may not necessarily have higher performance. As a result manufacturers have moved away from clock speed as a measure of performance. Computer performance can also be measured with the amount of cache a processor has. If the speed, MHz or GHz, were to be a car then the cache is like the gas tank. No matter how fast the cargoes, it will still need to get gas. The higher the speed, and the greater the cache, the faster a processor runs. Modern CPUs can execute multiple instructions per clock cycle, which dramatically speeds up a program. Other factors influence speed, such as the mix of functional units, bus speeds, available memory, and the type and order of instructions in the programs being run. There are two main types of speed, latency and throughput. Latency is the time between the start of a process and its completion. Throughput is the amount of work done per unit time. Interrupt latency is the guaranteed maximum response time of the system to an electronic event (e.g. when the disk drive finishes moving some data). Performance is affected by a very wide range of design choices for example, pipelining a processor usually makes latency worse (slower) but makes throughput better. Computers that control machinery usually need low interrupt latencies. These computers operate in a real-time environment and fail if an operation is not completed in a specified amount of time. For example, computer-controlled anti-lock brakes must begin braking almost immediately after they have been instructed to brake. Power consumption Power consumption is another design criterion that factors in the design of modern computers. Power efficiency can often be traded for performance or cost benefits. With the increasing power density of modern circuits as the number of transistors per chip scales (Moore's law), power efficiency has increased in importance. Recent processor designs such as the Intel Core 2 put more emphasis on increasing power efficiency. Also, in the world of embedded computing, power efficiency has long been and remains the primary design goal next to performance.

51

Functional Units:
An execution unit (also called a functional unit) is a part of a CPU that performs the operations and calculations called for by the computer program. It may have its own internal control sequence unit (not to be confused with the CPUs main control unit), some registers, and other internal units such as a sub-ALU or FPU, or some smaller, more specific components. Digital computer systems consist of three distinct units. These units are as follows:

Input unit Central Processing unit Output unit

These units are interconnected by electrical cables to permit communication between them. This allows the computer to function as a system. Input Unit: A computer must receive both data and program statements to function properly and be able to solve problems. The method of feeding data and programs to a computer is accomplished by an input device. Computer input devices read data from a source, such as magnetic disks, and translate that data into electronic impulses for transfer into the CPU. Some typical input devices are a keyboard, a mouse, or a scanner. Central Processing Unit: The brain of a computer system is the central processing unit (CPU). The CPU processes data transferred to it from one of the various input devices. It then transfers either an intermediate or final result of the CPU to one or more output devices. A central control section and work areas are required to perform calculations or manipulate data. The CPU is the computing center of the system. It consists of a control section, an arithmetic-logic section (fig. 3-1), and an internal storage section (main memory). Each section within the CPU serves a specific function and has a particular relationship with the other sections within the CPU. Control Unit: The control unit directs the flow of traffic (operations) and data. It also maintains order within the computer. The flow of control is indicated by dotted arrows in figure 3-1. The control section selects one program statement at a time from the program storage area, interprets the statement, and sends the appropriate electronic impulses to the arithmetic-logic and storage sections so they can carry out the instructions. The control section does not perform actual processing operations on the data. The control section instructs the input device on when to start and stop transferring data to the input storage area. It also tells the output device when to start and stop receiving data from the output storage area. Arithmetic-Logic Unit: The arithmetic-logic unit performs arithmetic operations, such as addition, subtraction, multiplication, and division. Through internal logic capability, it tests various conditions encountered during processing and takes action based on the result. As indicated by the solid arrows in figure 3-1, data flows between the arithmetic-logic section and the internal storage section during processing. Specifically, data is transferred as needed from the storage section to the arithmetic-logic section, processed, and returned to internal storage. At no time does processing take place in the storage section. Data may be transferred back and forth between these two sections several times

52
before processing is completed. The results are then transferred from internal storage to an output device, as indicated by the solid arrow in figure 3-1. INTERNAL STORAGE SECTION: The internal storage section is sometimes called primary storage, main storage, or main memory, because this section functions similar to our own human memory. The storage section serves four purposes; three relate to retention (holding) of data during processing. First, as indicated by the solid arrow (fig. 3-1), data is transferred from an input device to the INPUT STORAGE AREA where it remains until the computer is ready to process it. Second, a WORKING STORAGE AREA ("scratch pad" memory) within the storage section holds both the data being processed and the intermediate results of the arithmetic-logic operations. Third, the storage section retains the processing results in the OUTPUT STORAGE AREA. From there the processing results can be transferred to an output device. The fourth storage section, the PROGRAM STORAGE AREA, contains the program statements transferred from an input device to process the data. Please note that the four areas (input, working storage, output, and program storage) are NOT fmed in size or location but are determined by individual program requirements.

Figure 3-1 Sections of a CPU Output Unit: As program statements and data are received by the CPU from an input device, the results of the processed data are sent from the CPU to an OUTPUT DEVICE. These results are transferred from the

53
output storage area onto an output medium, such as a floppy disk, hard drive, video display, printer, and so on.

Instruction Formats:
instruction format An instruction is normally made up of a combination of an operation code and some way of specifying an operand, most commonly by its location or address in memory though non memory reference instructions can exist. Some operation codes deal with more than one operand; the locations of these operands may be specified using any of the many addressing schemes. Classically, the number of address references has been used to specify something about the architecture of a particular computer. In some instruction formats and machine architectures, the number of operand references may be fixed; in others the number is variable. In the former case descriptions of formats include one-address, two-address, three-address, and (now rarely) fouraddress. An example (symbolically) of a one-address instruction is add x i.e. add contents of address x to contents of accumulator; sum remains in accumulator. An example of a three-address instruction is add x,y,z i.e. add contents of address x to contents of address y; sum is placed in location z. In some cases the last address is the address of the next instruction to be executed. The ability to specify this address was important when rotating (drum) main memories were prominent. Thus a twoaddress instruction such as add x,y i.e. add contents of address x to contents of address y; sum is placed at address y, may become add x,y,z i.e. add contents of address x to contents of address y; sum is placed at address y; next instruction is taken from address z. The latter may be called either a three-address instruction or a two-plus-one-address instruction. In a similar way the term one-plus-one address instruction represents a one-address instruction together with the address where the next instruction is to be found. In these two cases the instructions do not come from sequential addresses; an instruction counter, if present, is bypassed. The figure shows three examples of possible/typical instruction formats. In early computers instruction formats were forced into a fixed word size, that of the computer. An

54
instruction format consisted of two fields: one containing the operation code and the other containing the address(es). As additional features of address modification became available, it was necessary to add special bit positions in the instruction word to specify functions such as indirect addressing, use of index registers, use of base registers in relative addressing, etc. Still other bits were sometimes used to allow for reference to parts of a data word; this was usually as fractions of the word, as character positions, more recently as byte positions. All instructions are 32 bits long. There are four types of instruction format. Arithmetic instruction format Conditional Branch and Immediate format Unconditional Jump format Input and Output instruction format Arithmetic instruction format 2 bits 6 bits 00 OPCODE 4 bits S-reg 4 bits S-reg 4 bits D-reg 12 bits 000

The first two bits are always 00, indicating that the instruction is an Arithmetic or Register transfer type of instruction. S-reg is the source register. D-reg is the destination register. The last 12 bits are always 0, as they are not used. Conditional Branch and Immediate format 2 bits 6 bits 01 OPCODE 4 bits B-reg 4 bits D-reg 16 bits Address

The first two bits are always 01, indicating that the instruction is a Conditional Branch and Immediate type of instruction. B-reg is the base register. D-reg is the destination register. The last 16 bits may be an address or an immediate data. When the last 16 bits contain data, the D-reg is always 0000. The Address may at times be treated as data, which is direct addressing. An indirect Address is calculated as : Effective Address = Content (B-reg) + Address Conditional Branch checks for B and D reg to cause a branch, to a specified Address, or not

Unconditional Jump format 2 bits 6 bits 10 OPCODE 24 bits Address

The first two bits are always 10, indicating that the instruction is an Unconditional Jump type of instruction, with a jump to the specified Address. Input and Output instruction format 2 bits 6 bits 11 OPCODE

4 bits Reg 1

4 bit Reg 2

16 bits Address

The first two bits are always 11, indicating that the instruction is an Input and Output type of instruction.

55
The instruction may read the content of Address/Reg 2 into Reg 1. The instruction may write the content of Reg 1 into a specified Address/Reg 2.

Registers There are 16 registers; each of 32 bit long. Reg-0 (0000) being the Accumulator. Reg-1(0001) being the Zero register, which contains the value 0. All other registers are general purpose register. Buffers Input buffer containing data read by the program Output buffer containing data produced by the program Temp buffer area in memory to store/retrieve the data temporarily.

Addressing mode:
Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how machine language instructions in that architecture identify the operand (or operands) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere. In computer programming, addressing modes are primarily of interest to compiler writers and to those who write code directly in assembly language. Types of Addressing Modes Each instruction of a computer specifies an operation on certain data. The are various ways of specifying address of the data to be operated on. These different ways of specifying data are called the addressing modes. The most common addressing modes are:

Immediate addressing mode Direct addressing mode Indirect addressing mode Register addressing mode Register indirect addressing mode Displacement addressing mode Stack addressing mode

To specify the addressing mode of an instruction several methods are used. Most often used are : a) Different operands will use different addressing modes. b) One or more bits in the instruction format can be used as mode field. The value of the mode field determines which addressing mode is to be used. The effective address will be either main memory address of a register. Immediate Addressing:

56
This is the simplest form of addressing. Here, the operand is given in the instruction itself. This mode is used to define a constant or set initial values of variables. The advantage of this mode is that no memory reference other than instruction fetch is required to obtain operand. The disadvantage is that the size of the number is limited to the size of the address field, which most instruction sets is small compared to word length. Direct Addressing: In direct addressing mode, effective address of the operand is given in the address field of the instruction. It requires one memory reference to read the operand from the given location and provides only a limited address space. Length of the address field is usually less than the word length. Ex : Move P, Ro, Add Q, Ro P and Q are the address of operand. Indirect Addressing: Indirect addressing mode, the address field of the instruction refers to the address of a word in memory, which in turn contains the full length address of the operand. The advantage of this mode is that for the word length of N, an address space of 2N can be addressed. He disadvantage is that instruction execution requires two memory reference to fetch the operand Multilevel or cascaded indirect addressing can also be used. Register Addressing: Register addressing mode is similar to direct addressing. The only difference is that the address field of the instruction refers to a register rather than a memory location 3 or 4 bits are used as address field to reference 8 to 16 generate purpose registers. The advantages of register addressing are Small address field is needed in the instruction. Register Indirect Addressing: This mode is similar to indirect addressing. The address field of the instruction refers to a register. The register contains the effective address of the operand. This mode uses one memory reference to obtain the operand. The address space is limited to the width of the registers available to store the effective address. Displacement Addressing: In displacement addressing mode there are 3 types of addressing mode. They are : 1) 2) 3) Relative addressing Base register addressing Indexing addressing.

This is a combination of direct addressing and register indirect addressing. The value contained in one address field. A is used directly and the other address refers to a register whose contents are added to A to produce the effective address. Stack Addressing: Stack is a linear array of locations referred to as last-in first out queue. The stack is a reserved block of location, appended or deleted only at the top of the stack. Stack pointer is a register which stores the address of top of stack location. This mode of addressing is also known as implicit addressing.

Basic I/O Devices:

57
Input/output, or I/O, refers to the communication between an information processing system (such as a computer), and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an input or output operation. I/O devices are used by a person (or other system) to communicate with a computer. For instance, a keyboard or a mouse may be an input device for a computer, while monitors and printers are considered output devices for a computer. Devices for communication between computers, such as modems and network cards, typically serve for both input and output. Note that the designation of a device as either input or output depends on the perspective. Mouse and keyboards take as input physical movement that the human user outputs and convert it into signals that a computer can understand. The output from these devices is input for the computer. Similarly, printers and monitors take as input signals that a computer outputs. They then convert these signals into representations that human users can see or read. For a human user the process of reading or seeing these representations is receiving input. These interactions between computers and humans is studied in a field called humancomputer interaction. Input and Output Devices Before a computer can process your data, you need some method to input the data into the machine. The device you use will depend on what form this data takes (be it text, sound, artwork, etc.). Similarly, after the computer has processed your data, you often need to produce output of the results. This output could be a display on the computer screen, hardcopy on printed pages, or even the audio playback of music you composed on the computer. The terms input and output are used both as verbs to describe the process of entering or displaying the data, and as nouns referring to the data itself entered into or displayed by the computer. Below we discuss the variety of peripheral devices used for computer input and output. Input Devices Keyboard A keyboard's primary function is to act as an input device. Using a keyboard, a person can type a document, use keystroke shortcuts, access menus, play games and perform a variety of other tasks. Keyboards can have different keys depending on the manufacturer, the operating system they're designed for, and whether they are attached to a desktop computer or part of a laptop. But for the most part, these keys, also called keycaps, are the same size and shape from keyboard to keyboard. They're also placed at a similar distance from one another in a similar pattern, no matter what language or alphabet the keys represent. Most keyboards have between 80 and 110 keys, including:

Typing keys A numeric keypad Function keys Control keys

The typing keys include the letters of the alphabet, generally laid out in the same pattern used for typewriters. According to legend, this layout, known as QWERTY for its first six letters, helped keep mechanical typewriters' metal arms from colliding and jamming as people typed. Some people

58
question this story -- whether it's true or not, the QWERTY pattern had long been a standard by the time computer keyboards came around. The numeric keypad is a more recent addition to the computer keyboard. As the use of computers in business environments increased, so did the need for speedy data entry. Since a large part of the data was numbers, a set of 17 keys, arranged in the same configuration found on adding machines and calculators, was added to the keyboard. In 1986, IBM further extended the basic keyboard with the addition of function and control keys. Applications and operating systems can assign specific commands to the function keys. Control keys provide cursor and screen control. Four arrow keys arranged in an inverted T formation between the typing keys and numeric keypad move the cursor on the screen in small increments. Other common control keys include:

Home End Insert Delete Page Up Page Down Control (Ctrl) Alternate (Alt) Escape (Esc)

The Windows keyboard adds some extra control keys: two Windows or Start keys, and an Application key. Apple keyboards, on the other hand, have Command (also known as "Apple") keys. A keyboard developed for Linux users features Linux-specific hot keys, including one marked with "Tux" the penguin -- the Linux logo/mascot. Most keyboards attach to the PC via a PS/2 connector or USB port (newer). Older Macintosh computers used an ABD connector, but for several years now all Mac keyboards have connected using USB. Different Types of Keyboards - Connection Type Wireless Keyboards The wireless keyboards use three basic types of connections,

Bluetooth Keyboards Infrared (IR) Keyboards Radio Frequency Keyboards

The radio frequency keyboards get the required power from batteries or has a USB cable to charge the keyboard. The infrared keyboard are to be kept in the line of sight of the receiver. On the other hand, the radio frequency keyboards provides a greater range than the infrared keyboards. The bluetooth keyboards use a bluetooth technology, which provides a greater range than the radio frequency keyboard and infrared keyboards. The radio frequency keyboards offer a greater mobility than the bluetooth and the infrared keyboards. Wired Keyboards The PS/2 and USB are the two wired connections that connect the keyboards to your desktop computers. The PS/2 keyboards are very commonly used and they are called so because they use the

59
PS/2 connection. They are one of the cheapest keyboards that are available in the market. The USB keyboards use a USB (Universal Serial Bus) to connect to the CPU. The PS/2 and USB keyboards are usually plug and play. Other types of keyboards are a bit expensive and require expensive software applications to be installed. Different Types of Keyboards - Special Keys Internet Keyboards The internet keyboards are designed to increase the comfort level of the internet user. The internet keyboards have hot-keys for the home page of the web browser, inbox and the favorites menu on your computer. Multimedia and Gaming Keyboards The multimedia and gaming keyboards are designed for playing audio and has hot-keys for volume control, play, stop and mute operations. The gaming keyboards are designed for the convenience of the gamers and these types of keyboards provide the required controls on the keyboards like backlighting. Virtual Keyboards The virtual keyboards are not actually physical keyboards, but they are simulated using a software. Usually, the virtual keyboards are used in the PDA.

System console
The system console, root console or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger. It is a physical device consisting of a keyboard and a screen. On traditional minicomputers, the console was a serial console, an RS-232 serial link to a terminal such as a DEC VT100. This terminal was usually kept in a secured room since it could be used for certain privileged functions such as halting the system or selecting which media to boot from. Large midrange systems, e.g. those from Sun Microsystems, Hewlett-Packard and IBM, still use serial consoles. In larger installations, the console ports are attached to multiplexers or network-connected multiport serial servers that let an operator connect a terminal to any of the attached servers. Today, serial consoles are often used for accessing headless systems, usually with a terminal emulator running on a laptop. Also, routers, enterprise network switches and other telecommunication equipment have RS-232 serial console ports. On PCs and workstations, the computer's attached keyboard and monitor have the equivalent function. Since the monitor cable carries video signals, it cannot be extended very far. Often, installations with many servers therefore use keyboard/video multiplexers (KVM switches) and possibly video amplifiers to centralize console access. In recent years, KVM/IP devices have become available that allow a remote computer to view the video output and send keyboard input via any TCP/IP network and therefore the Internet. Some PC BIOSes, especially in servers, also support serial consoles, giving access to the BIOS through a serial port so that the simpler and cheaper serial console infrastructure can be used. Even

60
where BIOS support is lacking, some operating systems, e.g. FreeBSD and Linux, can be configured for serial console operation either during bootup, or after startup.

Pointing Devices
The graphical user interfaces (GUIs) in use today require some kind of device for positioning the onscreen cursor. Typical pointing devices are: mouse, trackball, touch pad, track point, graphics tablet, joystick, and touch screen. Pointing devices, such as a mouse, connected to the PC via a serial ports (old), PS/2 mouse port (newer), or USB port (newest). Older Macs used ADB to connect their mice, but all recent Macs use USB (usually to a USB port right on the USB keyboard).

Mouse
PC Keyboard (you have one in front of you that you can see for a closer look) The mouse pointing device sits on your work surface and is moved with your hand. In older mice, a ball in the bottom of the mouse rolls on the surface as you move the mouse, and internal rollers sense the ball movement and transmit the information to the computer via the cord of the mouse. The newer optical mouse does not use a rolling ball, but instead uses a light and a small optical sensor to detect the motion of the mouse by tracking a tiny image of the desk surface. Optical mice avoid the problem of a dirty mouse ball, which causes regular mice to roll unsmoothly if the mouse ball and internal rollers are not cleaned frequently. A cordless or wireless mouse communicates with the computer via radio waves (often using BlueTooth hardware and protocol) so that a cord is not needed (but such mice need internal batteries). A mouse also includes one or more buttons (and possibly a scroll wheel) to allow users to interact with the GUI. The traditional PC mouse has two buttons, while the traditional Macintosh mouse has one button. On either type of computer you can also use mice with three or more buttons and a small scroll wheel (which can also usually be clicked like a button). To facilitate your multiple tasks you can use one of the different types of mice. The mechanical mouse requires a ball to move the cursor on the screen. To get more efficacies with this type of mice, a flat surface named mouse pads is necessary. The optomechanical or optical-mechanical mouse is a combination of the optical and the mechanical technologies. It uses a ball but detects the mouse movement optically. It is now the most commonly used with PC. The optical mouse uses a laser; precisely an optical sensor to help detecting the mouses moving. More expensive than the two other types, the optical mouses offer more precision and speed and even can be used on any surface. Trackball The trackball is sort of like an upside-down mouse, with the ball located on top. You use your fingers to roll the trackball,

61
and internal rollers (similar to whats inside a mouse) sense the motion which is transmitted to the computer. Trackballs have the advantage over mice in that the body of the trackball remains stationary on your desk, so you dont need as much room to use the trackball. Early laptop computers often used trackballs (before superior touch pads came along). Trackballs have traditionally had the same problem as mice: dirty rollers can make their cursor control jumpy and unsmooth. But there are modern optical trackballs that dont have this problem because their designs eliminate the rollers. Joysticks Joysticks and other game controllers can also be connected to a computer as pointing devices. They are generally used for playing games, and not for controlling the on-screen cursor in productivity software. Touch screen Some computers, especially small hand-held PDAs, have touch sensitive display screens. The user can make choices and press button images on the screen. You often use a stylus, which you hold like a pen, to write on the surface of a small touch screen. Graphics tablet A graphics tablet consists of an electronic writing area and a special pen that works with it. Graphics tablets allows artists to create graphical images with motions and actions similar to using more traditional drawing tools. The pen of the graphics tablet is pressure sensitive, so pressing harder or softer can result in brush strokes of different width (in an appropriate graphics program). Scanners A scanner is a device that images a printed page or graphic by digitizing it, producing an image made of tiny pixels of different brightness and color values which are represented numerically and sent to the computer. Scanners scan graphics, but they can also scan pages of text which are then run through OCR (Optical Character Recognition) software that identifies the individual letter shapes and creates a text file of the page's contents.

Output Devices
Monitor
Your computer must produce a video signal that a monitor can display. This may be handled by circuitry on the motherboard, but is usually handled by a video card in one of the computers expansion slots; often the slot is a special one dedicated to video use, such as an AGP slot (Accelerated Graphics Port). Video cards are also called video display adapters, and graphics cards. Many video cards contain separate processors and dedicated video memory for generating complex graphics quickly without burdening the CPU. These accelerated graphics cards are loved by gamers. LCD Monitor The traditional output device of a personal computer has been the CRT (Cathode Ray Tube) monitor. Just like a television set (an older one, anyway) the CRT monitor contains a large cathode ray tube that uses an electron beam of varying strength to paint a picture onto the color phosphorescent dots on the inside of the screen. CRT monitors are heavy and use more electrical power than flat panel

62
displays, but they are preferred by some graphic artists for their accurate color rendition, and preferred by some gamers for faster response to rapidly changing graphics. Flat Panel Monitor A flat panel display usually uses an LCD (Liquid Crystal Display) screen to display output from the computer. The LCD consists of several thin layers that polarize the light passing through them. The polarization of one layer, containing long thin molecules called liquid crystals, can be controlled electronically at each pixel, blocking varying amounts of the light to make a pixel lighter or darker. Other types of flat panel technology exist (such as plasma displays) but LCDs are most commonly used in computers, especially laptops.

Printers:
A printer is a peripheral which produces a text and/or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most newer printers, a USB cable to a computer which serves as a document source. Some printers, commonly known as network printers, have built-in network interfaces, typically wireless and/or Ethernet based, and can serve as a hard copy device for any user on the network. Individual printers are often designed to support both local and network connected users at the same time. In addition, a few modern printers can directly interface to electronic media such as memory cards, or to image capture devices such as digital cameras, scanners; some printers are combined with a scanners and/or fax machines in a single unit, and can function as photocopiers. Printers that include non-printing features are sometimes called multifunction printers (MFP), multi-function devices (MFD), or all-in-one (AIO) printers. Most MFPs include printing, scanning, and copying among their features. Printing technology Toner-based printer or Laser Printer A laser printer produces good quality images by the same technology that photocopiers use. A drum coated with photosensitive material is charged, then an image is written onto it by a laser (or LEDs) which makes those areas lose the charge. The drum then rolls through toner (tiny plastic particles of pigment) that is attracted to the charged areas of the drum. The toner is then deposited onto the paper, and then fused into the paper with heat. Most laser printers are monochrome (one color only, usually black), but more expensive laser printers with multiple color toner cartridges can produce color output. Laser printers are faster than ink jet printers. Their speed is rated in pages per minute (ppm). Laser printers are more expensive than ink jets, but they are cheaper to run in the long term if you just need good quality black & white pages.

Ink Jet Printer For hardcopy (printed) output, you need some kind of printer attached to your computer (or available over a network). The most common type of printer for home systems is the color ink jet printer. These printers form the image on the page by spraying tiny droplets of ink from the print

63
head. The printer needs several colors of ink (cyan, yellow, magenta, and black) to make color images. Some photo-quality ink jet printers have more colors of ink. Ink jet printers are inexpensive, but the cost of consumables (ink cartridges and special paper) makes them costly to operate in the long run for many purposes. Typewriter-derived printers Several different computer printers were simply computer-controllable versions of existing electric typewriters. The Friden Flexowriter and IBM Selectric typewriter were the most-common examples. The Flexowriter printed with a conventional typebar mechanism while the Selectric used IBM's wellknown "golf ball" printing mechanism. In either case, the letter form then struck a ribbon which was pressed against the paper, printing one character at a time. The maximum speed of the Selectric printer (the faster of the two) was 15.5 characters per second. Daisy wheel printers Daisy-wheel printers operate in much the same fashion as a typewriter. A hammer strikes a wheel with petals, the "daisy wheel", each petal containing a letter form at its tip. The letter form strikes a ribbon of ink, depositing the ink on the page and thus printing a character. By rotating the daisy wheel, different characters are selected for printing. These printers were also referred to as letterquality printers because, during their heyday, they could produce text which was as clear and crisp as a typewriter, though they were nowhere near the quality of printing presses. The fastest letter-quality printers printed at 30 characters per second. Dot-matrix printers In the general sense many printers rely on a matrix of pixels, or dots, that together form the larger image. However, the term dot matrix printer is specifically used for impact printers that use a matrix of small pins to create precise dots. The advantage of dotmatrix over other impact printers is that they can produce graphical images in addition to text; however the text is generally of poorer quality than impact printers that use letterforms (type). A Tandy 1000 HX with a Tandy DMP-133 dot-matrix printer. Dot-matrix printers can be broadly divided into two major classes:

Ballistic wire printers (discussed in the dot matrix printers article) Stored energy printers

Dot matrix printers can either be character-based or line-based (that is, a single horizontal series of pixels across the page), referring to the configuration of the print head. Dot matrix printers use small electromagnetically activated pins in the print head, and an inked ribbon, to produce images by impact. These printers are slow and noisy, and are not commonly used for personal computers anymore (but they can print multi-layer forms, which neither ink jet nor laser printers can). Other Printers Multi-function printers are available that not only operate as a computer printer, but also include the hardware needed to be a scanner, photocopier, and FAX machine as well.

64

Plotter:
A graphics printer that draws images with ink pens. It actually draws point-to-point lines directly from vector graphics files. The plotter was the first computer output device that could print graphics as well as accommodate full-size engineering and architectural drawings. Using different colored pens, it was also able to print in color long before inkjet printers became an alternative. Plotters are special output devices used to produce hard copies of large graphs and designs on paper. Plotters are often used for the production of construction maps, engineering drawings, architectural plans and business charts. They can be a component that is added to your computer system and may have their own internal computer. Drum Plotter A drum plotter is pen plotter or Roller Plotter that wraps the paper around a drum with a pin feed attachment. The drum then rotates the paper as pens move across it and draw the image. It was the first output device used to print graphics and large engineering drawings. Drum Plotters are used to produce continuous output, such as plotting earthquake activity.

There are two types of drum plotters, external and internal. With an external drum plotter, the paper is wrapped around its external surface, while the internal drum plotter uses a sheet of paper wrapped around its internal surface. Flat-Bed Plotter A flatbed plotter is also known as Table Plotter. It plots on paper that is spread and fixed over a rectangular flatbed table. The flatbed plotter uses two robotic drawing arms, each of which holds a set of colored ink pens or pencils. The drawing arms move over the stationary paper and draw the graph on the paper. Typically, the plot size is equal to the area of a bed. The plot size may be 20- by-50 feet. It is used in the design of cars, ships, aircrafts, buildings, highways etc. Flatbed plotter is very slow in drawing or printing graphs. The large and complicated drawing can take several hours to print. The main reason of the slow printing is due to the movement mechanical devices. Inkjet Plotter The inkjet plotter creates an image by spraying small droplets of ink onto a piece of paper. A popular choice for advertising agencies and graphic designers, inkjet plotters are used generally for large outputs, such as banners and billboards and large signs often seen on roadsides. They are available in thermal or piezoelectric models. Thermal inkjet plotters use heat to apply droplets of ink, while piezoelectric plotters use charged crystals to apply the ink. Inkjet plotters tend to produce better quality graphics than other types of plotters.

65
Uses Plotters are commonly used in architecture and engineering fields. Sometimes referred to as large format or wide-format printing devices, plotters can also be used to create signs. Any technical drawing or design where precision in needed in a large size is a good candidate for a plotter. Features Plotters employ pens as printing devices instead of cartridges. Plotters draw lines instead of dots on the paper. Plotters cannot print shaded areas very well, and usually use hatching to represent such features. Plotters can print in different colors using different pen tips. In addition to being outfitted with pens, plotters can be fitted with cutting tips or pounce wheels that perforate the paper. These features are useful in sign or banner design. Benefits Plotters offer more precise printing than traditional printers. When it comes to blueprints and other technical drawings, plotters create exact drawings of what construction workers will later build. Plotter Sizes Plotters come in different sizes. For example, a smaller plotter may be used for small drawings, schematics or integrated diagrams. An engineering or architectural firm that required large, numbersbased charts would need a larger plotter. Typical plotter sizes range from 13 to 60 inches wide.

Scanners:
A scanner is an electronic device that scans printed or handwritten text documents, images, or a particular object to convert them into a digital file format. Most of the scanners use CCD, (chargecoupled device) or CIS, (Contact Image Sensor) as the image sensors. The common types of scanners we see today are flatbed scanners, handheld scanners, sheetfed scanners, etc. Flatbed Scanner A flatbed scanner is made up of a glass pane and a moving optical CIS or CCD array. The pane is illuminated with the help of bright light planted underneath it. The image which is to be scanned is then placed on the glass pane. The sensor and the source of light move across the glass pane to scan the document and produce its digital copy. Sheetfed Scanner In sheetfed scanners, the document that is supposed to be scanned is fed into the horizontal or vertical slot provided in the scanner. The vital components of sheetfed scanner are the sheet-feeder, scanning module and calibration sheet. Such scanners are most often used to scan single page documents. It cant be used to scan thicker objects, like books, which turn out to be its major drawback. Handheld Scanner A handheld scanner is a small manual scanning device which is moved over the object that need to be scanned. For instance, if a document needs to be scanned, the handheld scanner has to be dragged over the document. Using a handheld scanner can prove to be a cumbersome task, as the hand needs to be steady all the time. Slight movement of the hand can lead to distortion of

66
the image. One of the most utilized handheld scanner is the barcode scanner, typically used in shopping stores to valuate goods. Photo Scanner Photo scanners are mostly used to scan photographs. High resolution and color depth are the most vital requirements for scanning photographs, and photo scanner provides the same. If the motive of buying a scanner is to digitize film negatives and slides, then the photo scanner is the best option. They are specially designed to work on slides and negatives. The in-built software in some photo scanners can also help in cleaning old photographs. Film Scanner A film scanner is utilized to scan photographic films directly into a computer. The photographer has direct control over certain aspects, such as cropping, ratio of original image on the film, etc. Some film scanners have specialized softwares through which it is possible to minimize scratches and improve color quality. Low-end film scanners most often accept 35 mm film strips while the high-end scanners have interchangeable film loaders which can accept 35 mm strips or 120 mm ones, or individual slides.

Portable Scanners Being small in size, portable scanners can be easily carried with oneself anywhere. Some scanners are as small as your PDAs, hence, can be easily carried in the pockets. Such scanners are useful for text document scanning. The drawback of these scanners is their limitation as far as resolution is concerned. They cannot be used for scanning photographs or other such applications which require high resolution scanning. These were the different types of scanners being widely used today. Over the last few years, these machines have become an important element of computer technology, wherein vast amount of data is required to be converted to digital format every day.

Basic CPU Architecture:


The main components in a typical computer system are the processor, memory, input/output devices, and the communication channels that connect them. The processor is the workhorse of the system; it is the component that executes a program by performing arithmetic and logical operations on data. It is the only component that creates new information by combining or modifying current information. In a typical system there will be only one processor, known at the central processing unit, or CPU. Modern high performance systems, for example vector processors and parallel processors, often have more than one processor. Systems with only one processor are serial processors, or, especially among computational scientists, scalar processors.

67
Memory is a passive component that simply stores information until it is requested by another part of the system. During normal operations it feeds instructions and data to the processor, and at other times it is the source or destination of data transferred by I/O devices. Information in a memory is accessed by its address. In programming language terms, one can view memory as a one-dimensional array M. A processor's request to the memory might be ``send the instruction at location M[1000]'' or a disk controller's request might be ``store the following block of data in locations M[0] through M[255].'' Input/output (I/O) devices transfer information without altering it between the external world and one or more internal components. I/O devices can be secondary memories, for example disks and tapes, or devices used to communicate directly with users, such as video displays, keyboards, and mouses. The communication channels that tie the system together can either be simple links that connect two devices or more complex switches that interconnect several components and allow any two of them to communicate at a given point in time. When a switch is configured to allow two devices to exchange information, all other devices that rely on the switch are blocked, i.e. they must wait until the switch can be reconfigured. Processors The operation of a processor is characterized by a fetch-decode-execute cycle. In the first phase of the cycle, the processor fetches an instruction from memory. The address of the instruction to fetch is stored in an internal register named the program counter, or PC. As the processor is waiting for the memory to respond with the instruction, it increments the PC. This means the fetch phase of the next cycle will fetch the instruction in the next sequential location in memory (unless the PC is modified by a later phase of the cycle). Instructions can be classified as one of three major types: arithmetic/logic, data transfer, and control. Arithmetic and logic instructions apply primitive functions of one or two arguments, for example addition, multiplication, or logical AND. In some machines the arguments are fetched from main memory and the result is returned to main memory, but more often the operands are all in registers inside the CPU. Most machines have a set of general purpose registers that can be used for holding such operands. Memories Memories are characterized by their function, capacity, and response times. Operations on memories are called reads and writes, defined from the perspective of a processor or other device that uses a memory: a read transfers information from the memory to the other device, and a write transfers information into the memory. A memory that performs both reads and writes is often just called a RAM, for random access memory. The following terminology is used when discussing hierarchical memories:

The memory closest to the processor is known as a cache. Some systems have separate caches for instructions and data, in which case it has a split cache. An instruction buffer is a special cache for instructions that also performs other functions that make fetching instructions more efficient. The main memory is known as the primary memory. The low end of the hierarchy is the secondary memory. It is often implemented by a disk. The unit of information transferred between items in the hierarchy is a block. Blocks transferred to and from cache are also known as cache lines, and units transferred between primary and secondary memory are also known as pages.

68
Buses A bus is used to transfer information between several different modules. Small and mid-range computer systems. Supercomputers and other high performance machines have more complex interconnections, but many components will have internal buses. Communication on a bus is broken into discrete transactions. Each transaction has a sender and receiver.The performance of a bus is defined by two parameters, the transfer time and the overall bandwidth (sometimes called throughput). I/O Many computational science applications generate huge amounts of data which must be transferred between main memory and I/O devices such as disk, tape, keyboard, monitor and printer. If your application needs to read or write large data files you will need to learn how your system organizes and transfers files and tune your application to fit that system. Operating Systems The user's view of a computer system is of a complex set of services that are provided by a combination of hardware (the architecture and its organization) and software (the operating system). Attributes of the operating system also affect the performance of user programs. Operating systems for all but the simplest personal computers are multi-tasking operating systems. This means the computer will be running several jobs at once. A program is a static description of an algorithm. To run a program, the system will decide how much memory it needs and then start a process for this program; a process (also known as a task) can be viewed as a dynamic copy of a program. For example, the C compiler is a program. Several different users can be compiling their code at the same time; there will be a separate process in the system for each of these invocations of the compiler. Processes in a multi-tasking operating system will be in one of three states. A process is active if the CPU is executing the corresponding program. In a single processor system there will be only one active process at any time. A process is idle if it is waiting to run. In order to allocate time on the CPU fairly to all processes, the operating system will let a process run for a short time (known as a time slice; typically around 20ms) and then interrupt it, change its status to idle, and install one of the other idle tasks as the new active process. The previous task goes to the end of a process queue to wait for another time slice. Supercomputers and parallel processors also use variants of Unix for their runtime environments.

A peripheral is a device attached to a host computer, but not part of it, and is more or less dependent on the host. It expands the host's capabilities, but does not form part of the core computer architecture. Examples are computer printers, image scanners, tape drives, microphones, loudspeakers, webcams, and digital cameras. To install the external peripherals.

69
A: Power Connector - The power connector is a 3-prong male connector which enables you to connect a power cable to the computer Port A to obtain power from an electrical outlet. B: Power Supply Unit (PSU) - The power supply unit provides all the electrical power needed by all the components of your computer system. The visible external fan provides adequate ventilation for the PSU by exhausting hot air from it. C: Mouse Port - The mouse is a pointing device that enables you to move and select items on the screen. It is the most commonly used pointing device. The mouse is connected to Port C. This port is also called a mini-DIN or PS/2 connector. Click here to browse mice D: Keyboard Port - The keyboard is one of the input devices that allows you to enter instructions and information into a computer. The keyboard is connected to Port D. (See diagram above). This port is also known as the mini-DIN or PS/2 connector. The older computers came with a larger port known as a DIN connector. Click here for some cheap computer keyboards E: USB Port - (USB) Acronym for Universal Serial Bus. This Port was developed and invented by Ajay Bhatt while working for Intel. It is intended to replace the different kinds of serial and parallel ports. The old USB 1.0 supported data transfer rates of up to 12 Mbps but the upgrade to USB 2.0 increased data transfer rates by approximately 40 times to 480 Mbps. This port can connect up to 127 peripherals (such as mice, modems, keyboards, etc.) all at once. It also enables hot-swapping which is being able to connect and disconnect peripherals without powering down the PC. Click here to read about USB Ports. F: Parallel Port (Printer Port) - The parallel port is a 25-pin female connector (DB-25). It is an interface for connecting external devices such as a printers and computers that require relatively high bandwidth. It supports bi-directional communications. G: Serial Port (COM Port) - This port is a 9-pin male connector (DB-9) and enables serial communication with a transfer rate of 1 bit. This port can be used to connect a computer peripheral such as a modem, mouse, etc. H: Game Port - The game port is a 15-pin female analog port used to connect game controllers such as joysticks. It can also be used as a Musical Instrument Digital Interface (MIDI) Port for connecting a computer peripheral such as a synthesizer and is located on the sound card. I: Monitor Port - The monitor is a very important computer peripheral that displays images and text generated by the computer. The monitor is connected to Port I which is a 15-pin female connector called a VGA Port. Present computers also use a DVI port for connecting a monitor. New monitors come with DVI and VGA ports. J: Ethernet Port (RJ-45) - The ethernet port accepts an ethernet cable which allows you to communicate on a network that runs Transmission Control Protocol/Internet Protocol(TCP/IP). This port resembles a regular phone jack but is slightly wider and is generally located on the Network Interface Card (NIC) or integrated on the motherboard. K: Modem - The word 'Modem' is a contraction of the words Modulator-Demodulator. It is typically used to send digital data over a phone line. The modem shown in the above diagram is only used for dial-up internet connections. Dial-up internet is mostly used in remote and rural areas where broadband is not prevalent. If you want to be able to surf the Internet or send or receive email, your computer system will need one.

70 Connecting a Printer/ Scanner or Copiers


Most new printers/scanner support Plug and Play, while many older printers/scanner do not. The steps involved in installing a printer/Scanner that is attached to your computer differ depending on whether it supports Plug and Play. consider the following: Does your printer/scanner use infrared technology? If it does, your printer/scanner supports Plug and Play. Consult the owner's manual or packaging of your printer/scanner. Most printer/scanner manufacturers advertise the fact that their printer/scanner supports Plug and Play. Check the connector on the end of the printer/scanner cable that you plug into your computer. If the connector that attaches the printer/scanner cable to the computer is a USB connector, then the printer/scanner supports Plug and Play.

USB connector (type A)

USB connector (type B)

If the connector that attaches the printer cable to the computer is a parallel connector, then the printer/scanner might support Plug and Play, since the earliest Plug and Play printers use a parallel connector. If it is, the computer will inform you that it recognizes the printer/scanner when you turn on the printer and plug the printer cable into the computer. Parallel connector If the connector that attaches the printer/scanner cable to the computer is a serial connector, then the printer does not support Plug and Play.

9-pin (DB9) serial connector


Connecting a Digital Camera The digital camcorder is one of the most popular home products of all times. Camcorders have made shooting videos simple, quick and fun. You can make your home videos even more enjoyable by copying them to your PC, editing them, adding titles and removing those unwanted scenes. Video editing software like Video Edit Magic can help you edit your home movies to make your memories

71
last forever. You can also convert the edited videos to an appropriate format and create a DVD or upload them to an Internet server and share your memories with family and friends. Checklist for connecting a Camcorder to your PC To connect your camcorder to your Windows PC, you require: 1. A FireWire or USB Port on your PC. 2. Microsoft DirectX version 9.0c or higher. 3. Appropriate connecting cables (usually bundled with the camcorder). Most new PCs have a FireWire port or a USB 2.0 connection available. If your PC does not include these ports, you will need to purchase a FireWire expansion card. Connecting your Camcorder to your PC Physically connecting your camcorder to your Windows PC using a FireWire port is easy. Plug the IEEE 1394 connecting cable into the PC and the camcorder. We recommend making the connection before turning on the camcorder. When you turn on the camcorder, it should be automatically detected by Windows. Connecting a memory card:

1. Get a card reader device. If you are going to buy a card


reader then take your memory card with you when going to the store; in the store show the memory card to the staff and ask to find a suitable card reader. We also suggest you to ask the staff to insert the memory card in the card reader they offer, because some card readers do not have labels on the slots. Such a device can be bought in the local electronics store at an average cost of $1020. 2. Connect the card reader to the computer. To do this, take an USB cable that can be easily recognized by the characteristic connectors. Sometimes, an additional power adapter will be supplied with a card reader device. In this case you need to find the port for the power adapter on the card reader device and then plug it in. 3. If you have installed the card reader correctly you should see blinking lights on the card reader device. 4. Remove your memory card from the device (a camera, a mobile phone and the like) and find an appropriate card reader slot. Keep in mind that the card reader may have several slots for the memory cards of various types and physical dimensions. If you try to connect your mobile phone memory card to the computer you may encounter the following problems:

You have a card reader (you have already had one or you have just bought it) but your memory card doesn't fit in any slot of the card reader. There is no an appropriate card reader for the memory card in your local electronics store.

72
Such problems can be easily solved using adapters. For example, having the appropriate adapter, you can convert the Memory Stick Micro card to the Memory Stick mini "card" for which it's much easier to find the appropriate card reader.

Disconnecting peripherals:

Disconnect a digital camera or printer from your computer as per operating system instructions. If you directly connect a digital camera or printer to your computer to transfer photos from a media device or printing a document, never, disconnect the camera while the process is completed! Always wait until the process is complete and use your operating system's "Safely Remove Hardware" feature or equivalent. Failure to heed this advice could ruin data on your media card, possibly requiring a reformat in your computer. Or, in some extreme cases, it can leave the media device unusable, especially with Micro Drive units with their tiny mechanical parts.

Driver Installation
To ensure the best possible user experience, installation of both a hardware device and its software driver should run as seamlessly as possible with minimal user intervention. We provide tools and guidelines to help you create installation packages that meet this goal. Driver Installation for 32-bit and 64-bit Platforms If your hardware device will be installed on both 32-bit platforms and 64-bit platforms, you must provide a native driver package for each platform. You can, however, use a single 32-bit installer to install either driver package. This paper provides information about how to use a 32-bit installation program to install either 32-bit or 64-bit drivers for the Windows family of operating systems. This information applies for the following operating systems: Windows Server 2008 Windows Vista Windows Server 2003 Windows Server 2003 64-Bit Edition Windows XP Windows XP 64-Bit Edition For up-to-date information, see Device Installation Design Guide in the WDK documentation. Included in this white paper: Installation Considerations for 64-bit Platforms Driver Installation Packages for 32-bit and 64-bit Platforms Driver Packages

73
DPInst Installation Packages Driver Package Installers MSI Installation Packages

with

DIFxApp
Examples Launching the Correct Version of DPInst from an Installer Launching the Correct Version of DPInst from a Command

Script Microsoft Windows users


Depending on how the driver has been packaged is what determines how the driver will be installed. Below is additional information about each of the methods developers use to distribute their drivers and how you would install the drivers in Microsoft Windows. General driver tips Below are some general insights to help prevent any additional frustration that may be encountered while installing drivers. Drivers on CD or floppy diskettes: Almost all computer and hardware manufacturers include a group of drivers for different hardware devices and often for each of the supported versions of Windows. For example, the driver CD you receive with your printer likely contains the drivers for dozens of different printers. Not just the printer you purchased, which means when installing the drivers make sure you're installing the drivers for your printer, not another printer model and that you're installing it for the version of Windows you're running on your computer. Below is an example of how a file structure may look on your disk. CD Example: -PrinterA100 --Win9x --Win2k --WinXP -PrinterA200 --Win9x --Win2k --WinXP -PrinterB100 --Win9x --Win2k --WinXP If for example you had a PrinterA200 and were using Windows XP you would find your drivers in the PrinterA200\WinXP directory. Downloading drivers: Almost all drivers you download are going to be a single file if the file is not an executable file it is almost definitely a compressed file that contains all the driver files. In order to install the driver you will first need to uncompress the file. Additional information about how to uncompress a compressed file can be found on document CH000506.

74
When extracting / uncompressing the drivers make sure to remember where you place the folder containing the drivers as you will need to point Windows to this folder when installing the drivers. We usually recommend users install the driver files in a folder on their desktop as it's an easy place to remember and locate. Finally, the single file and/or the files extracted from the compressed file can be deleted after you have finished installing the drivers. Executable Many computer and hardware manufacturers today are pre-packaging their drivers into executable files or have the drivers installed through the setup file, which means simply double-clicking the setup file or the file you download should install the drivers to the computer for you. Note: Many developers may package their drivers in a compressed file, which means before looking for the setup file you may need to uncompress the downloaded file. Information about doing this was explained above. If after uncompressing the file it still does not contain an executable file, some type of setup file, or does not install your hardware device continue with the below recommendations. Finally, if you were successful in installing your drivers make sure to reboot the computer after the drivers have been installed. Using the have disk option Often computer manufacturers and hardware manufacturers will also simply place the drivers on the CD, diskette, or download for Windows to find and use during its hardware detection. Below are steps on how to install drivers for a new device and upgrade a devices driver for this type of setup. Installing a new device Upgrading drivers for pre-existing device Installing a new device

1. Open Windows Device Manager. Information about how to do this can be found on document
CH000833. In the Device Manager make sure the device you're attempting to install is not already listed from past install attempts. If the device is found highlight it and remove it from Device Manager to prevent any conflicts during the install. 2. Once Device Manager looks ok reboot the computer. 3. As the computer is rebooting an install new hardware wizard should appear if Windows detects the new hardware using this wizard you should be able to point Windows to the folder containing your drivers either on the CD, diskette, or the folder containing the files you downloaded. If Windows does not detect any new hardware open Control Panel and double-click the Add hardware icon to run the hardware detection wizard. During the steps you will have an option to tell Windows you have a disk containing the drivers for your new hardware device, at this point Windows to the directory containing the drivers for your device. Once drivers have been installed reboot. Upgrading drivers for pre-existing device

1. Open Windows Device Manager. Information about how to do this can be found on document
CH000833. In the Device Manager locate the device you wish to update the drivers for. 2. Right-click the device and click Properties. 3. In the Properties window click the Driver tab. 4. Click the Update Driver button.

75
5. In the Hardware Update Wizard point Windows to the location of the updated drivers on your hard disk drive Once drivers have been installed reboot. Install through the .inf file Finally, if the above recommendations do not work the installation instructions for drivers and hardware devices are always contained in a .inf file that is located within the drivers. Locate the .inf for your version of Windows, right-click that file and choose the option for install. Note this is a very raw form of installing a drivers and it is important that you make sure you're installing the correct .inf file and not a .inf file for another device or for a different version of Windows. Additional information and tips about locating the drivers was explained earlier in the general driver tips section. Once you have right-clicked and installed the driver, reboot the computer. One of the above three recommendations should have installed / updated the drivers successfully onto the computer. If you're still having difficulties getting the device to install it's possible you're not encountering a hardware issue and not an issue with the drivers. Refer to the troubleshooting steps for your hardware device for additional help and information.

Uninstalling Devices and Driver Packages


After a device is installed, it might be necessary to uninstall a device or a driver package. For example, an end-user might decide to replace the associated device, or the driver package might have to be uninstalled when a driver is updated. When you uninstall a device, you must remove the device node (devnode) that represents the physical instance of the device in the system. When you uninstall a driver package, you must complete the following actions:

Remove the files that are associated with the driver package from the driver store. Delete the binary files of the driver package.

This section describes how to uninstall devices and driver packages. It is intended for driver developers who want to provide instructions or tools to their customers.

Hard Disk Partitioning and Formatting:


Introduction In order to use a hard drive, or a portion of a hard drive, in Windows you need to first partition it and then format it. This process will then assign a drive letter to the partition allowing you to access it in order to use it to store and retrieve data. Hard disk partition When a hard drive is installed in a computer, it must be partitioned before you can format and use it. Partitioning a drive is when you divide the total storage of a drive into different pieces. These pieces are called partitions. Once a partition is created, it can then be formatted so that it can be used on a

76
computer. When partitions are made, you specify the total amount of storage that you would like to allocate to that partition from the total size of the drive. For example, if you have an 80 GB drive, then it would be possible to make one partition consisting of the entire 80 GB of available storage. Alternatively, you could make two partitions consisting of a 20 GB partition that will be used for the operating system and programs and a 60 GB partition set aside for data, music, and images. In the current IBM PC architecture, there is a partition table in the drive's Master Boot Record (section of the hard dirve that contains the commands necessary to start the operating system), or MBR, that lists information about the partitions on the hard drive. This partition table is then further split into 4 partition table entries, with each entries corresponding to a partition. Due to this it is only possible to have four partitions. These 4 partitions are typically known as primary partitions. To overcome this restriction, system developers decided to add a new type of partition called the extended partition. By replacing one of the four primary partitions with an extended partition, you can then make an additional 24 logical partitions within the extended one. The table below illustrates this. Partition Table Primary Partition #1 Primary Partition #2 Primary Partition #3 Primary Partition #4(Extended Partition) Logical Partition #1 Logical Partition #1 As you can see, this partition table is broken up into 4 primary partitions. The fourth partition, though, has been flagged as an extended partition. This allows us to make more logical partitions under that extended partition and therefore bypassing the 4 partition limit. Each hard drive also has one of its possible 4 partitions flagged as an active partition. The active partition is a special flag assigned to only one partition on a hard drive that the Master Boot Record (MBR) uses to boot your computer into an operating system. As only one partition may be set as the active partition, you may be wondering how people can have multiple operating systems installed on different partitions, and yet still be able to use them all. This is accomplished by installing a boot loader in the active partition. When the computer starts, it will read the MBR and determine the partition that is flagged as active. This partition is the one that contains the boot loader. When the operating system boots off of this partition the boot loader will start and allow you to choose which operating systems you would like to boot from. Why make partitions Now that you know what a partition is, you may be wondering why you would even need to make multiple partitions instead of just making one. Though there are quite a few reasons, we will touch on some of the more important ones below:

Multiple Filesystems - When you create a partition, you then need to format it before it can be used. When formatting a partition you tell the operating system what filesystem you would like that partition to be formatted in. Once you format a partition, and therefore assign the type of filesystem you want to use with it, you can not change that filesystem without formatting the partition again and losing all the data contained on it. If you require different filesystems on your computer, whether it be for security or for a specific application, you can then make multiple partition and assign one type of filesystem to one of the partitions and another to one of the other partitions.

77

Partition Size - On older operating systems the maximum size of a partition was limited. Therefore if you had more storage space on a hard drive than was usable in a single partition, you would need to create other partitions to utilize this unused space. Multiple Operating Systems - Some operating systems use filesystems that are not compatible with other operating systems. If you want to use two operating systems on the same computer that are not compatible in this way, you could then make two partitions, one for each operating system. Then a boot loader could be used to switch between them when you start your computer. Wasted disk Space - When a filesystems store data in a partition, the larger the partition, the greater the chance of wasted space. By having multiple partitions of smaller size, you reduce the amount of waste that filesystems may create. Seperate system files from users files - Some components of an operating system require storage space to operate. For example, in Windows if you have no hard drive space available on the drive that Windows is installed on, you will not be able to print. By creating a partition solely devoted to the operating system and then another partition dedicated to your own data and programs, there is less of a chance of you using up the space on the operating system partition with your data, and thus not causing problems. PC partition types Primary partition A primary partition contains one file system. In DOS and earlier versions of Microsoft Windows systems, the system partition was required to be the first partition. Windows operating systems must be located in a primary partition. Other operating systems do not have this peculiar requirement. However, other factors, such as a PC's BIOS (see Boot sequence on standard PC) may also impart specific requirements as to which partition must contain the primary OS. The partition type code for a primary partition can either correspond to a file system contained within (e.g. 0x07 means either an NTFS or an OS/2 HPFS file system) or indicate that the partition has a special use (e.g. code 0x82 usually indicates a Linux swap partition). The FAT16 and FAT32 file systems have made use of a number of partition type codes due to the limits of various DOS and Windows OS versions. Though a Linux operating system may recognize a number of different file systems (ext4, ext3, ext2, ReiserFS, etc.), they have all consistently used the same partition type code: 0x83 (Linux native file system). Extended partition A hard disk may contain only one extended partition; the extended partition can be subdivided into multiple logical partitions. In DOS/Windows systems, each logical partition may then be assigned an additional drive letter. Linux operating systems can be installed into (and run from) logical partitions, whereas Windows operating systems are restricted to primary partitions. Partitioning schemes DOS, Windows, and OS/2 With DOS, Microsoft Windows, and OS/2, a common practice is to use one primary partition for the active file system that will contain the operating system, the page/swap file, all utilities, applications, and user data. On most Windows consumer computers, the drive letter C: is routinely assigned to this primary partition. Other partitions may exist on the hard disk that may or may not be visible as drives, such as recovery partitions or partitions with diagnostic tools or data. (Microsoft drive letters do not correspond to partitions in a one-to-one fashion, so there may be more or less drive letters than partitions.)

78
Proponents of multiple partitions assert that a benefit of having multiple partitions is the ability to store data files on a partition separate from one containing the system files. If the system partition then becomes corrupted for any reason, irreplaceable user files stored on the independent partition would be able to be more easily retrieved (or recovered), not having been corrupted along with the system files. Another operating system (loaded from a LiveCD or USB, for example) could access the files on the (presumably) uncorrupted independent data partition without having to worry about the corrupted system partition at all. Further, when data files are kept in a separate partition, if an operating system needs to be reinstalled/restored (due to malware infiltration, for example), this can be done without risking damage to the data files (that in a single-partition system are stored along with the operating system files). Windows 2000, Windows XP, Windows Vista, and Windows 7 include an inbuilt 'Disk Management' program which allows for the creation, deletion and movement of Windows (but not other types of) partitions. The Windows 7/Vista Disk Manager is not compatible with Windows 2000 or XP, nor, for the most part, other operating systems. Unix, Linux and Mac OS X On Unix-based and Unix-like operating systems such as Linux and Mac OS X, it is possible to use multiple partitions on a disk device. Each partition can be used for a file system or as a swap partition. Multiple partitions also allow directories such as /tmp, /usr, /var, or home directory space to be allocated their own file system. Such a scheme has a number of potential advantages:

If one file system gets corrupted, the data outside that filesystem/partition stay intact, minimizing data loss. Specific file systems can be mounted read-only, or with the execution of setuid files disabled (thus enhancing security). Performance may be enhanced due to less disk head travel. A program which produces too much output (such as a system logging daemon) fills up only a single filesystem, therefore does not fill up more critical filesystems. (Often systems will not function correctly if / or /tmp fills up.)

However, the disadvantage of subdividing the drive into fixed-size partitions is that a file system in one partition may become full, even though other file systems still have plenty of usable space. A good partitioning scheme requires the user to predict how much space each partition will need, which may be a difficult task; especially for new users. Logical volume management (LVM), often used in servers, increases flexibility by allowing data in volumes to expand into separate physical disks (which can be added when needed). Another option is to resize existing partitions when necessary. LVM allows this easily by resizing (shrinking) a filesystem, reducing the size of the logical volume containing that filesystem, allocating that freed space to another logical volume, and expanding (resizing) this other filesystem. Typical Linux desktop systems use two partitions: one holding a file system mounted on "/" (the root directory) and a swap partition. (However, an almost unlimited number of partitions can be accommodated by Linux operating systems.) By default, Mac OS X systems also use a single partition for the entire filesystem, but use a swap file inside the file system (like Windows) rather than a swap partition.

79
Creating and formatting a partition in Windows Before you can partition a hard drive in Windows, you must have installed a new unused hard disk, deleted an existing partition, or have some unpartitioned space available on an existing drive. In the example in this tutorial I will take the unused space from one of my hard drives and partition/format it. The steps shown here will work whether you are working with a brand new hard drive, deleting an existing partition and reusing it, or partitioning available space on an existing hard drive. All hard disk management is done in the Disk Management Administrative Tool. Follow these steps to open this tool: 1. Click on the Start button and select the Control Panel option. 2. If in Classic control panel mode, double-click on the Administrative Tools icon and then double-click on Computer Management icon. If your control panel is in the Category view, click on Performance and Maintenance, then click on Administrative Tools, and finally double-click on the Computer Management icon. 3. When the Computer Management screen opens, click on the Disk Management option under the Storage category. This will present you with a screen similar to the one below. When you are in the disk management tool you will see a listing of your current hard drives and how they are partitioned. From the image above you can see that I have two hard disks installed. The first disk, Disc 0, has two partitions. One partition is a 24 GB NTFS partition that has been assigned the drive letter C:. The other partition on that drive is a 87 GB NTFS partition that has been assigned the drive letter E:. The other drive has only one partition, the D: partition. The rest of the space, 26 GB, shows that it is unallocated and therefore can be used to make other partitions.

The Disk Management Screen To make a partition from the unused space you would do the following. 1. Right click on the space listed as unallocated. 2. At the menu that comes up, click on the New Partition option. 3. You will now be presented with a wizard as to how you would like the partition to be created. At the first screen press Next.

80
4. At the following screen, determine if you need a primary or extended partition. For more information about these partitions you can read our partition tutorial listed above. Most people will be fine selecting Primary Partition. Select Primary Partition and press Next. 5. At the next screen you will be prompted to type in how much of the unallocated space you would like used for the new partition. In my example, my unallocated space is 26.43 GB, so I can choose to make a partition of that entire amount of only use half and save the rest for another partition. Regardless, of what you decide, you need to enter a size in the Partition size in MB: field, or stick with the default size, and press the Next button. 6. At the next screen select the drive letter you would like assigned to it, or use the default one given. When done, press the Next button. The drive letter that you assign here will be how you access the partition later. 7. In this step you will determine how you would like the new partition to be formatted. For the most part you are advised to use the NTFS file system. If you need a file system that can be readable by older operating systems like DOS, Windows 95, Windows 98, or Windows ME, then you should instead choose the FAT32 file system. 8. Type a name in the Volume Label field that will be associated with this partition or leave it blank. 9. Finally press the Next button and you will come to a summary screen. Review how the partition will be created, and if you are satisfied, press the Finish button to complete the creation and formatting of your new hard disk partition. When the computer finishes creating and formatting the new partition you will be presented with the Disk Management screen again and will see that you have a new partition and drive letter on your computer. Now you can use that drive to start storing your data.

Deleting a partition in Windows If you have existing partitions on your computer that you would like to delete in order to use its space for other purposes, then you first need to delete this partition. It is important to note that by deleting a partition you will lose all your data on that partition. With that warning given, let me give some examples of why you would want to delete a partition. Lets say that you have a 60 GB hard drive in your computer that was originally partitioned into a 20 GB partition and a 40 GB partition. You would like to install another operating system on your computer, but feel that neither partition is big enough on its own, and would like to instead create one partition using the full storage of 60 GB. The only way to do that would be to delete both of the existing partitions and recreate a new one using all the available space. To delete a partition please follow these steps: 1. Click on the Start button and select the Control Panel option. 2. If in Classic control panel mode, double-click on the Administrative Tools icon and then double-click on Computer Management icon. If your control panel is in the Category view, click on Performance and Maintenance, then click on Administrative Tools, and finally double-click on the Computer Management icon. 3. When the Computer Management screen opens, click on the Disk Management option under the Storage category. 4. Right-click on the partition you would like to delete and choose the Delete Partition option.

81
5. A confirmation box will come up asking if you are sure you would like to continue. If you press the yes button, all data on this partition will be deleted. If you are sure about deleting this partition, press the Yes button. The partition will now be deleted and you can either create a new partition or exit the program.

UNIT-V: NTFS:
NTFS (NT file system; sometimes New Technology File System) is the file system that the Windows NT operating system uses for storing and retrieving files on a hard disk. NTFS is the Windows NT equivalent of the Windows 95 file allocation table (FAT) and the OS/2 High Performance File System (HPFS). However, NTFS offers a number of improvements over FAT and HPFS in terms of performance, extendibility, and security. NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7. Notable features of NTFS include:

Use of a b-tree directory scheme to keep track of file clusters Information about a file's clusters and other data is stored with each cluster, not just a governing table (as FAT is) Support for very large files (up to 2 to the 64th power or approximately 16 billion bytes in size) An access control list (ACL) that lets a server administrator control who can access specific files Integrated file compression

82

Support for names based on Unicode Support for long file names as well as "8 by 3" names Data security on both removable and fixed disks

How NTFS Works When a hard disk is formatted (initialized), it is divided into partitions or major divisions of the total physical hard disk space. Within each partition, the operating system keeps track of all the files that are stored by that operating system. Each file is actually stored on the hard disk in one or more clusters or disk spaces of a predefined uniform size. Using NTFS, the sizes of clusters range from 512 bytes to 64 kilobytes. Windows NT provides a recommended default cluster size for any given drive size. For example, for a 4 GB (gigabyte) drive, the default cluster size is 4 KB (kilobytes). Note that clusters are indivisible. Even the smallest file takes up one cluster and a 4.1 KB file takes up two clusters (or 8 KB) on a 4 KB cluster system. The selection of the cluster size is a trade-off between efficient use of disk space and the number of disk accesses required to access a file. In general, using NTFS, the larger the hard disk the larger the default cluster size, since it's assumed that a system user will prefer to increase performance (fewer disk accesses) at the expense of some amount of space inefficiency. When a file is created using NTFS, a record about the file is created in a special file, the Master File Table (MFT). The record is used to locate a file's possibly scattered clusters. NTFS tries to find contiguous storage space that will hold the entire file (all of its clusters). Each file contains, along with its data content, a description of its attributes (its metadata).

Installing Operating System in Debian GNU/Linux:


The Rescue floppy. Place the Rescue floppy in the boot drive and reboot. In a minute or two, you should see a screen introduce the Rescue floppy and the boot prompt. It's called the Rescue floppy because you can use it to boot your system and perform repairs if there is a problem that makes your hard disk unbootable. Save this floppy after you install the system. You can do two things at the boot: prompt: press the function keys F1 through F10 to view a few pages of helpful information, or boot the system. If you have any hardware devices that Linux doesn't access correctly at boot time, you may find a parameter to add to the boot command line in the screens you see by pressing F3, F4, and F5. If you add parameters to the boot command line, be sure to type the word ``linux'' and a space before the first parameter. If you simply press Enter, that's the same as typing ``linux'' without any special parameters. If this is the first time you're booting the system, press Enter and see if it works correctly. It probably will. If not, you can reboot later and look for any special parameters that inform the system about your hardware.

83
Once you press Enter, you should see the messages

then there is a page or so of cryptic information about the hardware in the system. There may be many messages in the form of, ``can't find something,'' ``something not present,'' ``can't initialize something,'' or even ``this driver release depends on something,'' Most of these are harmless. The installation boot disk is built to run on computers with many different peripheral devices. Obviously, no computer will have every possible peripheral device, and the operating system may emit a few complaints while it looks for peripherals you don't own. You may also see the system pause for a while. This happens if it is waiting for a device to respond that is not present on your system. If you find that the time it takes to boot the system unacceptably long, you can create a custom kernel after you install the system which doesn't have the drivers for non-existent devices. Low memory systems. If your system has 4MB of RAM, you may see a paragraph about low memory and a text menu with three choices. If your system has enough RAM, you won't see this at all, and you'll go directly to the color or monochrome dialog box. If you get the low-memory menu, you should go through its selections in order. Partition your disk, activate the swap partition, and start the graphical installation system. The program that is used to partition your disk is called cfdisk, and you should see the manual page for cfdisk and the instructions on page for assistance. cfdisk is used to create a Linux Swap partition (type 82) on the hard drive. You need the swap partition for virtual memory during installation, because the procedure likely uses more memory than you have physical RAM for. Select the amount of virtual memory that you intend to use once your system is installed. It is exactly equal to the amount of disk space required. Sixteen megabytes is probably the smallest practical amount, but use 32 megabytes if you can spare the disk space, and 64 megabytes if the disk is large enough and you won't miss the space. The color or monochrome dialog box. Once the system finishes booting, you should see the color or monochrome dialog box. If your monitor displays black and white (monochrome), press Enter and continue with the installation. Otherwise, use the arrow key to move the cursor to the Color menu item and then press Enter. The display should change from black and white to color. Press Enter again to continue with the installation. The Main Menu You may see a dialog box that says, The installation program is determining is determining the current state of your system. On some systems, this message flashes by too quickly to read. It is displayed between steps in the installation process. The installation program checks the state of the system after each step. This allows you to restart the installation without losing the work that you have already done, if you halt the system in the middle of the installation. If you need to restart an installation, you will be prompted to select color or monochrome again, configure the keyboard, reactivate the swap partition, and remount any disks that have been initialized. Any other installation on the system will be saved. During the entire process, you are presented with the main menu. The choices at the top of the menu change to indicate your progress in installing the system. Phil Hughes wrote in Linux Journal that you could teach a chicken to install Debian. He meant that the installation process was mostly just pecking

84
at the Enter key. The first choice on the installation menu is the next action you should perform according to what the system detects you have already done. It should say Next, and, at this point, the next item should be Configure the keyboard. Configuring the keyboard. Make sure that the highlight is on the Next item, and press Enter for the keyboard configuration menu. Select a keyboard that conforms to the layout used for your national language, or select something close to it if the keyboard layout you want isn't shown. After installation you can select a keyboard layout from a wider range of choices. Move the highlight to the keyboard selection and press Enter. Use the arrow keys to move the highlight--they are in the same place on all national language keyboard layouts and are independent of the keyboard configuration. The shell. If you are an experienced UNIX or Linux user, press Left Alt and F2 in unison for the second virtual console. That's the Alt key on the left-hand side of the Space bar and the F2 function key. You'll see a separate window running a Bourne shell clone called ash. At this point, the root file system is on the RAM disk, and there is a limited set of UNIX utilities available for your use. You can see what programs are available with the command: ls / bin / sbin / usr / sbin The shell and commands are there only in case something goes wrong. In particular, you should always use the menus, not the shell, to activate your swap partition, because the menu software can't detect whether you've done this from the shell. Press LeftAlt-F1 to get back to menus. Linux provides up to 64 virtual consoles, but the Rescue floppy only uses a few of them. Last chance! Have you backed up your disks? Here's your first chance to wipe out all of the data on your disks, and your last chance to save your old system. If you haven't backed up all of your disks, remove the floppy from the drive, reset the system, and create a backup. Partition your hard disks. If you have not already partitioned your disks for Linux Native and Linux Swap file systems, the menu item Next will be Partition a Hard Disk. If you have already created at least one Linux Native and one Linux Swap disk partition, the Next menu selection will be Initialize and Activate the Swap Disk Partition or you may even skip that step if your system has little RAM and the installation software asked you to activate the swap partition as soon as the system started. Whatever the Next menu selection is, you can use the down-arrow key to select Partition a Hard Disk. The Partition a Hard Disk menu item presents you with a list of disk drives you can partition and runs the cfdisk program (see page), which allows you to create and edit disk partitions. You must create at least one Linux (type 83) disk partition. Your swap partition will be used to provide virtual memory for the system and should be between 16 and 128 megabytes in size, depending on how much disk space you have and how many large programs you want to run. Linux will not use more than 128 megabytes of swap, so there's no reason to make your swap partition larger than that. A swap partition is strongly recommended, but you can do without one if you insist and system has more than 16 Mb of RAM. Initialize and Activate the Swap Disk Partition. This is the Next menu item after you create one disk partition. You have the choice of initializing and activating a new swap partition, activating a previously initialized partition, and doing without a swap partition. It's always permissible to re-initialize a swap partition, so select Initialize and Activate the Swap Disk Partition unless you are sure that you know what you are doing. This menu choice will give you the option to scan the entire partition for unreadable disk blocks caused by defects on the

85
surface of the hard disk platters. This is useful if you have MFM, RLL, or older IDE disks, and checking the disk never hurts. Properly working SCSI disks don't need to be scanned. They have their own internal mechanism for mapping out bad disk blocks. The swap partition provides virtual memory to supplement the RAM in your system, and it's even used while the system is being installed. That's why we initialize it first. Initialize a Linux disk partition. At this point, the Next menu item should be Initialize a Linux Disk Partition. If it isn't, you haven't completed the disk partitioning process, or you haven't made one of the menu choices dealing with your swap partition. You can initialize a Linux disk partition, or alternately you can mount a previously initialized partition. The boot floppies will not upgrade an old system without removing the files--Debian provides a different procedure than using the boot floppies for upgrading existing Debian systems. Thus, if you are using old disk partitions that are not empty, you should initialize them, which erases all of the files. You must initialize any partition that you created in the disk partitioning step. About the only reason to mount a partition without initializing it at this point would be to mount a partition upon which you have user files, like /home, that you don't want deleted. Select the Next menu item, to initialize and mount the root (the ``/'' directory) disk partition. The first partition you mount or initialize, after the swap partition, if you're using it, is the partition mounted as root. You will be offered the choice to scan the disk partition for bad blocks, as when you initialized the swap partition. It never hurts to scan for bad blocks. Keep in mind that this step can take 10 minutes or more if you have a large disk. Install the base system. Once you've mounted the root partition, the Next menu item will be Install the Base System unless you already performed some of the installation steps. You can use the arrow keys to select the menu items to initialize or mount disk partitions if you have additional partitions to set up. If you have created separate partitions for /var, /usr, or other file systems, you should initialize and mount them now. There will be a pause while the system looks for a local copy of the base system. This search is for CD-ROM installations and will not succeed. You are then offered a menu of drives from which to read the base floppies. Select the appropriate drive. Feed in the Base 1, Base 2, Base 3, and Base 4 floppies--and Base 5 if you are using 1.2MB floppies--as requested by the program. If one of the base floppies is unreadable, you need to create a replacement floppy and feed all five floppies into the system again. After the floppies have been read, the system installs the files. This can take ten minutes or more on a slow system. Install the operating system kernel. At this point, the Next menu item should be Install the Operating System Kernel Select it, and you will be prompted to select a floppy drive and insert the Rescue floppy. This copies the kernel onto the hard disk. This kernel is used later to create a custom boot floppy for your system and make the hard disk bootable without a floppy. Install the device drivers. Select the menu item to install the device drivers. You will be prompted to insert the Device Drivers floppy, and the drivers will be copied onto your hard disk. Select the Configure Device Drivers menu item and look for devices which are on your system. Configure those device drivers, so they will be loaded whenever your system boots.

86
There is a menu selection for PCMCIA device drivers, but you do not need to use it. After installation you can install the pcmcia-cs package. This detects PCMCIA cards automatically and configures those it finds. It also recognizes cards that are hot swapped when the system is running--they will all be configured as they are plugged in, and de-configured when unplugged. Configure the base system. At this point the system read in all of the files that make up a minimal Debian system, but you must perform some configuration before the system will run. Select Configure the Base System. This asks you to select your time zone. Look for your time zone or region of the world in the menu, and type it at the prompt. This may lead to another menu where you can select more specific information. Next, you are asked if your system clock should be set to Greenwich Mean Time (GMT) or local time. Select GMT if are running only Linux or another UNIX on your system. Select local time if you use another operating system like MS-DOS or Microsoft Windows. UNIX systems keep GMT time on the system clock and use software which converts it to the local time. This allows them to keep track of daylight savings time and leap years, and even allows users who are logged in from other time zones to individually set the time zone on their terminal. If you run the system clock on GMT and your locality uses daylight savings time, the system adjusts for daylight savings time properly on the days it starts and ends. Configure the network. You must configure the network even if you don't have one, but you only have to answer the first two questions: If you are connected to a network, check with your system administrator or ISP vendor if you don't know the following information:

your computer's host name; your computer's or ISP's domain name; your computer's IP address; the netmask to use with your network; the IP address of your network; the broadcast address to use on your network; if your network has a gateway, the IP address of the default gateway system to which you should route packets; the system on your network to use for Domain Name Service (DNS); and whether you connect to the network using Ethernet.

The program will guess that the network IP address is the bitwise AND of your system's IP address and netmask. It will guess that the broadcast address is the bitwise OR of your system's IP address with the bitwise negation of the netmask. It will guess that your gateway system is also your DNS server. If you can't find any of these answers, use the system's guesses--if necessary, you can alter them after installation by editing the /etc/init.d/network file. Make the hard disk bootable. If you choose to make the hard disk boot directly to Linux, you are asked to install a master boot record. If you aren't using a boot manager (this is probably the case if you don't know what a boot manager is), answer ``yes'' to this question. The next question is whether you want to boot Linux automatically from the hard disk when you turn on the system. This sets Linux to be the bootable partition--the one that will be loaded from the hard disk. If you answer ``no'' to this question, you can set the bootable partition later using the MS-DOS FDISK.EXE program, or the Linux fdisk or activate programs. Make a boot floppy.

87
You should make a boot floppy even if you intend to boot the system from the hard disk. The reason for this is that it's possible for the hard disk bootstrap to be installed incorrectly. A boot floppy will almost always work. Select Make a Boot Floppy from the menu and feed the system a blank floppy as directed. Make sure that the floppy isn't write protected. The software attempts to format and write it. Mark this diskette the ``Custom Boot'' floppy and write-protect it once it has been written. The moment of truth. This is what electrical engineers call the ``smoke test''--what happens when you power up a new system for the first time. Remove the floppy disk from the floppy drive and select Reboot the System from the menu. If the Linux system doesn't start up, insert the Custom Boot floppy you created in the previous step and reset the system. Linux should boot. You should see the same messages as when you first booted the installation boot floppy, followed by some new messages. Add a user account and password. After you've added logins, (Chapter 4 discusses this in some detail), you are dropped into dselect, the Debian package management program. You should read the tutorial before attempting to install packages with dselect. dselect allows you to select the packages that you want installed on your system. The Debian package management software is described in detail starting on page . If you have a CD-ROM or hard disk with the additional Debian packages or are connected to the Internet, you may want to read that section now. Otherwise, exit dselect. You can use the package management software after you have transferred the Debian package files to your system. You must be the superuser (root) to use dselect. If you install the X Window System and do not use a US keyboard, read the X11 Release note for non-US keyboards.

Log in. After you exit dselect, you are at the login: prompt. Log in using the personal login and password you selected. Your system is ready to use.

Install Windows XP:


To install Windows XP to a new hard disk. This is typically done when a new hard disk is installed on your computer.You will need the CD for your previous operating system in order to complete this method. Before you start, start your computer by using one of the following media:

Microsoft Windows 98/Windows Millennium startup disk Windows XP CD or Windows XP boot disks

Note The Windows XP CD is the preferred media in the following steps. However, the Windows XP boot disks will work if you do not have the CD. To install Windows XP to a new hard disk, follow these steps:

88
1. Start your computer from the Windows XP CD (or boot disks). To do this, insert the Windows XP CD into your CD or DVD drive, and then restart your computer. 2. When the "Press any key to boot from CD" message appears on the screen, press any key to start the computer from the Windows XP CD. 3. At the Welcome to Setup screen, press ENTER to begin Windows XP Setup. 4. Read the Microsoft Software License Terms, and then press F8. 5. When you are prompted for the Windows XP CD, insert your Windows XP CD. 6. Restart your computer. 7. When you see the "Press any key to boot from CD" message, press any key to start the computer from the Windows XP CD. 8. At the Welcome to Setup screen, press ENTER to start Windows XP Setup. 9. Follow the instructions on the screen to select and format a partition (NTFS or FAT) where you want to install Windows XP. 10. Follow the instructions on the screen to complete Windows XP Setup. If you have successfully installed Windows XP, you are finished. If these steps did not help you install Windows XP to a new hard disk, go to the "Next Steps" section.

Unix Components:
The Unix system is composed of several components that are normally packed together. By including in addition to the kernel of an operating system the development environment, libraries, documents, and the portable, modifiable source-code for all of these components, Unix was a selfcontained software system. This was one of the key reasons it emerged as an important teaching and learning tool and has had such a broad influence. The names and filesystem locations of the Unix components have changed substantially across the history of the system. Nonetheless, the V7 implementation is considered by many to have the canonical early structure: The kernel The kernel of Unix is the heart of the operating system. It allocates time and memory to programs and handles the filestructure and communication between the different parts of the computer system such as the keyboard and the screen.

Kernel source code in /usr/sys, composed of several sub-components: o conf configuration and machine-dependent parts, including boot code o dev device drivers for control of hardware (and some pseudo-hardware) o sys operating system "kernel", handling memory management, process scheduling, system calls, etc. o h header files, defining key structures within the system and important systemspecific invariables Development Environment Early versions of Unix contained a development environment sufficient to recreate the entire system from source code: o cc C language compiler (first appeared in V3 Unix) o as machine-language assembler for the machine o ld linker, for combining object files o lib object-code libraries (installed in /lib or /usr/lib) libc, the system library with C run-time support, was the primary library, but there have always been additional libraries for such things as mathematical functions (libm) or database access. V7 Unix

89
introduced the first version of the modern "Standard I/O" library stdio as part of the system library. Later implementations increased the number of libraries significantly. make build manager (introduced in PWB/UNIX), for effectively automating the build process include header files for software development, defining standard interfaces and system invariants Other languages V7 Unix contained a Fortran-77 compiler, a programmable arbitrary-precision calculator (bc, dc), and the awk scripting language, and later versions and implementations contain many other language compilers and toolsets. Early BSD releases included Pascal tools, and many modern Unix systems also include the GNU Compiler Collection as well as or instead of a proprietary compiler system. Other tools including an object-code archive manager (ar), symbol-table lister (nm), compiler-development tools (e.g. lex & yacc), and debugging tools.

o o o

Commands Unix makes little distinction between commands (user-level programs) for system operation and maintenance (e.g. cron), commands of general utility (e.g. grep), and more general-purpose applications such as the text formatting and typesetting package. Nonetheless, some major categories are:
o

sh The "shell" programmable command line interpreter, the primary user interface on Unix before window systems appeared, and even afterward (within a "command window"). Utilities the core tool kit of the Unix command set, including cp, ls, grep, find and many others. Subcategories include: System utilities administrative tools such as mkfs, fsck, and many others. User utilities environment management tools such as passwd, kill, and others. Document formatting Unix systems were used from the outset for document preparation and typesetting systems, and included many related programs such as nroff, troff, tbl, eqn, refer, and pic. Some modern Unix systems also include packages such as TeX and Ghostscript. Graphics The plot subsystem provided facilities for producing simple vector plots in a device-independent format, with device-specific interpreters to display such files. Modern Unix systems also generally include X11 as a standard windowing system and GUI, and many support OpenGL. Communications Early Unix systems contained no inter-system communication, but did include the inter-user communication programs mail and write. V7 introduced the early inter-system communication system UUCP, and systems beginning with BSD release 4.1c included TCP/IP utilities.

Documentation Unix was the first operating system to include all of its documentation online in machine-readable form. The documentation included: o man manual pages for each command, library component, system call, header file, etc. o doc longer documents detailing major subsystems, such as the C language and troff

The shell The shell is an interface between the user and the Unix kernel. It resembles the dos box that Windows displays if you run the command cmd. When a user logs in Unix checks the username and password, and then starts another program called the shell. The shell interprets the commands the user types and transmits them to the kernel to be executed. These commands are programs. There are a variety of shells available for the various Unix systems. The expert user can customise their own shell and users can use different shells on the same machine.

90
The shell and kernel work together like this:

a user types cat somefile to display a file; the shell finds the program cat; the shell instructs the kernel to run the program cat on somefile; When the program finishes the kernel passes control back to the shell and displays the Unix prompt.

There are a number of different shells for Unix. People can become very attached to the shell they prefer. Popular shells include

sh - the bourne shell bash - the bourne again shell csh - the c shell ksh - the Korn shell (strangely, not named for the band) zsh - the z shell

You can invoke any shell installed on your system with one of the above commands at the prompt. Utilities UNIX provides several hundred utility programs, often referred to as commands. Accomplish universal functions
o o o o o o o

editing file maintenance printing sorting programming support online info etc.

Modular: single functions can be grouped to perform more complex tasks

Вам также может понравиться