Chapter 6. Digital Components

Similar documents
Lecture (05) Boolean Algebra and Logic Gates

Boolean Algebra and Logic Gates

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

8051 INTERFACING TO EXTERNAL MEMORY

DIGITAL ELECTRONICS. Vayu Education of India

Concept of Memory. The memory of computer is broadly categories into two categories:

This presentation will..

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Chapter 2. Boolean Algebra and Logic Gates

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

Introduction read-only memory random access memory

Integrated circuits and fabrication

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

Memory and Programmable Logic

THE MICROCOMPUTER SYSTEM CHAPTER - 2

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE4220. PROGRAMMABLE LOGIC DEVICES (PLDs)

Lecture-7 Characteristics of Memory: In the broad sense, a microcomputer memory system can be logically divided into three groups: 1) Processor

1 Digital tools. 1.1 Introduction

UNIT V (PROGRAMMABLE LOGIC DEVICES)

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Chap-2 Boolean Algebra

2.1 Binary Logic and Gates

Digital Techniques. Lecture 1. 1 st Class

William Stallings Computer Organization and Architecture 8th Edition. Chapter 5 Internal Memory

Chapter 2 Logic Gates and Introduction to Computer Architecture

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

PROGRAMMABLE LOGIC DEVICES

SECTION-A

C Program Adventures. From C code to motion

Combinational Circuits

Memory Study Material

Address connections Data connections Selection connections

1. Mark the correct statement(s)

Summer 2003 Lecture 18 07/09/03

Review: Chip Design Styles

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

COMBINATIONAL LOGIC CIRCUITS

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

Introduction to ICs and Transistor Fundamentals

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Lecture 21: Combinational Circuits. Integrated Circuits. Integrated Circuits, cont. Integrated Circuits Combinational Circuits

CS 320 February 2, 2018 Ch 5 Memory

UNIT:4 MEMORY ORGANIZATION

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Menu. word size # of words byte = 8 bits

Intro to Logic Gates & Datasheets. Intro to Logic Gates & Datasheets. Introduction to Integrated Circuits. TTL Vs. CMOS Logic

Intro to Logic Gates & Datasheets. Digital Electronics

Memory & Logic Array. Lecture # 23 & 24 By : Ali Mustafa

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Sense Amplifiers 6 T Cell. M PC is the precharge transistor whose purpose is to force the latch to operate at the unstable point.

FPGA for Dummies. Introduc)on to Programmable Logic

Digital Logic Design Exercises. Assignment 1

Scheme G. Sample Test Paper-I

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Semiconductor Memories: RAMs and ROMs

Combinational Circuits Digital Logic (Materials taken primarily from:

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Computer Organization and Assembly Language (CS-506)

Combinational Logic with MSI and LSI

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

EE 8351 Digital Logic Circuits Ms. J.Jayaudhaya, ASP/EEE

Read and Write Cycles

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

Reference Sheet for C112 Hardware

END-TERM EXAMINATION

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Parts of Computer hardware Software

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

P-2 Digital Design & Applications

UNIT- V COMBINATIONAL LOGIC DESIGN

Chapter TEN. Memory and Memory Interfacing

Digital Electronics. CHAPTER THIRTY TWO. Semiconductor Read-Only Memories

CMPE 415 Programmable Logic Devices FPGA Technology I

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

ECSE-2610 Computer Components & Operations (COCO)

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Chapter 5 Internal Memory

Chapter 4 Main Memory

Unit 5: Memory Organizations

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Contents. Chapter 3 Combinational Circuits Page 1 of 34

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

AMD actual programming and testing on a system board. We will take a simple design example and go through the various stages of this design process.

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Copyright 2000 N. AYDIN. All rights reserved. 1

eaymanelshenawy.wordpress.com

IT 201 Digital System Design Module II Notes

UNIT 4 INTEGRATED CIRCUIT DESIGN METHODOLOGY E5163

SSRVM Content Creation Template

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I

Introduction to SRAM. Jasur Hanbaba


ELCT 912: Advanced Embedded Systems

Sketch A Transistor-level Schematic Of A Cmos 3-input Xor Gate

Transcription:

1 1. Introduction. 2. Integrated Circuits 3. Decoders: 4. NAND gate Decoder : 5. Decoder Expansion : 6. Encoder 7. Memory Units Random-Access Memory Read Only Memory 8. Types of ROMs Chapter 6 Digital Components

2 Chapter 6 Digital Components 6.1 Introduction. An electronic component is a basic electronic element usually packaged in a discrete form with two or more connecting leads or metallic pads. Components are intended to be connected together, usually by soldering to a printed circuit board, to create an electronic circuit with a particular function (for example an amplifier, radio receiver, or oscillator). Components may be packaged singly (resistor, capacitor, transistor, diode etc.) or in more or less complex groups as integrated circuits (operational amplifier, resistor array, logic gate etc.) Components Very often electronic components are mechanically stabilized, improved in insulation properties and protected from environmental influence by being enclosed in synthetic resin Components may be passive or active. Resistors:-Components used to resist current. Capacitors:- Components that store electrical charge in an electrical field. Capacitors are used for filtration in the electronic circuits. Capacitors in general pass changing (e.g. AC) and block unchanging (e.g. DC) voltage levels. Transistor:- At its core, a transistor is an electronic component used in a circuit to control a large amount of current or voltage with a small amount of voltage or current 6.3 Integrated Circuits Integrated circuits were made possible by experimental discoveries which showed that semiconductor devices could perform the functions of vacuum tubes, and by mid-20thcentury technology advancements in semiconductor device fabrication. The integration of large numbers of tiny transistors into a small chip was an enormous improvement over the manual assembly of circuits using discrete electronic components. The integrated circuit's mass production capability, reliability, and building-block approach to circuit design ensured the rapid adoption of standardized ICs in place of designs using discrete transistors. There are two main advantages of ICs over discrete (Separate) circuits cost and performance. Cost is low because the chips, with all their components, are printed as a unit by photolithography and not constructed one transistor at a time. Furthermore, much less material is used to construct a circuit as a packaged IC die than as a discrete circuit. Performance is high since the components switch quickly and consume little power (compared to their discrete counterparts) because the components are small and close together. As of 2006, chip areas range from a few square millimeters to around 350 mm, with up to 1 million transistors per mm.

3 SSI: The first integrated circuits contained only a few transistors. Called "Small-Scale Integration" (SSI), digital circuits containing transistors numbering in the tens provided a few logic gates for example, while early linear ICs such as the Plessey SL201 or the Philips TAA320 had as few as two transistors. MSI: The next step in the development of integrated circuits, taken in the late 1960s, introduced devices which contained hundreds of transistors on each chip, called "Medium- Scale Integration" (MSI).They were attractive economically because while they cost little more to produce than SSI devices, they allowed more complex systems to be produced using smaller circuit boards, less assembly work (because of fewer separate components), and a number of other advantages. LSI: Further development, driven by the same economic factors, led to "Large-Scale Integration" (LSI) in the mid 1970s, with 10,000 of transistors per chip. Integrated circuits such as 1K-bit RAM, calculator chips, and the first microprocessors, that began to be manufactured in moderate quantities in the early 1970s, had under 4000 transistors. True LSI circuits, approaching 10000 transistors, began to be produced around 1974, for computer main memories and second-generation microprocessors. VLSI: The next step in the development process, starting in the 1980s and continuing through the present, was "very large-scale integration" (VLSI). The development started with hundreds of thousands of transistors in the early 1980s, and continues beyond several billion transistors as of 2007. Digital integrated circuits are classified not only by their logic operation but also by the specific circuit technology to which they belong. The circuit technology is referred to as a digital logic family. Each logic family has its own basic electronic circuit upon which more complex digital circuits and functions are developed. The basic circuit in each technology is either a NAND, a NOR, or an inverter gate. The electronic components that are employed in the construction of the basic circuit are usually used for the name of the technology. Many different logic families of integrated circuits have been introduced commercially. The following are the most popular TTL ECL Transistor -transistor Logic Emitter coupled Logic MOS - Metal-oxide semiconductor CMOS- Complementary metal-oxide semiconductor TTL is a widespread logic family that has been in operation for many years and is considered as standard. ECL has an advantage in systems requiring high-speed operation. MOS is suitable for circuits that need high component density, and CMOS is preferable in systems requiring low power consumption. The transistor-transistor logic family was an evolution of a previous technology that used diodes and transistors for the basic NAND gate. This technology was called DTL, for "diode-transistor logic." Later the diodes were replaced by transistors to improve the circuit operation and the name of the logic family was changed to "transistor-transistor logic." This is the reason for mentioning the word "transistor" twice. There are several variations of the TTL family besides the standard TTL, such as high-speed TTL, low-power TIL, The emitter-coupled logic (ECL) family provides the highest-speed digital circuits in integrated form. ECL is used in systems such as supercomputers and signal processors where high speed is essential. The transistors in ECL gates operate in a non saturated state, a condition that allows the achievement of propagation delays of 1 to 2 nanoseconds. The metal-oxide semiconductor (MOS) is a unipolar transistor that depends on the flow of only one type of carrier, which may be electrons (n-channel) or holes (p-channel). This is in contrast to the bipolar transistor used in TTL and ECL gates, where both carriers exist during normal operation. A p- channel MOS is referred to as PMOS and an n-channel as NMOS. NMOS is the one that is commonly used in circuits with only one type of MOS transistor. The complementary MOS (CMOS) technology uses PMOS and NMOS transistors connected in a complementary fashion in all circuits. The most important advantages of CMOS over bipolar are the high packing density of circuits, a simpler processing technique during fabrication, and a more economical operation because of low power consumption.

4 Because of their many advantages, integrated circuits are used exclusively to provide various digital components needed in the design of computer systems. To understand the organization and design of digital computers it is very important to be familiar with the various components encountered in integrated circuits. For this reason, the most basic components are introduced in this chapter with an explanation of their logical properties. These components provide a catalog of elementary digital functional units commonly used as basic building blocks in the design of digital computers. 6.4 Decoders: In digital electronics, a decoder can take the form of a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes are different e.g. n-to-2 n, binary-coded decimal decoders. Enable inputs must be on for the decoder to function, otherwise its outputs assume a single "disabled" output code word. Decoding is necessary in applications such as data multiplexing, 7 segment display and memory address decoding. The example decoder circuit would be an AND gate because the output of an AND gate is "High" (1) only when all its inputs are "High." Such output is called as "active High output". If instead of AND gate, the NAND gate is connected the output will be "Low" (0) only when all its inputs are "High". Such output is called as "active low output". A slightly more complex decoder would be the n-to-2 n type binary decoders. These type of decoders are combinational circuits that convert binary information from 'n' coded inputs to a maximum of 2 n unique outputs. We say a maximum of 2 n outputs because in case the 'n' bit coded information has unused bit combinations, the decoder may have less than 2 n outputs. We can have 2-to-4 decoder, 3-to-8 decoder or 4-to-16 decoder. We can form a 3-to- 8 decoder from two 2-to-4 decoders (with enable signals). Similarly, we can also form a 4-to-16 decoder by combining two 3-to-8 decoders. In this type of circuit design, the enable inputs of both 3-to-8 decoders originate from a 4th input, which acts as a selector between the two 3-to-8 decoders. This allows the 4th input to enable either the top or bottom decoder, which produces outputs of D(0) through D(7) for the first decoder, and D(8) through D(15) for the second decoder.

5 A decoder that contains enable inputs is also known as a decoder- de-multiplexer. Thus, we have a 4-to-16 decoder produced by adding a 4th input shared among both decoders, producing 16 outputs. NAND gate Decoder : Some decoders are constructed NAND instead of and gates. Since NAND gate produces the AND operation with an inverted output, it becomes more economical to generate the decoder output in their complement form. A two to 4 line decoder with an enable input constructed with NAND gate is in figure X1. The circuit operate with complemented output and a complemented enable input E. The decoder is enable when E is equal to 0. An indicated by the truth table, only one output is equal to 0 at any given time, the other three output are equal to 1. The output whose value is equal to 0 represents the equivalent binary number in input A1 and A0. The circuit is disabled when E is equal to 1, regardless of the values of the other two inputs. When the circuit is disabled, none of the output are selected and all outputs are equal to 1. in general, a decoder may operate with complemented or un-complemented outputs. The enable input may be activated with a 0 or with a 1 signal level. some decoders have two or more enable input that must satisfy a given logic condition in order to enable the circuit. Decoder Expansion : There are occasions when a certain-size decoder is needed but only smaller sizes are available. When this occurs it is possible to combine two or more decoders with enable inputs to form a larger decoder. Thus if a 6-to-64-line decoder is needed, it is possible to construct it with four 4-to16-line decoders. Figure X2 shows how decoders with enable inputs can be connected to form a larger decoder. Two 2-to-4-line decoders are combined to achieve a 3-to-8-line decoder. The two least significant bits of the input are connected to both decoders. The most significant bit is connected to the enable input of one decoder and through an inverter to the enable input of the other decoder. It is assumed that each decoder is enabled when its E input is equal to 1. When E is equal to 0, the decoder is disabled and all its outputs are in the 0 level. When A2 =

6 0, the upper decoder is enabled and the lower is disabled. The lower decoder outputs become inactive with all outputs at O. The outputs of the upper decoder generate outputs Do through D3, depending on the values of At and Ao (while A2 = 0). When A2 = 1, the lower decoder is enabled and the upper is disabled. The lower decoder output generates the binary equivalent D4 through D7 since these binary numbers have a 1 in the A2 position. 6.5 Encoder An encoder is a digital circuit that performs the inverse operation of a decoder. An encoder has 2n (or lees) input lines and n output lines. The output lines generate the binary code corresponding to the input value; An example of an encoder is the octal-to-binary encoder, whose truth table is given in Table X1. It has eight inputs, one for each of the octal digits, and three outputs that generate the corresponding binary number. It is assumed that only one input has a value of 1 at any given time; otherwise, the circuit has no meaning. TABLE : X1 Truth Table for Octal-co-Binary Encoder Inputs Outputs D7 D6 D5 D4 D3 D2 D1 D0 A2 A A 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 The encoder can be implemented with OR gates whose inputs are determined directly from the truth table. Output A0 = 1 if the input octal digit is 1 or 3 or 5 or 7. Similar conditions apply for the other two outputs. These conditions can be expressed by the following Boolean functions: A0 = D1 + D3 + D5 + D7; A1 = D2 + D3 + D6 + D7; A2 = D4 + Ds + D6 + D7: The encoder can be implemented with three OR gates.

7 6.6 Multiplexers A multiplexer, sometimes referred to as a "multiplexor" or simply "mux", is a device that selects between a number of input signals. In its simplest form, a multiplexer will have two signal inputs, one control input, and one output. An everyday example of an analog multiplexer is the source selection control on a home stereo unit. Multiplexers are used in building digital semiconductors such as CPUs and graphics controllers. In these applications, the number of inputs is generally a multiple of 2 (2, 4, 8, 16, etc.), the number of outputs is either 1 or relatively small multiple of 2, and the number of control signals is related to the combined number of inputs and outputs. For example, a 2- input, 1-output mux requires only 1 control signal to select the input, while a 16-input, 4- output mux requires 4 control signals to select the input and 2 to select the output. Multiplexers are also used in communications; the telephone network is an example of a very large virtual mux built from many smaller discrete ones. Instead of having a direct connection from every telephone to every telephone - which would be physically impossible - the network "muxes" individual telephones onto one of a small number of wires as calls are placed. At the receiving end, a demultiplexer, or "demux", chooses the correct destination from the many possible destinations by applying the same principle in reverse. There are more complex forms of multiplexers. Time-division multiplexers, for example, have the same input/output characteristics as described above, but instead of having a control signal, they alternate between all possible inputs at precise time intervals. By taking turns in this manner, many inputs can share one output. This technique is commonly used on long distance phone lines, allowing many individual phone calls to be spliced together without affecting the speed or quality of any individual call. Time-division multiplexers are generally built as semiconductor devices, or chips, but can also be built as optical devices for fiber optic applications. Theory: What is a multiplexer? It quite often happens, in the design of large-scale digital systems, that a single line is required to carry two or more different digital signals. Of course, only one signal at a time can be placed on the one line. What is required is a device that will allow us to select, at different instants, the signal we wish to place on this common line. Such a circuit is referred to as a Multiplexer. A multiplexer performs the function of selecting the input on any one of 'n' input lines and feeding this input to one output line. Multiplexers are used as one method of reducing the number of integrated circuit packages required by a particular circuit design. This in turn reduces the cost of the system. Assume that we have four lines, C0, C1, C2 and C3, which are to be multiplexed on a single line, Output (f). The four input lines are also known as the Data Inputs. Since there are four inputs, we will need two additional inputs to the multiplexer, known as the Select Inputs, to select which of the C inputs is to appear at the output. Call these select lines A and B. The gate implementation of a 4-line to 1-line multiplexer is shown below:

8 Algebraic Method of Multiplexer Implementation Introduction This is an approach where you can transform one Boolean expression into a form so that a multiplexer can be implemented. This can be achieved by applying Boolean Theorems. Before attempting the design of a multiplexer using the algebraic method, the function to be considered should be minimized using the techniques covered in Minimization of Boolean Functions. Minimizing the terms and expressions can be important because this allows designers to use the least amount of components and use the most efficient type of multiplexer. Example : Consider the function f(a,b,c) = A B+BC+A C Expanding to standard sum of products form: f(a,b,c) =A B(C+C )+(A+A )BC+A C(B+B ) =A BC+A BC +ABC+A BC+A BC+A B C =A BC+A BC +A B C+ABC =A B(C+C )+A B C+ABC =A B (C)+A B(1)+AB +AB( C) The resulting multiplexer implementation is: Karnaugh Map Method of Multiplexer Implementation Introduction It can be seen that applying Boolean algebra can be awkward in order to implement multiplexers. This is because it takes a lot of practice and can be very difficult to determine the set of laws and propositions to use. Karnaugh maps provide a simple and straight-forward method of implementing multiplexers. With the Karnaugh map Boolean expressions having up to four and even six variables can be implemented. In the above example we could have picked any variable to be the data variable and the other two as select variables. Suppose one were to take A as the data variable. The corresponding Karnaugh map is then: Example 1: Consider the function: As with the algebraic method example, C is taken to be the data variable and A,B to be the select variables. Example 2: In the above example we could have picked any variable to be the data variable and the other two as select variables. Suppose one were to take A as the data variable. The corresponding Karnaugh map is then:

9 Design multiplexer implementations for the following functions using the Karnaugh map method. For the first problem, try using A as the data variable and B,C as the select variables. For the second problem, try using C as the data variable and A,B as the select variables. For the following solutions the data variable has been suggested although any variable can be chosen as the data variable and the other two as the select variables. 1. Using A as the data variable and B,C as the select variables: 2. Using C as the data variable and A,B as the select variables.

10 Numerical Method Theory. To simplify the theory the function is defined in binary, with a true form of a variable denoted by a 1, and conversely, a false form denoted by a 0. The system can expect to deal with variables being missing, or a don't care condition, which is denoted by a dash (-. ). This can be expressed clearly by the following functions of three variables, i.e. f(a,b,c). Essentially the method is one of factoring using the relationship in which the variable allowing the maximum number of terms to be so factored is sought. That variable(s) is then used as the multiplexer data input variable. Listing the two minterms we have Now consider the following function. Note that these variables cannot be combined. Now consider the following. function. Note that this variable cannot be combined. This is because the FIRST RULE of the numerical method for two terms is that they

11 must differ in only one digit position. The number of variables that are true form, i.e. the number of 1's in a term, is significant and is referred to as its index. For example: f(a, B, C, D) 0000...Index 0 0010, 1000...Index 1 1010, 0011, 1001...Index 2 1110, 1011...Index 3 1111...Index 4 For each minterm in the function the index is found. The minterms are arranged in order of index starting with the lowest index entries. Those term-pairs with only a difference in the least weighted variable are listed. The process is repeated with a new list for those term-pairs with a difference of the next weighted variable. This continues with a further list for term-pairs, and so on. Memory Units Memory unit is used to store the data and program. CPU can work with the information stored in memory unit. This memory unit is termed as primary memory or main memory module. These are basically semi conductor memories. There are two types of semiconductor memories RAM and ROM Random-Access Memory (RAM- Volatile Memory): In this section, we discuss the block diagram organization of random access memory (RAM). RAM is a memory unit in the computer that is used to hold programs and data while the program is running. RAM is an example of a set of storage devices that hold information. Other devices include registers, hard disks, and diskettes. An example organization of RAM in a block diagram is shown in Figure-X. In the figure, memory is composed of words. A word is a set of memory locations that can be moved out of or into memory as a single entity. As can be seen from the example block diagram, the memory contains 1024 words (word 0 to word 1023). A word is characterized by its content and its address. In the diagram, word 1 is the address of word 1; its content (or value) is (10101111). The contents of the word could represent either data or instructions, as will be discussed later. The size of the memory unit is the total number of bits. In the example, the memory unit size is 1024 8 (number of words the size of each word). The contents of a memory word can be accessed through the use of buses. A bus is a set of lines used to communicate between different units (e.g., the CPU and memory the memory block diagram shows three buses: the address bus, the data-in bus, and the data-out bus. The size of a bus is the number of lines used. In the figure, the data buses are 8 bits each. The address bus is 10 bits. The address and bus sizes are a function of the memory organization. In general, for a RAM with n words and m-bit word size, the number of address lines is given as [log2n]

The number of data-in and data-out lines is given as m, the size of each word. In the example figure, the size of the bus is 10 bits ([log2 1024]=10), with the address of word 0 given as (0000000000) 2 =(0) 10 and the address of the last word given as (1111111111) 2 =(1023) 10. Reading from memory is the process of retrieving the contents of a word by placing its content on the data-out bus. This is done by placing the address on the address bus and informing memory of a read request (using read and write input signals). In the figure, there is one input line labeled read/write; a 1 on the line indicates a read request and a 0 indicates a write request. We will discuss the chip select later. Writing to memory is the process of modifying the contents of a The Contents of Memory Location Is (AF)H memory word. Similar to reading, in order to write to memory we specify the address of the word on the address lines and place word contents on the data-in bus. We also indicate a write request on the read/write line. In the block diagram of RAM given in Figure 9.5.1, the CS line is used to select a specific chip for reading or writing. This is done since general designs may have multiple RAM chips. These RAM chips may share a common set of data-in and data-out lines. The CS line is used to choose one of these chips for communication. Before we conclude this section, however, we mention that the term RAM is used to indicate that words in memory can be accessed in any random fashion in approximately equal time. Contrast this with accessing information on a tape; accessing information at the beginning of the tape takes less time than accessing information toward the end of the tape (assuming the tape is rewound to the beginning). Another name used for RAM is read/write memory (RWM) to distinguish it from read-only memory (ROM). 12

13 Read Only Memory (Non-Volatile Memory): Types of ROMs : ROM (Read only Memory) PROM (Programmable ROM) EPROM (Erasable PROM), EEPROM (Electrically Erasable PROM). One major type of memory that is used in PCs is called read-only memory, or ROM for short. ROM is a type of memory that normally can only be read, as opposed to RAM which can be both read and written. There are two main reasons that read-only memory is used for certain functions within the PC: Permanence: The values stored in ROM are always there, whether the power is on or not. A ROM can be removed from the PC, stored for an indefinite period of time, and then replaced, and the data it contains will still be there. For this reason, it is called nonvolatile storage. A hard disk is also non-volatile, for the same reason, but regular RAM is not. Security: The fact that ROM cannot easily be modified provides a measure of security against accidental (or malicious) changes to its contents. You are not going to find viruses infecting true ROMs, for example; it's just not possible. (It's technically possible with erasable EPROMs, though in practice never seen.) Read-only memory is most commonly used to store system-level programs that we want to have available to the PC at all times. The most common example is the system BIOS program, which is stored in a ROM called (amazingly enough) the system BIOS ROM. Having this in a permanent ROM means it is available when the power is turned on so that the PC can use it to boot up the system. Remember that when you first turn on the PC the system memory is empty, so there has to be something for the PC to use when it starts up. See this section for a description of the system BIOS ROM; see here for a description of the system boot sequence. While the whole point of a ROM is supposed to be that the contents cannot be changed, there are times when being able to change the contents of a ROM can be very useful. There are several ROM variants that can be changed under certain circumstances; these can be thought of as "mostly read-only memory". :^) The following are the different types of ROMs with a description of their relative modifiability: ROM: A regular ROM is constructed from hard-wired logic, encoded in the silicon itself, much the way that a processor is. It is designed to perform a specific function and cannot be changed. This is inflexible and so regular ROMs are only used generally for programs that are static (not changing often) and mass-produced. This product is analogous to a commercial software CD-ROM that you purchase in a store. Programmable ROM (PROM): This is a type of ROM that can be programmed using special equipment; it can be written to, but only once. This is useful for companies that make their own ROMs from software they write, because when they change their code they can create new PROMs without requiring expensive equipment. This is similar to the way a CD-ROM recorder works by letting you "burn" programs onto blanks once and then letting you read from them many times. In fact, programming a PROM is also called burning, just like burning a CD-R, and it is comparable in terms of its flexibility. Erasable Programmable ROM (EPROM): An EPROM is a ROM that can be erased and reprogrammed. A little glass window is installed in the top of the ROM package, through which you can actually see the chip that holds the memory. Ultraviolet light of a specific frequency can be shined through this window for a specified period of time, which

will erase the EPROM and allow it to be reprogrammed again. Obviously this is much more useful than a regular PROM, but it does require the erasing light. Continuing the "CD" analogy, this technology is analogous to a reusable CD-RW. Electrically Erasable Programmable ROM (EEPROM): The next level of eras ability is the EEPROM, which can be erased under software control. This is the most flexible type of ROM, and is now commonly used for holding BIOS programs. When you hear reference to a "flash BIOS" or doing a BIOS upgrade by "flashing", this refers to reprogramming the BIOS EEPROM with a special software program. Here we are blurring the line a bit between what "read-only" really means, but remember that this rewriting is done maybe once a year or so, compared to real read-write memory (RAM) where rewriting is done often many times per second. 14