CSC Computer Architecture and Organization

Similar documents
Registers and Counters

Chapter 6 Registers and Counters

Registers and Counters

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

Registers and Counters

Registers & Counters. BME208 Logic Circuits Yalçın İŞLER

Lecture 12. Amirali Baniasadi

Registers and Counters

Registers and Counters

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

Analysis of Sequential Circuits

MC9211 Computer Organization

Chapter 3 Unit Combinational

Counter dan Register

Sequential Logic Counters and Registers

Registers, Register Transfers and Counters Dr. Fethullah Karabiber

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Counters

1. Convert the decimal number to binary, octal, and hexadecimal.

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Vignana Bharathi Institute of Technology UNIT 4 DLD

Chapter 4. Logic Design

Logic Design. Flip Flops, Registers and Counters

MODULE 3. Combinational & Sequential logic

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

Computer Organization & Architecture Lecture #5

Serial In/Serial Left/Serial Out Operation

Asynchronous (Ripple) Counters

Digital Logic Design ENEE x. Lecture 19

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

ECE 3401 Lecture 11. Sequential Circuits

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

CHAPTER1: Digital Logic Circuits

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

ELEN Electronique numérique

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Introduction. Serial In - Serial Out Shift Registers (SISO)

UNIVERSITI TEKNOLOGI MALAYSIA

Logic Design II (17.342) Spring Lecture Outline

CHAPTER 4: Logic Circuits

ECE 3401 Lecture 12. Sequential Circuits (II)

CHAPTER 4: Logic Circuits

IT T35 Digital system desigm y - ii /s - iii

D Latch (Transparent Latch)

Experiment 8 Introduction to Latches and Flip-Flops and registers

ASYNCHRONOUS SEQUENTIAL CIRCUIT CONCEPTS

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

AC103/AT103 ANALOG & DIGITAL ELECTRONICS JUN 2015

Module -5 Sequential Logic Design

ASYNCHRONOUS COUNTER CIRCUITS

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

Digital Fundamentals: A Systems Approach

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

EET2411 DIGITAL ELECTRONICS

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

CHAPTER 6 COUNTERS & REGISTERS

Department of CSIT. Class: B.SC Semester: II Year: 2013 Paper Title: Introduction to logics of Computer Max Marks: 30

Universal Asynchronous Receiver- Transmitter (UART)

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Other Flip-Flops. Lecture 27 1

EE292: Fundamentals of ECE

Chapter 9 Counters. Clock Edge Output Q 2 Q 1 Q

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Chapter 9: Shift Registers

RS flip-flop using NOR gate

Logic Design Viva Question Bank Compiled By Channveer Patil

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Scanned by CamScanner

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

REPEAT EXAMINATIONS 2004 SOLUTIONS

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM

Chapter 2. Digital Circuits

EECS 270 Midterm 1 Exam Closed book portion Winter 2017

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Chapter 7 Counters and Registers

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Lecture 8: Sequential Logic

Fall 2000 Chapter 5 Part 1

Decade Counters Mod-5 counter: Decade Counter:

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

SEMESTER ONE EXAMINATIONS 2002

INC 253 Digital and electronics laboratory I

Computer Systems Architecture

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Digital Circuits ECS 371

RS flip-flop using NOR gate

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Transcription:

S 37 - omputer Architecture and Organization Lecture 6: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store n bits of data. There are several different types of registers available commercially. The simplest design is a register consisting only of flipflops, with no other gates in the circuit. Loading the register transfer of new data into the register. The flip-flops share a common clock pulse (frequently using a buffer to reduce power requirements). Output could be sampled at any time. learing the flip-flop (placing zeroes in all its bit) can be done through a special terminal on the flip-flop.

4-bit Register lock I A I A I 2 A 2 I 3 A 3 lear Registers With Parallel Load The clock usually provides a steady stream of pulses which are applied to all flip-flops in the system. A separate control system is needed to determine when to load a particular register. The Register with Parallel Load has a separate load input. When it is cleared, the register receives it output as input. When it is set, it received the load input. 2

4-bit Register With Parallel Load Load I A I A I 2 A 2 A 3 I 3 lock Shift Registers A shift register is a register which can shift its data in one or both directions. The simplest shift register simply connects the flip-flops to their respective neighbor with the clock controlling the operation. If we wish to shift on some clock pulses but not others, we can inhibit the clock pulses on which we do not to shift. 3

4-Bit Shift Register Serial Input Serial Output lock Serial Transfer A digital system is operating in a serial mode when information is transferred and manipulated one bit at a time, with bits transferred out of the source register into the destination register. This is different from parallel transfer where all the bits of a register are transferred at once. Serial transfer of information from register A to register B is done with shift registers, where the serial output from register A serves as the serial input for register B. 4

Serial Transfer From Register A to Register B SI Shift Register A SO SI Shift Register B SO L L lock Shift control lock Shift control L T T 2 T 3 T 4 Serial Transfer State Table Timing Pulse Shift Register A Shift Register B Initial value After T After T 2 After T 3 After T 4 5

Serial Addition While operations are usually parallel because it is faster, serial operations require less equipment. Serial addition can demonstrate this point, allowing us to perform addition with a single full adder and our two addends stored in a pair of shift registers, with the carry-out going into a -type flip-flop (and going back in as the carry-in). Initially, register A and the carry flip-flop are cleared to. The augend is initially placed in register B and serial addition is used to place it into register A. The sum is placed in shift register A, replacing the augend. Serial Adder Shift control L SI Shift Register A SO x y z FA S Serial input SI Shift Register B SO lear 6

Redesigning the Serial Adder We will use a pair of shift registers whose outputs will be x and y respectively. These are corresponding bits of the addends. S is the sum bit produced and a flip-flop will hold the carry bit as the flip-flop s state. We will implement it using a flip-flop State Table for the Serial Adder Present State Inputs Next State Output Flip-flop Inputs (t) Y (t+) S 7

arnaugh Map for xy = xy arnaugh Map for xy = x y = (x + y) 8

arnaugh Map for S xy S = x y Serial Adder Shift control L SI Shift Register A SO = x Serial input SI Shift Register B SO = y lear 9

Bi-directional Shift Registers A shift register that can shift in one direction is called a unidirectional shift register. A shift register that can shift in either direction is called a bi-directional shift register. Some shift register also allow for the simple transfer of data. General Shift Register The most general shift register have all of these capabilities: An input for clock pulses to synchronize all operations. A shift-right operation and serial line input line associated with the shift-right. A shift-left operation and serial line input line associated with the shift-left. A parallel load operation and n input lines associated with the parallel transfer. n parallel output lines. A control state that leaves the information in the register unchanged even though the clock pulses are applied.

Function Table For General Shift Register S S Register operation No change Shift Right (down) Shift Left (up) Parallel load Bidirectional Shift Register With Parallel Load S S Serial Input I S S 4 MU 2 3 A I S S 4 MU 2 3 A I 2 S S 4 MU 2 3 A 2 Serial Input I 3 lock S S 4 MU 2 3 A 3

ounters A register that goes through a prescribed sequences of states upon the application of an input pulse is called a counter. The input pulse may be a clock pulse or may have some other origin. A counter that goes through a binary sequence is called a binary counter. An n-bit binary counter uses n flip-flops and can count from to 2 n -. Ripple ounters ounters are either ripple counters or synchronous counters. In synchronous counters, all flip-flops receive the common clock pulse; therefore they change at the same time. In ripple counters, the output of one flip-flop is used as a source for triggering others. 2

4-Bit Ripple ounter Using T-Type Flip-flop A 3 A 2 A A T R T R T R T R Logic- Reset ount 4-Bit Ripple ounter Using -Type Flip-flop A 3 A 2 A A R R R R Logic- Reset ount 3

4-Bit Ripple ounter Using -Type Flip-flop A 3 A 2 A A R R R R Reset ount Binary ount Sequence A 3 A 2 A A 4

B Ripple ounter A binary-coded decimal ripple counter will return to after it reaches 9, this necessarily changes the logic 8 4 2 Logic- ount Three-ecade B ounter 8 4 2 8 4 2 8 4 2 B ounter B ounter B ounter ount pulse 2 digit digit digit 5

Binary ounters A counter is a register that goes through a predetermined sequence of states as input pulses are applied. Almost all digital equipment will contain counters; they are used for counting the occurrences of a particular event and are useful in generating timing signals. An n-bit counter uses n flip-flops and are have any value in the range to 2 n -. We notice in our sequences that the lowest significance bit is complemented with every count and the other bits are complemented from one count to the next when all the lower bits are set. 4-bit Synchronous Binary ounter ount Enable A A A 2 lock A 3 Output carry 6

Up-own Binary ounter A count-down binary counter will go through binary states in reverse order. E.g., a 4-bit count-down binary counter will start at, go to, then, and so on down to. As in regular counters, the least significant bit is always complemented. But higher bits are complemented only if the lower bits are all. We can design a counter that can go in either direction, depending on the control inputs. 4-Bit Up-own Binary ounter Up own T A T A T A 2 T A 3 lock 7

B ounter B counters only go through states to up to. The pattern is as regular as binary counter, so we must go through the design process. State Table for B ounter Present State Next State Output Flip-flop Inputs 8 4 2 8 4 2 y T 8 T 4 T 2 T 8

8 4 2 arnaugh Map For T 8 T 8 = 8 + 4 2 8 4 2 arnaugh Map For T 4 T 4 = 2 9

8 4 2 arnaugh Map For T 2 T 2 = 8 8 4 2 arnaugh Map For T T = 2

4-Bit ounter With Parallel Load & Synchronous lear ounters often need to be preset with a prespecified value before counting begins. We also need the capability of clearing all bits simultaneously. Function Table For 4-Bit Parallel Load ounter lock lear Load ount Operation No change Increment count Load inputs I through I 3 lear outputs 2

Load 4-bit counter with parallel load & synchronous clear ount I A I A I 2 A 2 I 3 lock lear A 3 ounters With Unused States An n-bit counter has 2 n states, but there are occasions when we wish to use less than the total number of states available. The unused states may be treated as don tcare conditions (or assigned to specific next states). Because outside interference may land the counter in these states, we must ensure that the counter can find its way back to a valid state. 22

State Table For ounter With Unused States Present State Next State Flip-flop Inputs A B A B A A B B arnaugh Maps for A and A A B A = B A B A = B 23

arnaugh Maps for B and B A B B = A B B = arnaugh Maps for and A B = B A B = 24

State iagram For ounter With Unused States Logic iagram For ounter With Unused States A B lock Logic 25

Ring ounter omputers need timing signals that indicate the sequence in which certain operations will take place. These can be generated by ring counters, circular shift registers with only one flip-flop set at any time. The alternative to a 4-bit ring counter is a 2-bit counter that goes through 4 distinct states and uses a decoder. Ring ounter Vs. ounter and ecoder Shift right T T T 2 T 3 T T T 2 T 3 Ring counter (initial value = ) 2 x 4 decoder ount enable 2-bit counter ounter and decoder 26

Sequence of Timing Signals From the Ring ounter L T T T 2 T 3 Switch-tail Ring ounters Switch-tail ring counter can double the number of states that a ring counter can provide. A A B B E E L 4-stage switch-tail ring counter 27

State Table For Switch-tail ounter Flip-flop Outputs Seq. Num. A B E AN gate required for output A E 2 AB 3 B 4 E 5 AE 6 A B 7 B 8 E ohnson ounters A A B B E E L Seq. # 2 3 4 5 6 7 8 28