Introduction to Registers Being just logic, ALUs require all the inputs to be present at once. They have no memory. ALU AB FS.

Slides:



Advertisements
Similar presentations
Microprocessors and Interfacing
Advertisements

Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
Flip-Flops, Registers, Counters, and a Simple Processor
EE2420 – Digital Logic Summer II 2013
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
1 Lecture 20 Sequential Circuits: Latches. 2 Overview °Circuits require memory to store intermediate data °Sequential circuits use a periodic signal to.
LOGIC GATES ADDERS FLIP-FLOPS REGISTERS Digital Electronics Mark Neil - Microprocessor Course 1.
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.
Processor System Architecture
Tutorial: Wednesday Week 3 Hand in on Monday, Do the questions for tutorials 1 & 2 at the back of the course notes (answers to tutorial 3 will be published.
EE1A Revision What should you be expected to do in a typical exam question ? Understanding of basic principles. Ability to perform simple circuit analysis.
1 Foundations of Software Design Lecture 3: How Computers Work Marti Hearst Fall 2002.
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
The Logic Machine We looked at programming at the high level and at the low level. The question now is: How can a physical computer be built to run a program?
Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number.
Lecture 4: Computer Memory
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
IT Systems Flip - Flops EN230-1 Justin Champion C208 –
CS61CL Machine Structures Lec 8 – State and Register Transfers David Culler Electrical Engineering and Computer Sciences University of California, Berkeley.
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters and Registers
ENGSCI 232 Computer Systems Lecture 5: Synchronous Circuits.
SAP1 (Simple-As-Possible) Computer
Last Mod: March 2014  Paul R. Godin Shift Registers Registers 1.1.
Introduction to Computing: Lecture 4
created by :Gaurav Shrivastava
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Registers CPE 49 RMUTI KOTAT.
Rabie A. Ramadan Lecture 3
1 Lecture 32 Datapath Analysis. 2 Overview °Datapaths must deal with input and output data values Implement with tri-state buffers °Necessary to control.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
P. 4.1 Digital Technology and Computer Fundamentals Chapter 4 Digital Components.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
ENG241 Digital Design Week #8 Registers and Counters.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 9: Digital Electronics – Sequential Logic by Muhazam Mustapha, November 2011.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits II.
Introduction to Microprocessors
IT253: Computer Organization Lecture 9: Making a Processor: Single-Cycle Processor Design Tonga Institute of Higher Education.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
Lecture 21: Registers and Counters (1)
Boolean and Sequential Logic Last week – Basic Gates AND OR NOT NOR XOR NAND.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Jeremy R. Johnson William M. Mongan
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Dept. of Electrical Engineering
TOPIC : Introduction to Sequential Circuits UNIT 1: Modeling and Simulation Module 4 : Modeling Sequential Circuits.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Copyright © 2001 Stephen A. Edwards All rights reserved Busses  Wires sometimes used as shared communication medium  Think “party-line telephone”  Bus.
Introduction to Registers
Chap 7. Register Transfers and Datapaths
Morgan Kaufmann Publishers
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
FLIP-FLOPS.
Presentation transcript:

Introduction to Registers Being just logic, ALUs require all the inputs to be present at once. They have no memory. ALU AB FS

Basic Computation Computers perform complicated tasks only because the programmer has broken that task down into a sequence of simple primitive operations. Moving information Performing simple arithmetic and logical operations To perform operations in sequence, the results of previous operations must be remembered somehow.

Using Memory Even the simplest computations require memory. For example, take a pocket calculator. To add 4 and 3: Press ‘4’ – calculator remembers the number Press ‘+’ – calculator remembers ‘4’ and ‘add’ Press ‘3’ – calculator remembers ‘4’, ‘add’ and ‘3’ Press ‘=’ – calculator works out the answer and remembers it so it can be displayed To achieve this kind of functionality, we need a circuit that can remember binary numbers – a register.

Memory Circuits Simple memory circuit can be built using a pair of NOR gates: If the SET input is high, the output goes high If the RESET input is high, the output goes low If neither input is high, the output stays in its previous state

How it Works 0 0 (1) (0) (1) (0) (1) (0) (1) (0) (1) (0) (1) 0 NB. Output of NOR gate = 1 only if both inputs are 0

Flip-Flops The R-S flip-flop is an asynchronous flip-flop. Its output changes immediately in response to an input. Synchronous flip-flops only respond when they are ‘clocked’ by a separate clock-in. Synchronous devices are preferred in computer design to avoid problems with unpredictable propagation delays. Simplest synchronous flip-flop is probably the D-type flip-flop. It is also the basis of a single-bit memory register.

The Flip-Flop. A Single Bit Register. CLK D QQQQ DnDn Q n D CLK Q

A Two-bit Register CLK D QQQQ D QQQQ D0D0 D1D1 Q0Q0 Q1Q1 D 0 D 1 CLK Q 0 Q 1

Multiple Bit Register To remember a whole byte, just use eight flip-flops… CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 Q 0 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 CLK D 0-7 Q 0-7 D 0-7 Q 0-7 CLK 88 (shorthand form)

The ‘Working Register’ The most common use of a register in a micro-controller is in conjunction with an ALU. To simplify the inputs, one of the operands of any ALU operation is stored in a register. Depending on the device, this register is known as: The Working Register (W) The Accumulator (A)

Using a Working Register

Example Operation To subtract 3 from 5… Stage 1 Store the number 3 in the working register Ignore the ALU output Stage 2 Input the number 5 and the selection word, S, representing (A – B) ALU output equals 2 ALU A B S C OUT F Single input byte Control inputs Result Carry output Working register D Q CLK 8 8

Are registers the same as memory ? Yes Computer memory (RAM) is, effectively, a big bank of registers. In the PIC microcontrollers, the registers are the memory. No Memory is usually physically separate from the microprocessor. Most microprocessors have only a few registers. Registers can be read from and written to very quickly. Register contents can be exchanged directly.

Interconnecting Registers How do we transfer information between two registers ? Like this ? CLK D 0-7 Q 0-7 CLK1 88 CLK D 0-7 Q CLK2

Three Registers OK, that sort of works, what about 3 registers ? CLK D 0-7 Q CLK D 0-7 Q CLK D 0-7 Q Don’t try to make sense of this. It’s an utter mess !

Three Registers Mk II CLK D 0-7 Q 0-7 CLK1 88 CLK D 0-7 Q 0-7 CLK2 88 CLK D 0-7 Q 0-7 CLK3 88 8

Interconnecting Registers All registers are connected to a common set of 8 wires – a bus. Each register needs a ‘switch’ to determine whether the bus is connected to: The register output Register is outputting to the bus The register input Register is inputting from the bus or… … register is ignoring the bus Using this basic scheme, any number of registers can be connected to the bus with no increase in complexity.

Summary – ALUs and Registers ALUs, despite their complexity, they are just combinational logic circuits with no memory. Registers are fast access memory elements found inside microprocessors, micro- controllers etc. Registers and their interconnections will be be discussed in more detail next time.