Docsity

Computer Organization and Architecture (CoSc2043) Course Module, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
Module for computer organization & Architecture (CoSc2043)
Set by VENKATA KRISHNA.B DTU , Computer science Dept. October/2015 1
DEBRE TABOR UNIVERSITY
Engineering and Related Sciences
Band I
Department of Computer Science
Course Module for Computer Organization and Architecture (CoSc2043)
Prepared by:-
Bandi Venkata Krishna
DTU
October, 2015
Debre tabor
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download Computer Organization and Architecture (CoSc2043) Course Module and more Study notes Computer Architecture and Organization in PDF only on Docsity!

DEBRE TABOR UNIVERSITY

Engineering and Related Sciences

Band I

Department of Computer Science

Course Module for Computer Organization and Architecture (CoSc2043)

Prepared by:- Bandi Venkata Krishna DTU October, 2015 Debre tabor

Module Topic: Computer organization and Architecture Course code: (CoSc2043) Target Group: 2 nd^ year(sec 1 & 2) computer science department Credit hour: 3 hrs( 3hrs lecture) Pre Requisite: logic design Course description: To be a professional in any field of computing today, one should not regard the computer as just a blank box that executes programs by magic. All students of computing should acquire some understanding and appreciation of a computer system’s functional components , their characteristics , their performance and their interactions. Students need to understand computer architecture in order to structure a program so that it runs more efficiently on a real machine. The focus of this course is to deal with digital logic and digital systems: machine level representation of data; assembly level machine organization; memory system organization and architecture; interfacing and communication; and functional organization. Learning outcomes At the end of this course students will able to:- Describe the progression of computer architecture from vacuum tubes to VLSI Use mathematical expressions to describe the functions of simple combinational and sequential circuits Explain the reasons for using different formats to represent numerical data Describe the internal representation of characters , strings etc Explain the organization of the classical Von Neumann machine and its major functional units. Summarize how instructions are represented at both machine level and in assembly language Explain the basic concepts of interrupts and I/O operations Describe the role of cache and virtual memory Describe the advantage and limitations of RAID architectures.

  • Precedence order : NOT, AND, OR
  • We can use parenthesis to override precedence Additional useful gates The NAND gate is equivalent to an AND gate followed by a NOT gate. NAND = AND + NOT  The NOR gates are a combination of OR and NOT gates NOR = OR + NOT  The exclusive-OR (XOR) gate generates a 1 output whenever the two inputs differ  XOR implements exclusive-OR function  The exclusive-NOR gate is also called the equivalence or coincidence gate.
  • Implementing the NAND and NOR gates requires only two transistors whereas the AND and OR gate implementations require three transistors 1.4) Counters:
  • Counters are a specific type of sequential circuit
  • The state serves as the “output” (Moore)
  • A counter that follows the binary number sequence is called a binary counter
  • n-bit binary counter: n flip-flops, count in binary from 0 to 2ⁿ-
  • Counters are available in two types:
  • Synchronous Counters
  • Ripple Counters
  • Synchronous Counters:
  • A common clock signal is connected to the C input of each flip-flop
  • The output value increases by one on each clock cycle
  • After the largest value, the output “wraps around” back to 0
  • Using two bits, we’d get something like this:
  • Counters can act as simple clocks to keep track of “time”
  • You may need to record how many times something has happened
    • How many bits have been sent or received?
    • How many steps have been performed in some computation?
    • All processors contain a program counter, or PC
    • Programs consist of a list of instructions that are to be executed one after another (for the most part)
    • The PC keeps track of the instruction currently being executed
    • The PC increments once on each clock cycle, and the next program instruction is then executed 1.5) Ripple Counter. Counters serve many purposes in sequential logic design
    • There are lots of variations on the basic counter
      • Some can increment or decrement
      • An enable signal can be added
      • The counter’s value may be explicitly set
      • There are also several ways to make counters
      • You can follow the sequential design principles to build counters. 1.6) Registers: General purpose Registers Organization Instructions read their operands from and write their results to a register file.Register file consisting of 8 GPRS Reg0 data bits Reg1 data bits Reg2 data bits Reg3 data bits Reg4 data bits Reg5 data bits Reg6 data bits Reg7 data bits A programmer can choose which values to keep in the register file. A Gpr in the Registerfile is random Access output Register. Output register: add r1,r2,r3=> r1=r2+r3;

isEmployed := true; OR if (takesFirstJob) XOR (takesSecondJob) then isEmployed := true;

  • NOT Format: if NOT (Boolean expression) then body;
  • Examples: if NOT (x AND y) then writeln(‘NAND’); if NOT (x OR y) then writeln(‘NOR’); 1.8) Flip-Flops A level-triggered circuit is allowed to change state whenever the clock signal is either high or low. Many people use the termslatch and flip-flop interchangeably. Technically, a latch is level triggered, whereas a flip-flop is edge triggered. In this book, we use the termflip-flop. 1.9) Fan-In: For a given logic family, the maximum number of inputs available on any one gate is called thefan-in.
  • Limited in practice by the characteristics of a particular technology.
  • For CMOS, limited by the additive “on” resistance of series transistors in either the PUN or PDN. Typical values are 4 for NOR gates and 6 for NAND gates. 1.9.1) Fan-out. The fan-out of a logic gate is the number of inputs that the gate can drive without exceeding its worst-case loading specs.
  • General fan-out is the minimum of
  • high state fan-out
  • low state fan-out
  • In each case, determine max input current of each expected load and max output current of the driving device. 1.10) Register Transfer Notations
  • Simple digital systems are frequently characterized in terms of
  • the registers they contain, and
  • the operations that they perform.
  • The functions built into registers are examples of microoperations
  • Shift
  • Load
  • Clear
  • Increment
  • R ¬ f(R, R)
  • f: shift, load, clear, increment, add, subtract, complement,
  • and, or, xor, …
  • R3  R
  • Implies that the digital system has
  • the data lines from the source register (R5) to the destination register (R3)
  • Parallel load in the destination register (R3)
  • Control lines to perform the action
  • Selective-set A  A + B
  • Selective-complement A  A  B
  • Selective-clear A  A • B’
  • Mask (Delete) A  A • B
  • Clear A  A  B
  • Insert A  (A • B) + C
  • Compare A  A  B 1 1 0 0 At 1 0 1 0 B 1 1 1 0 At+1 (A  A + B) Questions
  1. Explain Computer Architecture and Organization.
  2. Describe Logic Gates.
  3. Define Fan-in and Fan-out
  4. Write Short notes onJK and SR Flip-flops
  5. Explain counters
  6. Dercrige Register transform notations.

First IEEE standard for binary floating-point arithmetic was adopted in 1985 after years of discussion The 1985 standard was continuously discussed, criticized, and clarified for a couple of decades In 2008, after several years of discussion, a revised standard was issued

2.3 )2’s complement The steps in the 2’s Complement process are similar to the 10’s Complement process. However, you will now use the base two. First, complement all of the digits in a number.

  • A digit’s complement is the number you add to the digit to make it equal to the largest digit in the base (i.e., 1 for binary). In binary language, the complement of 0 is 1, and the complement of 1 is 0. Second, add 1.Without this step, our number system would have two zeroes (+0 & - 0), which no number system has

4.Explain Charecter Codes. Unit- Assembly level memory organization 3.1) Von-Nuemann Machine: The Von Neumann architecture, also known as the Von Neumann model and Princeton architecture, is a computer architecture based on that described in 1945 by the mathematician and physicist John von Neumann. This describes a design architecture for an electronic digital computer with parts consisting of a processing unit containing an arithmetic logic unit and processor registers, a control unit containing an instruction register and program counter, a memory to store both data and instructions, external mass storage, and input and output mechanisms. [1][2] The meaning has evolved to be any stored-program computer in which an instruction fetch and a data operation cannot occur at the same time because they share a common bus. 1 The control unit is a component of a computer's central processing unit (CPU) that directs operation of the processor. It tells the computer's memory, arithmetic/logic unit and input and output devices how to respond to a program's instructions. [1] It directs the operation of the other units by providing timing and control signals. [citation needed] All computer resources are managed by the CU (Control Unit). [citation needed] It directs the flow of data between the Central Processing Unit (CPU) and the other devices. John von Neumann included the control unit as part of the von Neumann architecture. [2] In modern computer designs, the control unit is typically an internal part of the CPU with its overall role and operation unchanged arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and bitwise logical operations on integer binary numbers. It is a fundamental building block of the central processing unit (CPU) found in many computers Inputs are the signals or data received by the system and outputs are the signals or data sent from it Memory unit: Primary storage, or memory, means the space on your hard drive that is briefly used for working space. Although it is closely associated with the CPU, in actual fact it is seperate from it.

Memory associated with the CPU is also called primary storage, primary memory, main storage, internal storage and main memory. 3.2) fetch-decode-execute: 3.2.1. FETCH The first step the CPU carries out is to fetch some data and instructions (program) from main memory then store them in its own internal temporary memory areas. These memory areas are called 'registers'. This is called the 'fetch' part of the cycle. For this to happen, the CPU makes use of a vital hardware path called the 'address bus'. The CPU places the address of the next item to be fetched on to the address bus. Data from this address then moves from main memory into the CPU by travelling along another hardware path called the 'data bus'. 3.2.2. DECODE The next step is for the CPU to make sense of the instruction it has just fetched. This process is called 'decode'. The CPU is designed to understand a specific set of commands. These are called the 'instruction set' of the CPU. The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step. 3.2.3 EXECUTE This is the part of the cycle when data processing actually takes place. The instruction is carried out upon the data (executed). The result of this processing is stored in yet another register. Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.

3.6) Assembly programming language:

  • Assembly language: mnemonic representation for humans, e.g., OP A,B,C (meaning A <- OP(B,C))
  • Operation code (opcode)
    • Do this: ADD, SUB, MPY, DIV, LOAD, STOR
    • Eg: STOR Y Y <- AC
    • LOAD A AC <- A
    • Story : data in memory loction
    • Load:content of a memory location into register MOVE Y,A Y <- A SUB Y,B Y <- Y-B MOVE T,D T <- D MPY T,E T <- TxE ADD T,C T <- T+C DIV Y,T Y <- Y/T 3.7) Addressing modes:
  • Immediate
  • Direct
  • Indirect Immediate Addressing
  • Operand is part of instruction
  • Operand = address field
  • e.g. ADD 5 — Add 5 to contents of accumulator Accumulator: is a register in which intermediate arithmetic logic result stored. — 5 is operand
  • No memory reference to fetch data
  • Fast
  • Limited range
  • Direct addressing: :-it is contain exact address
  • e.g., ADD A
    • Add contents of cell A to accumulator
    • Look in memory at address A for operand
  • Single memory reference to access data
  • No additional calculations needed to work out effective address
  • Limited address space (length of address field) In directing addressing: :- it has no directle search locatin or addresse.
  • Memory cell pointed to by address field contains the address of (pointer to) the operand Look in A, find address (A) and look there for operand
  • E.g. ADD (A)
    • Add contents of cell pointed to by contents of A to accumulator

special high-speed memory) and a method that utilizes memory to its fullest by means of virtual memory implemented via paging. 4.2datacompression, sourcecoding, or bit-ratereduction: it involves encoding information using fewer bits than the original representation.]Compression can be either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by identifying unnecessary information and removing it.]^ The process of reducing the size of a data file is referred to as data compression. In the context of data transmission, it is called source coding (encoding done at the source of the data before it is stored or transmitted) in opposition to channel coding.[4] Data compression is particularly useful in communicationsbecause it enables devices to transmit or store the same amount of data in fewer bits. 4.2.2Data integrity refers to maintaining and assuring the accuracy and consistency of data over its entire life-cycle, and is a critical aspect to the design, implementation and usage of any system which stores, processes, or retrieves data. The term data integrity is broad in scope and may have widely different meanings depending on the specific context – even under the same general umbrella of computing. This article provides only a broad overview of some of the different types and concerns of data integrity. Human errors when data is entered Errors that occur when data is transmitted from one computer to another Software bugs or viruses Hardware malfunctions, such as disk crashes Natural disasters, such as fires and floods 4.3 The Memory Hierarchy One of the most important considerations in understanding the performance capabilities of a modern processor is the memory hierarchy. Unfortunately, as we have seen, not all memory is created equal, and some types are far less efficient and thus cheaper than others. To deal with this disparity, today's computer systems use a combination of memory types to provide the best performance at the best cost. This approach is calledhierarchical memory.

4.4 Memory Organization. Each row, implemented by a register, has a length typically equivalent to the word size of the machine. Each register (more commonly referred to as amemory location) has a unique address; memory addresses usually start at zero and progress upward. Figure 4.4 illustrates this concept. a)N8-BitMemoryLocations. b) M 16-Bit Memory Locations 4.5.1 Latency is the delay from input into a system to desired outcome; the term is understood slightly differently in various contexts and latency issues also vary from one system to another. Latency greatly affects how usable and enjoyable electronic and mechanical devices as well as communications are. In general, the period of time that one component in a system is spinning its wheels waiting for another component. Latency, therefore, is wasted time. For example, in accessing data on a disk, latency is defined as the time it takes to position the proper sector under the read/write head. 4.5.2 Cycle time is the total time from the beginning to the end of your process, as defined by you and your customer. Cycle time includes process time, during which a unit is acted upon to bring it closer to an output, and delay time, during which a unit of work is spent waiting to take the next action. 4.5.3 bandwidth, network bandwidth, data bandwidth, or digital bandwidth is a measurement of bit-rate of available or consumed data communication resources expressed in bits per second or multiples of it (bit/s, kilobit/s, Megabit/s, Gigabit/s, etc.). This is in contrast to the use of the termbandwidth in the field of signal processing. In textbooks on signal processing, wireless communications, modem data transmission, digital communications, electronics, etc.,bandwidth is used to refer to analog signal bandwidth measured in hertz. The connection to the computing term is that, according to Hartley's law, the digital data rate limit (or channel capacity) of a physical communication link is proportional to its bandwidth in hertz.